[tauri] TauriPlatforms: Bring main (the sunrise, Coyhaique) into the branch
# Conflicts: # .agents/GAP_ANALYSIS.md # .agents/lessons/README.md # .agents/lessons/technical.md
This commit is contained in:
+15
-1
@@ -3,7 +3,7 @@ import { expect, test, type Page } from '@playwright/test';
|
||||
import { PRODUCT_NAME } from '@rosea/schema';
|
||||
import { en } from '@rosea/ui/copy';
|
||||
import { parseLetter } from '@rosea/ui/letter';
|
||||
import { nextInvitation } from '@rosea/engine';
|
||||
import { nextInvitation, nextSunEvent } from '@rosea/engine';
|
||||
import { searchTowns } from '@rosea/content/places';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { BASE, startStaticServer, type StaticServer } from './static-server.js';
|
||||
@@ -163,6 +163,20 @@ test.describe('the sunset place, in Prague\'s time zone at noon on 29 March 2026
|
||||
expect(requests.some((url) => /\/assets\/places-.*\.js$/.test(url))).toBe(true);
|
||||
});
|
||||
|
||||
test('at five in the morning the garden names the sunrise, not the sunset (sunrise.md)', async ({ page }) => {
|
||||
const early = Date.parse('2026-03-29T05:00:00+02:00');
|
||||
await page.clock.setFixedTime(early);
|
||||
await open(page);
|
||||
await page.getByRole('searchbox', { name: en.sunset.searchLabel }).fill('brno');
|
||||
await page.getByRole('button', { name: /^Brno/ }).first().click();
|
||||
const brno = searchTowns('brno')[0]!;
|
||||
const { at } = nextSunEvent(early, brno);
|
||||
const time = new Intl.DateTimeFormat('en-US', { hour: 'numeric', minute: '2-digit', timeZone: brno.timeZone }).format(at);
|
||||
const line = page.locator('.sun p').first();
|
||||
await expect(line).toHaveText(/^The sun rises at .* in Brno\.$/);
|
||||
expect(spaced((await line.textContent()) ?? '')).toBe(spaced(en.sunset.rises(time, 'Brno')));
|
||||
});
|
||||
|
||||
test('"not now" guesses Prague from the device\'s zone and says it is a guess', async ({ page }) => {
|
||||
await page.clock.setFixedTime(NOON);
|
||||
await open(page);
|
||||
|
||||
Reference in New Issue
Block a user