Skip to content

Commit

Permalink
disable all map snapshots
Browse files Browse the repository at this point in the history
:(
  • Loading branch information
daniel-heppner-ibigroup committed Jun 19, 2024
1 parent 6379d76 commit 93f5fc6
Show file tree
Hide file tree
Showing 27 changed files with 74 additions and 11,207 deletions.
8 changes: 6 additions & 2 deletions .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import parameters from './previewParameters';

const ONLY_RUN = process.env.ONLY_RUN

async function runSnapshots(page: Page) {
async function runSnapshots(page: Page, context: TestContext) {
const storyContext = await getStoryContext(page, context);
if(storyContext.parameters?.storyshots?.disable) {
return;
}
await waitForPageReady(page);
const elementHandler = await page.$('#storybook-root');
const innerHTML = await elementHandler?.innerHTML();
Expand Down Expand Up @@ -36,7 +40,7 @@ const config: TestRunnerConfig = {
async postVisit(page, context) {
// the #storybook-root element wraps the story. In Storybook 6.x, the selector is #root
if (!ONLY_RUN || ONLY_RUN === "SNAPSHOTS") {
await runSnapshots(page);
await runSnapshots(page, context);
}
if (!ONLY_RUN || ONLY_RUN === "A11Y") {
await runA11yTest(page, context);
Expand Down
Loading

0 comments on commit 93f5fc6

Please sign in to comment.