Skip to content

Commit

Permalink
Merge pull request #549 from storybookjs/next
Browse files Browse the repository at this point in the history
Release 0.21.3
  • Loading branch information
valentinpalkovic authored Feb 20, 2025
2 parents 3dda058 + 2a17c0c commit 3e335ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/setup-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const setupPage = async (page: Page, browserContext: BrowserContext) => {
const failOnConsole = process.env.TEST_CHECK_CONSOLE;

const viewMode = process.env.VIEW_MODE ?? 'story';
const renderedEvent = viewMode === 'docs' ? 'docsRendered' : 'storyRendered';
const renderedEvent = viewMode === 'docs' ? 'globalThis.__STORYBOOK_MODULE_CORE_EVENTS__.DOCS_RENDERED' : 'globalThis.__STORYBOOK_MODULE_CORE_EVENTS__.STORY_FINISHED ?? globalThis.__STORYBOOK_MODULE_CORE_EVENTS__.STORY_RENDERED';
const { packageJson } = (await readPackageUp()) as NormalizedReadResult;
const { version: testRunnerVersion } = packageJson;

Expand Down Expand Up @@ -82,7 +82,7 @@ export const setupPage = async (page: Page, browserContext: BrowserContext) => {
const content = (await readFile(scriptLocation, 'utf-8'))
.replaceAll('{{storybookUrl}}', finalStorybookUrl)
.replaceAll('{{failOnConsole}}', failOnConsole ?? 'false')
.replaceAll('{{renderedEvent}}', renderedEvent)
.replaceAll('"{{renderedEvent}}"', renderedEvent)
.replaceAll('{{testRunnerVersion}}', testRunnerVersion)
.replaceAll('{{logLevel}}', testRunnerConfig.logLevel ?? 'info')
.replaceAll('{{debugPrintLimit}}', debugPrintLimit.toString());
Expand Down

0 comments on commit 3e335ba

Please sign in to comment.