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:
@@ -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>
|
||||
@@ -32,7 +32,7 @@ describe('boundaries — v2 zones', () => {
|
||||
it('allows pages-v2 → components-v2', async () => {
|
||||
const errs = await boundaryErrors(
|
||||
'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)
|
||||
@@ -62,7 +62,7 @@ describe('boundaries — v2 zones', () => {
|
||||
it('forbids v1 components → components-v2 (no back-porting)', async () => {
|
||||
const errs = await boundaryErrors(
|
||||
'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)
|
||||
@@ -101,4 +101,38 @@ describe('boundaries — v2 zones', () => {
|
||||
|
||||
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)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user