Skip to content

Commit ef90a84

Browse files
committed
Isolate state preservation check per test case
1 parent d67b5ba commit ef90a84

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

integration/vite-css-test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,6 @@ async function hmrWorkflow({
536536

537537
let input = page.locator("input");
538538
await expect(input).toBeVisible();
539-
await input.type("stateful");
540-
await expect(input).toHaveValue("stateful");
541539

542540
let edit = createEditor(cwd);
543541
let modifyCss = (contents: string) =>
@@ -579,6 +577,7 @@ async function hmrWorkflow({
579577

580578
for (const { file, selector } of testCases) {
581579
const routeFile = `app/routes/${routeBase}/${file}`;
580+
await input.fill(routeFile);
582581
await edit(routeFile, modifyCss);
583582
await expect(
584583
page.locator(selector),
@@ -592,7 +591,7 @@ async function hmrWorkflow({
592591

593592
// Ensure CSS updates were handled by HMR
594593
await expect(input, `State preservation for ${routeFile}`).toHaveValue(
595-
"stateful",
594+
routeFile,
596595
);
597596
}
598597

0 commit comments

Comments
 (0)