Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test(ct): vue unmount (#17218)
sand4rt7be3e5cb82e2
diff --git a/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx b/tests/components/ct-vue-cli/src/notation-jsx.spec.tsxindex 1c275378eb..313092b1b6 100644--- a/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx+++ b/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx@@ -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')diff --git a/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx b/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsxindex ba3be167cf..a5fe871669 100644--- a/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx+++ b/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx@@ -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(['']);