fix: Update Context Vue tests to use GUID format instead of numeric IDs (#290)
Commit: f31ff1af9c2166f4796c86f2218150bf99c38600
Date: 2025-09-03 12:48:40 +0200
Author: PascalHavelange
Commit Message
fix: Update Context Vue tests to use GUID format instead of numeric IDs (#290)
* Fix Context Vue tests: Convert from Language-style numeric IDs to Project-style GUIDs
- Replace all numeric/3-character IDs with GUID format in Context test files
- Fix spy expectation failures by replacing with result-based testing
- Add missing PencilIcon mocks in integration tests
- Update route paths from /contexts/1 to /contexts/{guid} format
- Resolve ID format inconsistencies between Language and Context components
- All Context tests now pass (102/102) with proper GUID ID handling
Affected files:
- ContextDetail.test.ts: Basic unit tests with GUID IDs
- ContextDetailIntegration.test.ts: Component integration tests
- ContextDetailLogic.test.ts: Business logic with proper ID formats
- ContextIntegration.test.ts: End-to-end integration testing
- ContextsLogic.test.ts: List component business logic
- ContextDetailResource.integration.test.ts: Resource workflow tests
* fix: Update Context Vue tests to use GUID format instead of numeric IDs
- Update Context tests to follow Project pattern with GUID IDs
- Standardize ID formats across test utilities (test-utils.ts)
- Add missing HeroIcons mocks (CheckIcon, XMarkIcon)
- Replace ALL numeric IDs in test logic across multiple files
- Implement Context "set default" functionality with GUID format
- Ensure consistency between Context and Project test patterns
- Maintain 3-character lowercase codes for Language/Country entities
Resolves inconsistent ID format usage in Vue test files.
All 1,335 tests now pass with proper GUID format throughout.
---------
Co-authored-by: Pascal HAVELANGE <havelangep@hotmail.com>
Files Changed
- 📝 Modified:
.env.local.example
- 📝 Modified:
.github/copilot-instructions.md
- ✅ Added:
.github/environment.instructions.md
- ✅ Added:
.github/github_page.instructions.md
- ✅ Added:
.github/laravel.instructions.md
- ✅ Added:
.github/lint.instructions.md
- ✅ Added:
.github/php.instructions.md
- ✅ Added:
.github/project.instructions.md
- ✅ Added:
.github/ps1.instructions.md
- ✅ Added:
.github/source-control.instructions.md
- ✅ Added:
.github/test-php.instructions.md
- ✅ Added:
.github/test-vuejs.instructions.md
- ✅ Added:
.github/ts.instructions.md
- ✅ Added:
.github/vue.instructions.md
- 📝 Modified:
CHANGELOG.md
- 📝 Modified:
resources/js/__tests__/test-utils.ts
- 📝 Modified:
resources/js/views/ContextDetail.vue
- 📝 Modified:
resources/js/views/Contexts.vue
- ✅ Added:
resources/js/views/__tests__/ContextDetail.test.ts
- ✅ Added:
resources/js/views/__tests__/ContextDetailIntegration.test.ts
- ✅ Added:
resources/js/views/__tests__/ContextDetailLogic.test.ts
- ✅ Added:
resources/js/views/__tests__/ContextDetailResource.integration.test.ts
- ✅ Added:
resources/js/views/__tests__/ContextIntegration.test.ts
- 📝 Modified:
resources/js/views/__tests__/ContextResource.integration.test.ts
- 📝 Modified:
resources/js/views/__tests__/Contexts.test.ts
- 📝 Modified:
resources/js/views/__tests__/ContextsLogic.test.ts
- 📝 Modified:
resources/js/views/__tests__/ProjectDetail.test.ts
- 📝 Modified:
resources/js/views/__tests__/ProjectDetailLogic.test.ts
- 📝 Modified:
resources/js/views/__tests__/ProjectDetailResource.integration.test.ts
- 📝 Modified:
resources/js/views/__tests__/ProjectIntegration.test.ts
- 📝 Modified:
resources/js/views/__tests__/ProjectResource.integration.test.ts
- 📝 Modified:
resources/js/views/__tests__/Projects.test.ts
- 📝 Modified:
resources/js/views/__tests__/ProjectsLogic.test.ts
Links
This documentation was automatically generated from Git commit data.