diff --git a/code/addons/vitest/src/preset.ts b/code/addons/vitest/src/preset.ts index 4c7b84310a56..6a0dfc854415 100644 --- a/code/addons/vitest/src/preset.ts +++ b/code/addons/vitest/src/preset.ts @@ -103,6 +103,7 @@ export const experimental_serverChannel = async (channel: Channel, options: Opti testProviderStore.setState('test-provider-state:running'); store.setState((s) => ({ ...s, + currentRun: storeOptions.initialState.currentRun, fatalError: undefined, })); runTestRunner({ diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index 7ba21230ae73..5f77aafc1514 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -205,10 +205,6 @@ 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(); @@ -216,13 +212,18 @@ test.describe("component testing", () => { 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(); diff --git a/test-storybooks/portable-stories-kitchen-sink/react/playwright-e2e.config.ts b/test-storybooks/portable-stories-kitchen-sink/react/playwright-e2e.config.ts index 03142a650659..4448147bcc95 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/playwright-e2e.config.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/playwright-e2e.config.ts @@ -56,7 +56,5 @@ export default defineConfig({ command: "yarn storybook", url: "http://127.0.0.1:6006", reuseExistingServer: true, - stdout: "pipe", - stderr: "pipe", }, });