storybook/docs/snippets/vue/portable-stories-playwright-ct.ts.mdx
2024-03-05 17:59:34 +01:00

16 lines
461 B
Plaintext

```ts
// Button.playwright.test.ts
import { createTest } from '@storybook/vue3/experimental-playwright';
import { test as base } from '@playwright/experimental-ct-vue';
import stories from './Button.portable';
const test = createTest(base);
test('renders primary button', async ({ mount }) => {
// The mount function will execute all the necessary steps in the story,
// such as loaders, render, and play function
await mount(stories.Primary);
});
```