Skip to content

Commit

Permalink
Move E2E info message to one that's easier to extend
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Oct 17, 2024
1 parent 6b6570b commit d999140
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion node-src/ui/tasks/storybookInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d999140

Please sign in to comment.