mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
26 lines
851 B
TypeScript
26 lines
851 B
TypeScript
import { test, expect } from '@playwright/experimental-ct-vue2';
|
|
import Button from '@/components/Button.vue';
|
|
import Component from '@/components/Component.vue';
|
|
import EmptyTemplate from '@/components/EmptyTemplate.vue';
|
|
|
|
test('render props', async ({ mount }) => {
|
|
const component = await mount(Button, {
|
|
props: {
|
|
title: 'Submit',
|
|
},
|
|
});
|
|
await expect(component).toContainText('Submit');
|
|
});
|
|
|
|
test('render a component without options', async ({ mount }) => {
|
|
const component = await mount(Component);
|
|
await expect(component).toContainText('test');
|
|
});
|
|
|
|
test('get textContent of the empty template', async ({ mount }) => {
|
|
const component = await mount(EmptyTemplate);
|
|
expect(await component.allTextContents()).toEqual(['']);
|
|
expect(await component.textContent()).toBe('');
|
|
await expect(component).toHaveText('');
|
|
});
|