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): component as slot (#18090)
sand4rt3460f01b47dc
diff --git a/tests/components/ct-react-vite/src/tests.spec.tsx b/tests/components/ct-react-vite/src/tests.spec.tsxindex a639055656..22e28a73ab 100644--- a/tests/components/ct-react-vite/src/tests.spec.tsx+++ b/tests/components/ct-react-vite/src/tests.spec.tsx@@ -70,6 +70,13 @@ test('render a default child', async ({ mount }) => {await expect(component).toContainText('Main Content')})+test('render a component as slot', async ({ mount }) => {+ const component = await mount(<DefaultChildren>+ <Button title="Submit" />+ </DefaultChildren>)+ await expect(component).toContainText('Submit')+});+test('render multiple children', async ({ mount }) => {const component = await mount(<DefaultChildren><div id="one">One</div>diff --git a/tests/components/ct-react/src/tests.spec.tsx b/tests/components/ct-react/src/tests.spec.tsxindex 3f2eede57b..a74c5b7133 100644--- a/tests/components/ct-react/src/tests.spec.tsx+++ b/tests/components/ct-react/src/tests.spec.tsx@@ -73,6 +73,13 @@ test('render a default child', async ({ mount }) => {await expect(component).toContainText('Main Content')})+test('render a component as slot', async ({ mount }) => {+ const component = await mount(<DefaultChildren>+ <Button title="Submit" />+ </DefaultChildren>)+ await expect(component).toContainText('Submit')+})+test('render multiple children', async ({ mount }) => {const component = await mount(<DefaultChildren><div id="one">One</div>diff --git a/tests/components/ct-solid/src/tests.spec.tsx b/tests/components/ct-solid/src/tests.spec.tsxindex d2b4793450..f1b03033be 100644--- a/tests/components/ct-solid/src/tests.spec.tsx+++ b/tests/components/ct-solid/src/tests.spec.tsx@@ -98,6 +98,14 @@ test('render multiple children', async ({ mount }) => {await expect(component.locator('#two')).toContainText('Two');});++test('render a component as slot', async ({ mount }) => {+ const component = await mount(<DefaultChildren>+ <Button title="Submit" />+ </DefaultChildren>)+ await expect(component).toContainText('Submit')+});+test('render named children', async ({ mount }) => {const component = await mount(<MultipleChildren>diff --git a/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx b/tests/components/ct-vue-cli/src/notation-jsx.spec.tsxindex b21002e3cc..27143b444e 100644--- a/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx+++ b/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx@@ -46,6 +46,13 @@ test('render a default slot', async ({ mount }) => {await expect(component).toContainText('Main Content')})+test('render a component as slot', async ({ mount }) => {+ const component = await mount(<DefaultSlot>+ <Button title="Submit" />+ </DefaultSlot>)+ await expect(component).toContainText('Submit')+});+test('render a component with multiple children', async ({ mount }) => {const component = await mount(<DefaultSlot><div id="one">One</div>diff --git a/tests/components/ct-vue-vite/src/notation-jsx.spec.tsx b/tests/components/ct-vue-vite/src/notation-jsx.spec.tsxindex 0610f52536..0ad4d8bc48 100644--- a/tests/components/ct-vue-vite/src/notation-jsx.spec.tsx+++ b/tests/components/ct-vue-vite/src/notation-jsx.spec.tsx@@ -75,6 +75,13 @@ test('render a default slot', async ({ mount }) => {await expect(component.getByRole('strong')).toContainText('Main Content')})+test('render a component as slot', async ({ mount }) => {+ const component = await mount(<DefaultSlot>+ <Button title="Submit" />+ </DefaultSlot>)+ await expect(component).toContainText('Submit')+});+test('render a component with multiple slots', async ({ mount }) => {const component = await mount(<DefaultSlot><div data-testid="one">One</div>diff --git a/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx b/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsxindex 087d96b31e..a3819fcd0e 100644--- a/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx+++ b/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx@@ -76,6 +76,13 @@ test('render a default slot', async ({ mount }) => {await expect(component).toContainText('Main Content')})+test('render a component as slot', async ({ mount }) => {+ const component = await mount(<DefaultSlot>+ <Button title="Submit" />+ </DefaultSlot>)+ await expect(component).toContainText('Submit')+});+test('render a component with multiple slots', async ({ mount }) => {const component = await mount(<DefaultSlot><div id="one">One</div>