> shift-cadence@0.1.0 lint /Users/eichi/World/Engine/Code/ShiftCadence
> eslint
Result: PASSED - No linting errors found.
> shift-cadence@0.1.0 typecheck /Users/eichi/World/Engine/Code/ShiftCadence
> tsc --noEmit
Result: PASSED - No TypeScript errors found.
> shift-cadence@0.1.0 test /Users/eichi/World/Engine/Code/ShiftCadence
> vitest run
[dotenv@17.2.3] injecting env (6) from .env.test -- tip: ⚙️ specify custom .env file path with { path: '/custom/path/.env' }
RUN v4.0.14 /Users/eichi/World/Engine/Code/ShiftCadence
❯ app/__tests__/shift-staffing-page.test.tsx [queued]
Test Files 0 passed (16)
Tests 0 passed (0)
Start at 18:15:13
Duration 417ms
[... extensive test output with database queries and test execution ...]
❯ app/__tests__/shift-staffing-page.test.tsx > ShiftStaffingBoard > should show staff picker when "新增" button is clicked
TestingLibraryElementError: Unable to find an element with the text: 選擇員工. This could be because the text is broken up by multiple elements.
❯ app/__tests__/shift-staffing-page.test.tsx > ShiftStaffingBoard > should handle shifts with no assigned staff
TestingLibraryElementError: Unable to find an element with the text: (content, element) => { return element?.textContent === "班次 shift-1"; }
❯ app/__tests__/shift-staffing-page.test.tsx > ShiftStaffingBoard > should handle multiple shifts in same time slot
TestingLibraryElementError: Unable to find an element with the text: (content, element) => { return element?.textContent === "班次 shift-1"; }
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > createShiftAssignment > should create a new shift assignment
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > getShiftAssignmentByShiftAndStaff > should return assignment when it exists
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > getShiftAssignmentByShiftAndStaff > should return null when assignment does not exist
error: invalid input syntax for type uuid: "non-existent-shift"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > deleteShiftAssignmentByShiftAndStaff > should delete existing assignment
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > deleteShiftAssignmentByShiftAndStaff > should return false when assignment does not exist
error: invalid input syntax for type uuid: "non-existent-shift"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > getAssignedStaffForShift > should return assigned staff from both legacy and new assignments
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > getAssignedStaffForShift > should handle duplicate assignments (legacy + new)
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > getShiftsWithAssignmentsForWeekSchedule > should return shifts with combined assignments
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
❯ app/__tests__/repositories/shift-assignments.test.ts > Shift Assignments Repository > Unique constraint behavior > should prevent duplicate assignments
error: insert or update on table "organizations" violates foreign key constraint "organizations_owner_id_fkey"
Test Files 2 failed | 14 passed (16)
Tests 13 failed | 109 passed (122)
Start at 18:15:13
Duration 28.18s (transform 199ms, setup 829ms, import 664ms, tests 22.60s, environment 3.12s)
Result: FAILED - Multiple test failures:
- UI tests failing to find elements with expected text (shift-staffing-page.test.tsx)
- Database constraint violations in shift-assignments.test.ts
- Invalid UUID syntax errors
> shift-cadence@0.1.0 build /Users/eichi/World/Engine/Code/ShiftCadence
> next build
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
▲ Next.js 16.0.5 (Turbopack)
- Environments: .env.local, .env
Creating an optimized production build ...
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
✓ Compiled successfully in 1665.1ms
✓ Finished TypeScript in 1589.2ms TypeScript .. Running TypeScript ... Running TypeScript . Running TypeScript .. Running TypeScript ... Running TypeScript . Running TypeScript .. Finished TypeScript in 1589.2ms . Finished TypeScript in 1589.2ms
Collecting page data using 9 workers .[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
<previous line repeated 7 additional times>
✓ Collecting page data using 9 workers in 310.4ms cting page data using 9 workers in 310.4ms
Generating static pages using 9 workers (0/13) [ ][baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
✓ Generating static pages using 9 workers (13/13) in 262.1ms
✓ Finalizing page optimization in 5.6ms lizing page optimization in 5.6ms
Route (app)
┌ ○ /
├ ○ /_not-found
├ ƒ /api/auth/[...nextauth]
├ ƒ /availability/[token]
├ ƒ /dashboard
├ ƒ /dashboard/locations
├ ƒ /dashboard/locations/[id]
├ ƒ /dashboard/locations/new
├ ƒ /dashboard/organizations
├ ƒ /dashboard/organizations/[id]
├ ƒ /dashboard/organizations/new
├ ƒ /dashboard/schedules
├ ƒ /dashboard/schedules/[weekScheduleId]/coverage
├ ƒ /dashboard/schedules/[weekScheduleId]/staffing
├ ƒ /dashboard/staff
├ ƒ /dashboard/staff/[id]
├ ƒ /dashboard/staff/new
└ ƒ /signin
ƒ Proxy (Middleware)
○ (Static) prerendered as static content
ƒ (Dynamic) server-rendered on demand
Result: PASSED - Build succeeded with warnings about outdated baseline-browser-mapping dependency.
- Lint: PASSED
- Typecheck: PASSED
- Test: FAILED (13 test failures)
- Build: PASSED (with warnings)
Next steps needed:
- Fix UI test failures in shift-staffing-page.test.tsx
- Fix database constraint violations in shift-assignments.test.ts
- Update baseline-browser-mapping dependency to silence build warnings