Skip to content

Commit

Permalink
CR@mcous: remove flake by checking count + text
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpertsov committed Dec 4, 2023
1 parent 19feecf commit 6ec7648
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rpc/examples/echo/tests/echo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ test("receives responses", async ({ page }) => {
];

for (const [testID, expected] of table) {
await expect(page.getByTestId(testID).getByTestId("message")).toHaveCount(
expected.length,
);
const messages = page.getByTestId(testID).getByTestId("message");
const contents = await messages.allTextContents();

expect(contents).toStrictEqual(expected);
await expect(messages).toHaveCount(expected.length)
await expect(messages).toContainText(expected);
}
});

0 comments on commit 6ec7648

Please sign in to comment.