From 6a45d86b6f1cab4304016acaf571ecd6057b2d7d Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Sat, 16 May 2026 11:57:41 +0200 Subject: [PATCH] feat(v2): boot /v2/dashboard through OrganizerLayoutV2 + AppShellV2 Replaces the Task 3 stub in pages-v2/dashboard.vue with the boot-proof page (data-testid v2-dashboard, correct definePage meta). Adds the Playwright CT smoke (appshell-boot.spec.ts) that mounts AppShellV2 in Chromium and asserts both the shell root and slot content are visible; uses page scope for the root-element assertion (CT component locator only matches descendants, not the root itself). Full Plan-1 gate green: typecheck 0 new errors, eslint clean, 5 vitest files / 21 tests + 2 component tests, vite build succeeded, typed-router has v2-dashboard. Co-Authored-By: Claude Opus 4.7 --- apps/app/src/pages-v2/dashboard.vue | 14 +++++++++++--- .../playwright-ct/v2/appshell-boot.spec.ts | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 apps/app/tests/playwright-ct/v2/appshell-boot.spec.ts diff --git a/apps/app/src/pages-v2/dashboard.vue b/apps/app/src/pages-v2/dashboard.vue index 4a82305b..1724a8f8 100644 --- a/apps/app/src/pages-v2/dashboard.vue +++ b/apps/app/src/pages-v2/dashboard.vue @@ -1,9 +1,17 @@ diff --git a/apps/app/tests/playwright-ct/v2/appshell-boot.spec.ts b/apps/app/tests/playwright-ct/v2/appshell-boot.spec.ts new file mode 100644 index 00000000..66ef026c --- /dev/null +++ b/apps/app/tests/playwright-ct/v2/appshell-boot.spec.ts @@ -0,0 +1,19 @@ +import { expect, test } from '@playwright/experimental-ct-vue' +import AppShellV2 from '@/layouts/components/AppShellV2.vue' + +// Pinia is set up globally by playwright/index.ts's beforeMount hook +// (createPinia per test). We do NOT use @pinia/testing's +// createTestingPinia here: it requires Vitest's `vi.fn`, which is +// absent in Playwright's Node runtime. See playwright/index.ts §Pinia. + +test('AppShellV2 mounts and renders content in the CT runner', async ({ mount, page }) => { + await mount(AppShellV2, { + slots: { default: '
v2 foundation OK
' }, + }) + + // `data-testid="appshell-v2"` is on the component's own root element, + // so we query the page rather than the component locator (which only + // matches descendants of the root, not the root itself in CT). + await expect(page.getByTestId('appshell-v2')).toBeVisible() + await expect(page.getByTestId('v2-dashboard')).toContainText('v2 foundation OK') +})