diff --git a/node-src/ui/tasks/storybookInfo.ts b/node-src/ui/tasks/storybookInfo.ts index e7d861d05..67dc6a6b1 100644 --- a/node-src/ui/tasks/storybookInfo.ts +++ b/node-src/ui/tasks/storybookInfo.ts @@ -8,9 +8,21 @@ const capitalize = (string: string) => .map((str) => str.charAt(0).toUpperCase() + str.slice(1)) .join(' '); +const e2eMessage = (ctx: Context) => { + if (ctx.options.playwright) { + return 'Playwright for E2E'; + } + + if (ctx.options.cypress) { + return 'Cypress for E2E'; + } + + return 'E2E'; +}; + const infoMessage = (ctx: Context) => { if (isE2EBuild(ctx.options)) { - return ctx.options.playwright ? 'Playwright for E2E' : 'Cypress for E2E'; + return e2eMessage(ctx); } const { addons, version, viewLayer, builder } = ctx.storybook;