[ui] Sunrise: The garden names the real sunrise from sunset until it comes

This commit is contained in:
2026-11-17 18:52:56 +01:00
parent e0a3b66dc8
commit 0c4f5bb556
9 changed files with 137 additions and 16 deletions
+8
View File
@@ -91,6 +91,14 @@ describe('the in-game sunset (chair-sunset.md)', () => {
expect(screen.queryByRole('dialog')).toBeNull();
});
it('late in the evening its words still name the real sunset, never the sunrise (sunrise.md R4)', async () => {
const late = Date.parse('2026-03-29T22:00:00+02:00');
const scene = await openScene({ now: () => late });
vi.advanceTimersByTime(SUNSET_MS);
await tick();
expect(within(scene).getByText(/^Tomorrow the sun sets at .* in Brno\.$/)).toBeTruthy();
});
it('with no town and no guess, the words after it ask for a town', async () => {
const scene = await openScene({ guess: null, load: async () => ({ kind: 'device-zone' }) });
vi.advanceTimersByTime(SUNSET_MS);