-
-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathdom-state.spec.tsx
More file actions
19 lines (15 loc) · 679 Bytes
/
dom-state.spec.tsx
File metadata and controls
19 lines (15 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { expect, test } from "@playwright/test";
test.describe("dom state", () => {
// See issue #103
test("should preserve DOM state across renders when an inline renderProp function is used", async ({
page
}) => {
await page.goto("http://localhost:3010/scrolling-dom-state");
await expect(page.getByText("force update (0)")).toBeVisible();
await expect(page.getByText("Row 01")).toBeInViewport();
await page.getByText("Row 99").scrollIntoViewIfNeeded();
await page.getByText("force update (0)").click();
await expect(page.getByText("force update (1)")).toBeVisible();
await expect(page.getByText("Row 99")).toBeInViewport();
});
});