fix: conditional sibling islands DOM order (#1324)

This commit is contained in:
Marvin Hagemeister
2023-06-26 13:57:05 +02:00
committed by GitHub
parent 62aaffa314
commit 2b92b1c526
6 changed files with 113 additions and 23 deletions
+31
View File
@@ -434,6 +434,37 @@ Deno.test({
sanitizeResources: false,
});
Deno.test({
name: "render sibling islands that render nothing initially",
async fn(_t) {
await withPageName(
"./tests/fixture_island_nesting/main.ts",
async (page, address) => {
await page.goto(`${address}/island_conditional`, {
waitUntil: "networkidle2",
});
await page.waitForSelector("button");
await delay(100);
await page.click("button");
const text = await page.$eval(
"#page",
(el) => el.textContent,
);
// Button text is matched too, but this allows us
// to assert correct ordering. The "it works" should
// be left of "Toggle"
assertEquals(text, "it worksToggle");
},
);
},
sanitizeOps: false,
sanitizeResources: false,
});
Deno.test({
name: "serialize inner island props",