Skip to content

Commit b56e48d

Browse files
committed
test: minor test enhancements
1 parent 9440b14 commit b56e48d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/rtdb.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ test("Renders a list of nodes for an authenticated user in realtime", async ({
1010
}) => {
1111
await page.goto("/rtdb-test");
1212

13-
await page.click("text=Sign In");
13+
await page.getByRole("button", { name: "Sign In" }).click();
1414
await expect(page.getByTestId("count")).toContainText("0 posts");
15-
(await page.waitForSelector("text=Add Post")).click();
15+
await page.getByRole("button", { name: "Add Post" }).click();
1616
await expect(page.getByTestId("count")).toContainText("1 posts");
17-
(await page.waitForSelector("text=Add Post")).click();
17+
await page.getByRole("button", { name: "Add Post" }).click();
1818
await expect(page.getByTestId("count")).toContainText("2 posts");
19-
expect((await page.$$("li")).length).toBe(2);
20-
expect(await page.textContent("li")).toContain("RTDB item");
19+
await expect(page.locator("li")).toHaveCount(2);
20+
await expect(page.locator("li")).toContainText(["RTDB item", "RTDB item"]);
2121
});

0 commit comments

Comments
 (0)