test(ui): rebuild storybook before e2e
This commit is contained in:
parent
0b2deb8405
commit
264c3a7edb
2 changed files with 5 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ export default defineConfig({
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command: `[ -f storybook-static/iframe.html ] || bun run build-storybook; STORYBOOK_STATIC_PORT=${storybookPort} bun tests/e2e/storybook-server.ts`,
|
command: `bun run build-storybook && STORYBOOK_STATIC_PORT=${storybookPort} bun tests/e2e/storybook-server.ts`,
|
||||||
url: storybookURL,
|
url: storybookURL,
|
||||||
reuseExistingServer: false,
|
reuseExistingServer: false,
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,10 @@ test.describe("Storybook theme QA", () => {
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Switch to dark theme" }),
|
page.getByRole("button", { name: "Switch to dark theme" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
await expect(page.locator("body")).toHaveCSS(
|
||||||
|
"background-color",
|
||||||
|
"rgb(243, 245, 237)",
|
||||||
|
);
|
||||||
expect(
|
expect(
|
||||||
consoleMessages.filter((message) =>
|
consoleMessages.filter((message) =>
|
||||||
message.includes("Global args/argTypes can only be set globally"),
|
message.includes("Global args/argTypes can only be set globally"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue