mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
16 lines
658 B
TypeScript
16 lines
658 B
TypeScript
import { test, expect } from '@playwright/experimental-ct-vue';
|
|
import Counter from '@/components/Counter.vue';
|
|
|
|
test('renderer and keep the component instance intact', async ({ mount }) => {
|
|
const component = await mount(<Counter count={9001} />);
|
|
await expect(component.locator('#rerender-count')).toContainText('9001');
|
|
|
|
await component.update(<Counter count={1337} />);
|
|
await expect(component.locator('#rerender-count')).toContainText('1337');
|
|
|
|
await component.update(<Counter count={42} />);
|
|
await expect(component.locator('#rerender-count')).toContainText('42');
|
|
|
|
await expect(component.locator('#remount-count')).toContainText('1');
|
|
});
|