Skip to content

Commit

Permalink
Merge pull request #399 from storybookjs/next
Browse files Browse the repository at this point in the history
Release 0.15.2
  • Loading branch information
yannbf authored Nov 21, 2023
2 parents 90b5c7e + 53fdd0f commit ef85eb8
Show file tree
Hide file tree
Showing 21 changed files with 442 additions and 413 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
assert_test_runner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version-file: .nvmrc

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand All @@ -36,7 +36,7 @@ jobs:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Run test runner
uses: mathiasvr/command-output@v1
uses: mathiasvr/command-output@v2.0.0
id: tests
with:
run: |
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Report incoming errors
if: ${{ failure() }}
id: slack
uses: slackapi/slack-github-action@v1.19.0
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: '${{ secrets.SLACK_CHANNEL_ID }}'
payload: |
Expand Down Expand Up @@ -98,12 +98,12 @@ jobs:
assert_test_runner_failures:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version-file: .nvmrc

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand All @@ -120,7 +120,7 @@ jobs:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Run test runner and expect failure
uses: mathiasvr/command-output@v1
uses: mathiasvr/command-output@v2.0.0
with:
run: |
yarn build
Expand All @@ -147,7 +147,7 @@ jobs:
- name: Report if any test passes
if: ${{ always() && env.FAILED == 'true' }}
id: slack
uses: slackapi/slack-github-action@v1.19.0
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: '${{ secrets.SLACK_CHANNEL_ID }}'
payload: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'skip release')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version-file: .nvmrc

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
if: ${{ github.event.label.name == 'stress test' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version-file: .nvmrc

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand All @@ -23,4 +23,4 @@ jobs:
run: |
yarn build
yarn generate-dynamic-stories
STORY_STORE_V7=true STRESS_TEST=true yarn test-storybook:ci
STRESS_TEST=true yarn test-storybook:ci
8 changes: 4 additions & 4 deletions .github/workflows/tests-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Run test runner (story store v7)
run: |
yarn build
STORY_STORE_V7=true yarn test-storybook:ci
yarn test-storybook:ci
- name: Run test runner (stories json mode)
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -32,6 +32,6 @@ jobs:
yarn test-storybook:ci-coverage
- name: Generate code coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
verbose: true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
4 changes: 0 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ const addons = [
const config: StorybookConfig = {
stories,
addons,
features: {
storyStoreV7: process.env.STORY_STORE_V7 === 'false' ? false : true,
buildStoriesJson: true,
},
core: {
disableTelemetry: true,
},
Expand Down
2 changes: 1 addition & 1 deletion .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config: TestRunnerConfig = {
setup() {
expect.extend({ toMatchImageSnapshot });
},
async postRender(page, context) {
async postVisit(page, context) {
// Get entire context of a story, including parameters, args, argTypes, etc.
const { parameters } = await getStoryContext(page, context);

Expand Down
4 changes: 2 additions & 2 deletions MIGRATION.test-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [Storyshots x Test Runner Comparison table](#storyshots-x-test-runner-comparison-table)
- [Migration Steps](#migration-steps)
- [Replacing `@storybook/addon-storyshots` with `@storybook/test-runner`:](#replacing-storybookaddon-storyshots-with-storybooktest-runner)
- [Migrating storyshots features](#migrating-storyshots-features)
- [Migrating Storyshots features](#migrating-storyshots-features)
- [Smoke testing](#smoke-testing)
- [Accessibility testing](#accessibility-testing)
- [Image snapshot testing](#image-snapshot-testing)
Expand Down Expand Up @@ -135,7 +135,7 @@ import { getJestConfig } from '@storybook/test-runner';
const defaultConfig = getJestConfig();

const config = {
// The default configuration comes from @storybook/test-runner
// The default Jest configuration comes from @storybook/test-runner
...defaultConfig,
snapshotResolver: './snapshot-resolver.js',
};
Expand Down
Loading

0 comments on commit ef85eb8

Please sign in to comment.