* fix serialization order * add regression test * split out test into a seperate package * revert logging * change order * opinions on structure * small wait in hydration order test --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
18 lines
528 B
JavaScript
18 lines
528 B
JavaScript
// @ts-check
|
|
const { test, expect } = require("@playwright/test");
|
|
|
|
test("hydration", async ({ page }) => {
|
|
await page.goto("http://localhost:7979");
|
|
|
|
// give time for the page to load and hydrate
|
|
await page.waitForTimeout(2000);
|
|
|
|
// Expect the page to contain a button
|
|
const button = page.locator("#counter");
|
|
await expect(button).toContainText("Count 0");
|
|
|
|
// Hydration should succeed and clicking the button should increase the count
|
|
await button.click();
|
|
await expect(button).toContainText("Count 1");
|
|
});
|