fix: twind styles not updated on partial nav (#2017)
This commit is contained in:
@@ -3,6 +3,7 @@ import { assert, assertEquals, assertMatch, delay, puppeteer } from "./deps.ts";
|
||||
import { cmpStringArray } from "./fixture_twind_hydrate/utils/utils.ts";
|
||||
import {
|
||||
startFreshServer,
|
||||
waitForStyle,
|
||||
withFakeServe,
|
||||
withFresh,
|
||||
withPageName,
|
||||
@@ -385,3 +386,22 @@ Deno.test("don't duplicate css class with twindV1", async () => {
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("render styles from partial update", async () => {
|
||||
await withPageName(
|
||||
"./tests/fixture_twind_hydrate/main.ts",
|
||||
async (page, address) => {
|
||||
await page.goto(`${address}/island_twind`);
|
||||
await page.click(`a[href="/island_twind/blue"]`);
|
||||
|
||||
await page.waitForSelector(".bg-blue-500");
|
||||
|
||||
await waitForStyle(
|
||||
page,
|
||||
".bg-blue-500",
|
||||
"backgroundColor",
|
||||
"rgb(59, 130, 246)",
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user