Files
dioxus/packages/playwright-tests/fullstack-hydration-order.spec.js
T
Evan AlmloffandJonathan Kelley 12fab0f9f7 Fix fullstack serialization order for adjacent components (#4600)
* 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>
2025-10-03 19:23:34 -07:00

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");
});