2022-05-05 13:26:56 -08:00
|
|
|
import { test, expect } from '@playwright/test'
|
2022-04-25 21:10:08 -08:00
|
|
|
|
|
|
|
import NamedSlots from './NamedSlots.vue'
|
2022-03-15 13:47:42 -08:00
|
|
|
|
|
|
|
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')
|
|
|
|
})
|