[ui] DomiUi: Rosea's buttons and town search on @domi/ui v1.0.4 (CPAL-1.0, vendored by its own tool into packages/domi-ui), the licence credit at the foot of every screen, the README's copy line and public-domain sources; before-and-after pictures by pnpm look:shots

This commit is contained in:
2026-11-23 00:59:50 +01:00
parent 295e6ba59a
commit 8018268821
79 changed files with 8554 additions and 222 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/sv
import { afterEach, describe, expect, it, vi } from 'vitest';
import Shell from '../src/Shell.svelte';
import { en } from '../src/copy/en.js';
import { said } from './said.js';
import type { SunsetChoice, SunsetWiring } from '../src/sunset/types.js';
const brno: NamedPlace = { name: 'Brno', region: '', country: 'Czechia', lat: 49.2, lon: 16.61, timeZone: 'Europe/Prague' };
@@ -48,7 +49,7 @@ describe('the garden asks where the sunset is', () => {
const w = wiring();
render(Shell, { sunset: w });
await fireEvent.input(await screen.findByRole('searchbox'), { target: { value: 'br' } });
expect(await screen.findByRole('status')).toHaveProperty('textContent', en.sunset.found(1));
await waitFor(() => expect(said().textContent).toBe(en.sunset.found(1)));
await fireEvent.click(screen.getByRole('button', { name: /Brno/ }));
const at = invitation(sunDay('2026-03-29', brno));
@@ -61,7 +62,7 @@ describe('the garden asks where the sunset is', () => {
it('nothing found says a larger town nearby will do, never an error', async () => {
render(Shell, { sunset: wiring() });
await fireEvent.input(await screen.findByRole('searchbox'), { target: { value: 'zz' } });
await waitFor(() => expect(screen.getByRole('status').textContent).toBe(en.sunset.found(0)));
await waitFor(() => expect(said().textContent).toBe(en.sunset.found(0)));
});
it('"not now" uses the guess, saves the device zone, and says it is a guess', async () => {