test(ct): svelte render without options (#17571)

Added missing test
This commit is contained in:
sand4rt 2022-09-27 22:26:48 +02:00 committed by GitHub
parent 45b3476c8c
commit d27854f1e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1 @@
<div>test</div>

View File

@ -16,6 +16,7 @@
import { test, expect } from '@playwright/experimental-ct-svelte';
import Button from './components/Button.svelte';
import Component from './components/Component.svelte';
import DefaultSlot from './components/DefaultSlot.svelte';
import MultiRoot from './components/MultiRoot.svelte';
import Empty from './components/Empty.svelte';
@ -54,6 +55,11 @@ test('render a default slot', async ({ mount }) => {
await expect(component).toContainText('Main Content')
})
test('render a component without options', async ({ mount }) => {
const component = await mount(Component);
await expect(component).toContainText('test');
})
test('run hooks', async ({ page, mount }) => {
const messages = []
page.on('console', m => messages.push(m.text()))