diff --git a/tests/components/ct-vue-vite/playwright.config.ts b/tests/components/ct-vue-vite/playwright.config.ts
index 84d5f1a57b..a60d9697c5 100644
--- a/tests/components/ct-vue-vite/playwright.config.ts
+++ b/tests/components/ct-vue-vite/playwright.config.ts
@@ -15,14 +15,22 @@
*/
import { type PlaywrightTestConfig, devices } from '@playwright/experimental-ct-vue';
+import { resolve } from 'path';
const config: PlaywrightTestConfig = {
- testDir: 'src',
+ testDir: 'tests',
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: 'html',
use: {
- trace: 'on-first-retry'
+ trace: 'on-first-retry',
+ ctViteConfig: {
+ resolve: {
+ alias: {
+ '@': resolve(__dirname, './src'),
+ }
+ }
+ }
},
projects: [
{
diff --git a/tests/components/ct-vue-vite/src/notation-jsx.spec.tsx b/tests/components/ct-vue-vite/src/notation-jsx.spec.tsx
deleted file mode 100644
index 1b38f83212..0000000000
--- a/tests/components/ct-vue-vite/src/notation-jsx.spec.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-import { test, expect } from '@playwright/experimental-ct-vue'
-import App from './App.vue';
-import Button from './components/Button.vue'
-import Counter from './components/Counter.vue'
-import DefaultSlot from './components/DefaultSlot.vue'
-import NamedSlots from './components/NamedSlots.vue'
-import MultiRoot from './components/MultiRoot.vue'
-import EmptyTemplate from './components/EmptyTemplate.vue'
-import type { HooksConfig } from '../playwright'
-
-test.use({ viewport: { width: 500, height: 500 } })
-
-test('render props', async ({ mount }) => {
- const component = await mount()
- await expect(component).toContainText('Submit')
-})
-
-test('render attributes', async ({ mount }) => {
- const component = await mount()
- await expect(component).toHaveClass('primary');
-});
-
-test('update props without remounting', async ({ mount }) => {
- const component = await mount()
- await expect(component.locator('#props')).toContainText('9001')
-
- await component.update()
- await expect(component).not.toContainText('9001')
- await expect(component.locator('#props')).toContainText('1337')
-
- await expect(component.locator('#remount-count')).toContainText('1')
-})
-
-test('update event listeners without remounting', async ({ mount }) => {
- const component = await mount()
-
- const messages: string[] = []
- await component.update( {
- messages.push(count)
- }} />)
- await component.click();
- expect(messages).toEqual(['hello'])
-
- await expect(component.locator('#remount-count')).toContainText('1')
-})
-
-test('update slots without remounting', async ({ mount }) => {
- const component = await mount(Default Slot)
- await expect(component).toContainText('Default Slot')
-
- await component.update(
- Test Slot
- )
- await expect(component).not.toContainText('Default Slot')
- await expect(component).toContainText('Test Slot')
-
- await expect(component.locator('#remount-count')).toContainText('1')
-})
-
-test('emit an submit event when the button is clicked', async ({ mount }) => {
- const messages: string[] = []
- const component = await mount(