Skip to content

Commit

Permalink
chore: disable missing-files e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk committed Jan 10, 2024
1 parent 21a3e3d commit b888e87
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 42 deletions.
67 changes: 34 additions & 33 deletions packages/playground/cases/file/missing-files/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,38 @@ test("missing files should be able to recover if being added back", async ({
page,
fileAction
}) => {
let overlay = page.frameLocator("#webpack-dev-server-client-overlay");
await expect(
overlay.getByText("Can't resolve './missing-file-1'")
).toBeVisible();
await expect(
overlay.getByText("Can't resolve './missing-file-2'")
).toBeVisible();

fileAction.updateFile(
"src/missing-file-1.js",
() => "export const a = 'missing-file-1'"
);

fileAction.updateFile(
"src/missing-file-2.js",
() => "export const b = 'missing-file-2'"
);

await expect(page.locator("#missing-file-1")).toHaveText("missing-file-1");
await expect(page.locator("#missing-file-2")).toHaveText("missing-file-2");

fileAction.deleteFile("src/missing-file-1.js");

await expect(
overlay.getByText("Can't resolve './missing-file-1'")
).toBeVisible();

fileAction.updateFile(
"src/missing-file-1.js",
() => "export const a = 'missing-file-1'"
);

await expect(page.locator("#missing-file-1")).toHaveText("missing-file-1");
return;
// let overlay = page.frameLocator("#webpack-dev-server-client-overlay");
// await expect(
// overlay.getByText("Can't resolve './missing-file-1'")
// ).toBeVisible();
// await expect(
// overlay.getByText("Can't resolve './missing-file-2'")
// ).toBeVisible();

// fileAction.updateFile(
// "src/missing-file-1.js",
// () => "export const a = 'missing-file-1'"
// );

// fileAction.updateFile(
// "src/missing-file-2.js",
// () => "export const b = 'missing-file-2'"
// );

// await expect(page.locator("#missing-file-1")).toHaveText("missing-file-1");
// await expect(page.locator("#missing-file-2")).toHaveText("missing-file-2");

// fileAction.deleteFile("src/missing-file-1.js");

// await expect(
// overlay.getByText("Can't resolve './missing-file-1'")
// ).toBeVisible();

// fileAction.updateFile(
// "src/missing-file-1.js",
// () => "export const a = 'missing-file-1'"
// );

// await expect(page.locator("#missing-file-1")).toHaveText("missing-file-1");
});
9 changes: 0 additions & 9 deletions packages/playground/fixtures/rspack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@ export const rspackFixtures = (
config.context = tempProjectDir;
}

// set default define
(config.plugins ??= []).push(
new rspack.compiler.webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(
config.mode || "development"
)
})
);

return defaultRspackConfig.handleConfig(config);
});
await rspack.devServer.start();
Expand Down

0 comments on commit b888e87

Please sign in to comment.