Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,24 +205,25 @@ test.describe("component testing", () => {
"Run component tests"
);

const testingModuleDescription = await page.locator(
"#testing-module-description"
);

const runTestsButton = await page.getByLabel("Start test run");
const watchModeButton = await page.getByLabel("Enable watch mode");
await expect(runTestsButton).toBeEnabled();
await expect(watchModeButton).toBeEnabled();

await runTestsButton.click();
await expect(watchModeButton).toBeDisabled();

await expect(testingModuleDescription).toContainText("Testing");
await expect(page.locator("#testing-module-description")).toHaveText(
/Starting/
);
await expect(page.locator("#testing-module-description")).toHaveText(
/Testing/
);

// Wait for test results to appear
await expect(testingModuleDescription).toHaveText(/Ran \d+ tests/, {
timeout: 30000,
});
await expect(page.locator("#testing-module-description")).toHaveText(
/Ran \d+ tests/,
{ timeout: 30000 }
);

await expect(runTestsButton).toBeEnabled();
await expect(watchModeButton).toBeEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,5 @@ export default defineConfig({
command: "yarn storybook",
url: "http://127.0.0.1:6006",
reuseExistingServer: true,
stdout: "pipe",
stderr: "pipe",
},
});