mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
test(ct): vue unmount (#17218)
This commit is contained in:
parent
d27854f1e7
commit
7be3e5cb82
@ -86,6 +86,13 @@ test('run hooks', async ({ page, mount }) => {
|
||||
expect(messages).toEqual(['Before mount: {\"route\":\"A\"}, app: true', 'After mount el: HTMLButtonElement'])
|
||||
})
|
||||
|
||||
test('unmount', async ({ page, mount }) => {
|
||||
const component = await mount(<Button title="Submit" />)
|
||||
await expect(page.locator('#root')).toContainText('Submit')
|
||||
await component.unmount();
|
||||
await expect(page.locator('#root')).not.toContainText('Submit');
|
||||
})
|
||||
|
||||
test('unmount a multi root component', async ({ mount, page }) => {
|
||||
const component = await mount(<MultiRoot />)
|
||||
await expect(page.locator('#root')).toContainText('root 1')
|
||||
|
@ -85,6 +85,13 @@ test('run hooks', async ({ page, mount }) => {
|
||||
expect(messages).toEqual(['Before mount: {\"route\":\"A\"}', 'After mount el: HTMLButtonElement'])
|
||||
})
|
||||
|
||||
test('unmount', async ({ page, mount }) => {
|
||||
const component = await mount(<Button title="Submit" />)
|
||||
await expect(page.locator('#root')).toContainText('Submit')
|
||||
await component.unmount();
|
||||
await expect(page.locator('#root')).not.toContainText('Submit');
|
||||
})
|
||||
|
||||
test('get textContent of the empty template', async ({ mount }) => {
|
||||
const component = await mount(<EmptyTemplate />);
|
||||
expect(await component.allTextContents()).toEqual(['']);
|
||||
|
Loading…
Reference in New Issue
Block a user