mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
22 lines
630 B
TypeScript
22 lines
630 B
TypeScript
![]() |
import { test, expect } from '@playwright/experimental-ct-vue/test'
|
||
|
import NamedSlots from './components/NamedSlots.vue'
|
||
|
|
||
|
test.use({ viewport: { width: 500, height: 500 } })
|
||
|
|
||
|
test('named slots should work', async ({ mount }) => {
|
||
|
const component = await mount(<NamedSlots>
|
||
|
<template v-slot:header>
|
||
|
Header
|
||
|
</template>
|
||
|
<template v-slot:main>
|
||
|
Main Content
|
||
|
</template>
|
||
|
<template v-slot:footer>
|
||
|
Footer
|
||
|
</template>
|
||
|
</NamedSlots>);
|
||
|
await expect(component).toContainText('Header')
|
||
|
await expect(component).toContainText('Main Content')
|
||
|
await expect(component).toContainText('Footer')
|
||
|
})
|