mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-20 05:02:37 +08:00
15 lines
468 B
TypeScript
15 lines
468 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
import process from 'process';
|
|
|
|
const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';
|
|
|
|
test('Basic story test', async ({ page }) => {
|
|
await page.goto(storybookUrl);
|
|
|
|
const preview = page.frameLocator('#storybook-preview-iframe');
|
|
const root = preview.locator('#root:visible, #docs-root:visible');
|
|
|
|
// Specific check for introduction story
|
|
await expect(root).toContainText('Welcome');
|
|
});
|