Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix test-runner build step #19255

Merged
merged 13 commits into from
Oct 10, 2022
4 changes: 4 additions & 0 deletions code/renderers/react/template/stories/errors.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export default {
storyshots: { disable: true },
chromatic: { disable: true },
},
decorators: [
// Skip errors if we are running in the test runner
(storyFn: any) => window?.navigator?.userAgent?.match(/StorybookTestRunner/) || storyFn(),
tmeasday marked this conversation as resolved.
Show resolved Hide resolved
],
};

export const RenderThrows = {
Expand Down
4 changes: 2 additions & 2 deletions scripts/tasks/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export const testRunner: Task = {

// We could split this out into a separate task if it became annoying
const publishController = await servePackages({});
await exec(`yarn add --dev @storybook/test-runner@0.7.1-next.0`, execOptions);
await exec(`yarn add --dev @storybook/test-runner`, execOptions);

const storybookController = await serveSandbox(builtSandboxDir, {});

await exec(`yarn test-storybook --url http://localhost:8001 --junit`, {
await exec(`yarn test-storybook --url http://localhost:8001 --junit --index-json`, {
...execOptions,
env: {
JEST_JUNIT_OUTPUT_FILE: junitFilename,
Expand Down