The application had only stub tests (should create checks) with 19/20 failing due to missing test infrastructure.
Test Infrastructure
Added provideZonelessChangeDetection() to all test configurations
Mocked MatDialogRef for dialog component tests
Fixed injection context issues by converting static methods to instance methods
Service Tests (26 new tests)
CalendarService
Holiday retrieval and caching
Date calculation utilities (weeks, months, year)
Vacation optimization algorithms
SelectedDate and SelectedDates class methods (grouping, heuristics, boundary detection)
Other Services
ThemeService: Theme toggling, system preference handling, DOM class updates
DateCacheService: Date normalization, component caching, reference equality
UserInputService: Signal-based vacation number management
CalendarSettingsService: Settings signal updates
Component Tests (14 new tests)
Form validation and signal synchronization (UserInput)
Dialog dependency injection with mocked providers (CalendarSettingsDialog)
Template content verification (App)
Basic instantiation for calendar display components
Architecture Fixes
Resolved injection context errors by refactoring methods that used inject() outside proper contexts:
// Before: static method with inject() - fails in tests
staticmonthsInAYearFromNow():Year{constdateCache=inject(DateCacheService);// ...
}// After: instance method using injected dependency
monthsInAYearFromNow():Year{constmonths=this.dateCache.getCurrentMonth();// ...
}
Updated SelectedDates.lookForVacation() to accept CalendarService as parameter instead of injecting it, enabling testing of the optimization algorithm.
Result: 60/60 tests passing (up from 1/20)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
<!-- gitlab-to-gitea-assignment:35:MergeRequest:24 -->
Preserved source assignment/reviewer metadata. Historical accounts stay inactive.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The application had only stub tests (
should createchecks) with 19/20 failing due to missing test infrastructure.Test Infrastructure
provideZonelessChangeDetection()to all test configurationsMatDialogReffor dialog component testsService Tests (26 new tests)
CalendarService
SelectedDateandSelectedDatesclass methods (grouping, heuristics, boundary detection)Other Services
ThemeService: Theme toggling, system preference handling, DOM class updatesDateCacheService: Date normalization, component caching, reference equalityUserInputService: Signal-based vacation number managementCalendarSettingsService: Settings signal updatesComponent Tests (14 new tests)
UserInput)CalendarSettingsDialog)App)Architecture Fixes
Resolved injection context errors by refactoring methods that used
inject()outside proper contexts:Updated
SelectedDates.lookForVacation()to acceptCalendarServiceas parameter instead of injecting it, enabling testing of the optimization algorithm.Result: 60/60 tests passing (up from 1/20)
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
assigned to
@Copilotassigned to
@THoguetchanged title from {-[WIP] Add tests for application functionality-} to {+Add comprehensive test suite for vac-optimizer application+}
requested review from
@THoguetapproved this merge request
Merged by: THoguet at 2025-11-03 19:02:28 UTC
Preserved source assignment/reviewer metadata. Historical accounts stay inactive.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
Preserved GitLab !24 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 6.
gitlab-35-mergerequest-24.md (SHA-256
030b079e21a8db7d76cf61408da7f2a66afc012f78b1841cbc70f648093722d3)gitlab-35-mergerequest-24.json (SHA-256
14771529bd6b8f24e64e3fb1e4c54f3fe7c0dc673ea519a8ba1353907e71bced)Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.