-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #405 from AmazeeLabs/storybook-8.5
chore: upgrade storybook to 8.5
- Loading branch information
Showing
8 changed files
with
2,564 additions
and
1,600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { setProjectAnnotations } from '@storybook/react'; | ||
import { beforeAll } from 'vitest'; | ||
|
||
import * as projectAnnotations from './preview'; | ||
|
||
// This is an important step to apply the right configuration when testing your stories. | ||
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations | ||
const project = setProjectAnnotations([projectAnnotations]); | ||
|
||
beforeAll(project.beforeAll); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin'; | ||
import { defineConfig } from 'vitest/config'; | ||
|
||
const dirname = | ||
typeof __dirname !== 'undefined' | ||
? __dirname | ||
: path.dirname(fileURLToPath(import.meta.url)); | ||
|
||
// More info at: https://storybook.js.org/docs/writing-tests/test-addon | ||
export default defineConfig({ | ||
test: { | ||
workspace: [ | ||
{ | ||
test: { | ||
name: 'unit', | ||
}, | ||
}, | ||
{ | ||
plugins: [ | ||
// The plugin will run tests for the stories defined in your Storybook config | ||
// See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest | ||
storybookTest({ configDir: path.join(dirname, '.storybook') }), | ||
], | ||
test: { | ||
name: 'storybook', | ||
browser: { | ||
enabled: true, | ||
headless: true, | ||
provider: 'playwright', | ||
instances: [ | ||
{ | ||
browser: 'chromium', | ||
}, | ||
], | ||
}, | ||
setupFiles: ['.storybook/vitest.setup.ts'], | ||
}, | ||
}, | ||
], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="@vitest/browser/providers/playwright" /> |
Oops, something went wrong.