refactor(gui-v2): delete X.vue stub, repoint 2 boundary refs to StatusTag, add shared/* regression locks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 13:48:21 +02:00
parent 237afc89e6
commit 1a66ac6e64
2 changed files with 36 additions and 12 deletions

View File

@@ -1,10 +0,0 @@
<script setup lang="ts">
// Boundary-test placeholder — do not import in production code.
// Exists so eslint-plugin-boundaries can resolve @/components-v2/shared/X.vue
// in unit tests (the resolver skips unresolvable imports).
// TODO TECH-WS-GUI-REDESIGN: replace with real shared components.
</script>
<template>
<div />
</template>

View File

@@ -32,7 +32,7 @@ describe('boundaries — v2 zones', () => {
it('allows pages-v2 → components-v2', async () => { it('allows pages-v2 → components-v2', async () => {
const errs = await boundaryErrors( const errs = await boundaryErrors(
'src/pages-v2/dashboard.vue', 'src/pages-v2/dashboard.vue',
'<script setup lang="ts">import X from \'@/components-v2/shared/X.vue\'</script><template><X /></template>', '<script setup lang="ts">import StatusTag from \'@/components-v2/shared/StatusTag.vue\'</script><template><StatusTag status="approved" /></template>',
) )
expect(errs).toHaveLength(0) expect(errs).toHaveLength(0)
@@ -62,7 +62,7 @@ describe('boundaries — v2 zones', () => {
it('forbids v1 components → components-v2 (no back-porting)', async () => { it('forbids v1 components → components-v2 (no back-porting)', async () => {
const errs = await boundaryErrors( const errs = await boundaryErrors(
'src/components/organizer/Legacy.vue', 'src/components/organizer/Legacy.vue',
'<script setup lang="ts">import X from \'@/components-v2/shared/X.vue\'</script><template><X /></template>', '<script setup lang="ts">import StatusTag from \'@/components-v2/shared/StatusTag.vue\'</script><template><StatusTag status="approved" /></template>',
) )
expect(errs.length).toBeGreaterThan(0) expect(errs.length).toBeGreaterThan(0)
@@ -101,4 +101,38 @@ describe('boundaries — v2 zones', () => {
expect(errs.length).toBeGreaterThan(0) expect(errs.length).toBeGreaterThan(0)
}) })
// -------------------------------------------------------------------------
// shared/* regression-lock cases: lock the allowed/forbidden edges for
// components-v2/shared so future drift is caught by CI (constraint #7
// intent served by regression tests instead of a redundant sub-zone —
// Bert-approved plan decision, Phase C gate).
// -------------------------------------------------------------------------
it('allows components-v2/shared → types (statusSeverity consumes enums)', async () => {
const errs = await boundaryErrors(
'src/components-v2/shared/StatusTag.vue',
'<script setup lang="ts">import { ShiftAssignmentStatus } from \'@/types/shiftAssignment\'</script><template><span>{{ ShiftAssignmentStatus.APPROVED }}</span></template>',
)
expect(errs).toHaveLength(0)
})
it('forbids components-v2/shared → pages-v2 (no upward import)', async () => {
const errs = await boundaryErrors(
'src/components-v2/shared/StatusTag.vue',
'<script setup lang="ts">import Dash from \'@/pages-v2/dashboard.vue\'</script><template><Dash /></template>',
)
expect(errs.length).toBeGreaterThan(0)
})
it('forbids components-v2/shared → layouts (no upward import)', async () => {
const errs = await boundaryErrors(
'src/components-v2/shared/StatusTag.vue',
'<script setup lang="ts">import L from \'@/layouts/OrganizerLayoutV2.vue\'</script><template><L /></template>',
)
expect(errs.length).toBeGreaterThan(0)
})
}) })