diff --git a/code/e2e-tests/addon-docs.spec.ts b/code/e2e-tests/addon-docs.spec.ts index d4ddbaeec1a..2be60673da1 100644 --- a/code/e2e-tests/addon-docs.spec.ts +++ b/code/e2e-tests/addon-docs.spec.ts @@ -1,19 +1,24 @@ +/* eslint-disable jest/no-disabled-tests */ /* eslint-disable no-await-in-loop */ import { test, expect } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('addon-docs', () => { test.beforeEach(async ({ page }) => { await page.goto(storybookUrl); }); - // FIXME: skip html/vue3 test('should provide source snippet', async ({ page }) => { - const sbPage = new SbPage(page); + test.skip( + /^vue3/.test(templateName), + `Skipping ${templateName}, which does not support dynamic source snippets` + ); + const sbPage = new SbPage(page); await sbPage.navigateToStory('example-button', 'docs'); const root = sbPage.previewRoot(); const toggles = root.locator('.docblock-code-toggle'); diff --git a/scripts/tasks/e2e-tests.ts b/scripts/tasks/e2e-tests.ts index 55633b6b07c..ea72790736d 100644 --- a/scripts/tasks/e2e-tests.ts +++ b/scripts/tasks/e2e-tests.ts @@ -8,12 +8,13 @@ export const e2eTests: Task = { async ready() { return false; }, - async run(_, { builtSandboxDir, junitFilename }) { + async run(_, { builtSandboxDir, junitFilename, template }) { const storybookController = await serveSandbox(builtSandboxDir, {}); await exec('yarn playwright test --reporter=junit', { env: { STORYBOOK_URL: `http://localhost:8001`, + STORYBOOK_TEMPLATE_NAME: template.name, ...(junitFilename && { PLAYWRIGHT_JUNIT_OUTPUT_NAME: junitFilename, }),