Files
crewli/apps/app/package.json
bert.hausmans 5f135ec2b9 test: add mountWithVuexy helper, install axe-core, segment vitest configs
Foundation for the upcoming component / integration / a11y tests.

vitest.config.ts now declares two projects:
  - "unit"      — pure-logic tests under tests/unit/, src/**/__tests__/,
                  and tests/*.spec.ts (the legacy sanity test).
                  happy-dom, no Vuetify, fast path.
  - "component" — tests under tests/component/, tests/integration/,
                  tests/a11y/. jsdom, Vuetify inlined via SSR noExternal,
                  CSS imports processed (so :root token sheet loads), and
                  no global vue-router mock so the real router can run.

Both share the same alias map and AutoImport bag.

tests/utils/mountWithVuexy.ts (new):
  - Real Vuetify with the Crewli theme tokens
  - createTestingPinia (actions execute by default; stubActions opt-in)
  - vue-router with memory history at the configured initialPath + ?query
  - Fresh QueryClient per call (zero cross-test cache leak)
  - Notification mock injected via Pinia plugin so any useNotificationStore()
    resolves to { show: vi.fn(), hide: vi.fn() } — matches the actual
    NotificationStore API surface (per Phase A finding A4)
  - Imports `@/styles/tokens/_timetable.css` at module load so JSDOM resolves
    var(--tt-…) when components call getComputedStyle()

tests/setup.component.ts (new):
  - vitest-axe matcher registration
  - JSDOM polyfills: scrollIntoView, ResizeObserver, visualViewport, body
    bounding rect — Vuetify menus / overlays would crash without them
  - Deterministic crypto polyfill (mirrors tests/setup.ts so
    generateIdempotencyKey() is stable, but without the router mock)

tests/component/_smoke.test.ts (new):
  - Mounts a trivial component → asserts wrapper, queryClient, pinia,
    router, notificationMock all populated
  - Calls getComputedStyle(documentElement).getPropertyValue('--tt-status-confirmed-bg')
    → asserts '#e8f8f0' (proves the CSS token sheet really loaded)

devDependencies added: jsdom, axe-core, vitest-axe, @pinia/testing.

Total: 319 → 321 tests; 42 → 43 files. Both projects green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 03:27:31 +02:00

170 lines
5.4 KiB
JSON

{
"name": "crewli-app",
"version": "9.5.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 5050",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint . -c .eslintrc.cjs --ext .ts,.js,.cjs,.vue,.tsx,.jsx",
"lint:fix": "eslint . -c .eslintrc.cjs --fix --ext .ts,.js,.cjs,.vue,.tsx,.jsx",
"build:icons": "tsx src/plugins/iconify/build-icons.ts",
"msw:init": "msw init public/ --save",
"postinstall": "npm run build:icons && npm run msw:init",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@casl/ability": "6.7.3",
"@casl/vue": "2.2.2",
"@floating-ui/dom": "1.6.8",
"@sentry/vue": "10.52.0",
"@sindresorhus/is": "7.1.0",
"@tanstack/vue-query": "^5.95.2",
"@tiptap/extension-highlight": "^2.27.1",
"@tiptap/extension-image": "^2.27.1",
"@tiptap/extension-link": "^2.27.1",
"@tiptap/extension-text-align": "^2.27.1",
"@tiptap/pm": "^2.27.1",
"@tiptap/starter-kit": "^2.27.1",
"@tiptap/vue-3": "^2.27.1",
"@vueuse/core": "10.11.1",
"@vueuse/math": "10.11.1",
"apexcharts": "3.54.1",
"axios": "^1.15.0",
"chart.js": "4.5.1",
"cookie-es": "1.2.2",
"destr": "2.0.5",
"eslint-plugin-regexp": "2.10.0",
"flatpickr": "^4.6.13",
"jwt-decode": "4.0.0",
"mapbox-gl": "3.5.2",
"ofetch": "1.5.0",
"pinia": "3.0.3",
"prismjs": "1.30.0",
"qrcode": "^1.5.4",
"roboto-fontface": "0.10.0",
"shepherd.js": "13.0.3",
"ufo": "1.6.1",
"unplugin-vue-define-options": "1.5.5",
"vue": "3.5.22",
"vue-chartjs": "5.3.2",
"vue-flatpickr-component": "11.0.5",
"vue-i18n": "11.1.12",
"vue-prism-component": "2.0.0",
"vue-router": "4.5.1",
"vue3-apexcharts": "1.5.3",
"vue3-perfect-scrollbar": "2.0.0",
"vuedraggable": "^4.1.0",
"vuetify": "3.10.8",
"webfontloader": "1.6.28",
"zod": "3"
},
"devDependencies": {
"@antfu/eslint-config-basic": "0.43.1",
"@antfu/eslint-config-ts": "0.43.1",
"@antfu/eslint-config-vue": "0.43.1",
"@antfu/utils": "0.7.10",
"@fullcalendar/core": "6.1.19",
"@fullcalendar/daygrid": "6.1.19",
"@fullcalendar/interaction": "6.1.19",
"@fullcalendar/list": "6.1.19",
"@fullcalendar/timegrid": "6.1.19",
"@fullcalendar/vue3": "6.1.19",
"@iconify-json/fa": "1.2.2",
"@iconify-json/mdi": "1.2.3",
"@iconify-json/tabler": "1.2.23",
"@iconify/tools": "4.1.4",
"@iconify/types": "^2.0.0",
"@iconify/utils": "2.3.0",
"@iconify/vue": "4.1.2",
"@intlify/unplugin-vue-i18n": "11.0.1",
"@pinia/testing": "^1.0.3",
"@stylistic/eslint-plugin-js": "0.0.4",
"@stylistic/eslint-plugin-ts": "0.0.4",
"@stylistic/stylelint-config": "1.0.1",
"@stylistic/stylelint-plugin": "2.1.3",
"@testing-library/vue": "^8.1.0",
"@tiptap/extension-character-count": "^2.27.1",
"@tiptap/extension-placeholder": "^2.27.1",
"@tiptap/extension-subscript": "^2.27.1",
"@tiptap/extension-superscript": "^2.27.1",
"@tiptap/extension-underline": "^2.27.1",
"@total-typescript/ts-reset": "^0.6.1",
"@types/mapbox-gl": "3.4.1",
"@types/node": "24.9.2",
"@types/qrcode": "^1.5.6",
"@types/webfontloader": "1.6.38",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@vitejs/plugin-vue": "6.0.1",
"@vitejs/plugin-vue-jsx": "5.1.1",
"@vue/test-utils": "^2.4.9",
"axe-core": "^4.11.4",
"baseline-browser-mapping": "^2.10.16",
"eslint": "8.57.1",
"eslint-config-airbnb-base": "15.0.0",
"eslint-import-resolver-typescript": "3.10.1",
"eslint-plugin-antfu": "0.43.1",
"eslint-plugin-boundaries": "6.0.2",
"eslint-plugin-case-police": "0.6.1",
"eslint-plugin-es-x": "7.8.0",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "7.1.0",
"eslint-plugin-i": "2.28.1",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-jsdoc": "46.10.1",
"eslint-plugin-jsonc": "2.21.0",
"eslint-plugin-markdown": "3.0.1",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-no-only-tests": "3.3.0",
"eslint-plugin-promise": "6.6.0",
"eslint-plugin-regex": "1.10.0",
"eslint-plugin-sonarjs": "0.24.0",
"eslint-plugin-unicorn": "51.0.1",
"eslint-plugin-unused-imports": "3.2.0",
"eslint-plugin-vue": "9.33.0",
"eslint-plugin-yml": "1.19.0",
"happy-dom": "^20.9.0",
"jsdom": "^29.1.1",
"msw": "2.6.8",
"postcss-html": "1.8.0",
"postcss-scss": "4.0.9",
"sass": "1.76.0",
"shiki": "1.29.2",
"stylelint": "16.8.0",
"stylelint-config-idiomatic-order": "10.0.0",
"stylelint-config-standard-scss": "13.1.0",
"stylelint-use-logical-spec": "5.0.1",
"tsx": "4.20.6",
"type-fest": "5.1.0",
"typescript": "5.9.3",
"unplugin-auto-import": "0.18.6",
"unplugin-vue-components": "0.27.5",
"unplugin-vue-router": "0.8.8",
"vite": "7.1.12",
"vite-plugin-vue-devtools": "8.0.2",
"vite-plugin-vue-meta-layouts": "0.6.1",
"vite-plugin-vuetify": "2.1.2",
"vite-svg-loader": "5.1.0",
"vitest": "^4.1.5",
"vitest-axe": "^0.1.0",
"vue-eslint-parser": "9.4.3",
"vue-shepherd": "3.0.0",
"vue-tsc": "3.1.2"
},
"resolutions": {
"postcss": "^8",
"@tiptap/core": "^2"
},
"overrides": {
"postcss": "^8",
"@tiptap/core": "^2"
},
"msw": {
"workerDirectory": "public"
}
}