Fix Vespers status wrongly saying "Second Vespers" when a Sunday anticipates it
Deploy / deploy (push) Successful in 1m29s
Deploy / deploy (push) Successful in 1m29s
getVespersStatusLabel detected First-Vespers anticipation only via winner.vespersFrom, a tag only ever set for a sanctoral tomorrow-winner (tagVespersFrom). When Vespers anticipates a Sunday that wins its own day outright (a temporal winner, e.g. 2026-08-29 anticipating 2026-08-30 since the Decollation of St. John Baptist is below the duplex-2-classis floor that would let it keep its own evening), the tag never gets set and the status wrongly read "Second Vespers (of today)" even though the whole page was showing tomorrow's identity. Comparing the resolved day's date against the originally-requested date detects anticipation uniformly regardless of winner kind, so this drops the vespersFrom dependency entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ME8QNPdEmHSbSx1r6VmDRG
This commit is contained in:
@@ -69,6 +69,24 @@ describe('shell', () => {
|
||||
expect(root.querySelector('.day-nav-vespers-status')?.textContent).toContain('Second Vespers');
|
||||
});
|
||||
|
||||
it('shows First Vespers and the Sunday leading the header when Vespers anticipates a Sunday that wins outright (temporal, not sanctoral, winner)', () => {
|
||||
// Regression test: getVespersStatusLabel used to detect anticipation
|
||||
// only via a tag that's only ever set for a *sanctoral* tomorrow-
|
||||
// winner (see the equivalent calendar-level test in
|
||||
// tests/calendar/day-label.test.ts) -- 2026-08-29 (the Decollation of
|
||||
// St. John Baptist, Duplex) anticipates 2026-08-30's ordinary Sunday,
|
||||
// which wins outright over Ss. Felix and Adauctus (Simplex), so
|
||||
// tomorrow's winner is `temporal`, not `sanctoral`.
|
||||
setDate('2026-08-29');
|
||||
setSelectedHour('vespers');
|
||||
window.history.replaceState(null, '', '/vu/2026-08-29/vespers');
|
||||
const root = document.getElementById('app')!;
|
||||
mountShell(root);
|
||||
|
||||
expect(root.querySelector('.day-nav-label')?.textContent).toContain('13th Sunday after Trinity');
|
||||
expect(root.querySelector('.day-nav-vespers-status')?.textContent).toContain('First Vespers');
|
||||
});
|
||||
|
||||
it('switches to Matins and shows its real content, not the pending message', () => {
|
||||
const root = document.getElementById('app')!;
|
||||
mountShell(root);
|
||||
|
||||
Reference in New Issue
Block a user