[ui] Thorns: Touch her over her picture; Gently. I have thorns.

This commit is contained in:
2026-11-02 09:33:23 +01:00
parent ae1169ed6a
commit 1070017d2c
4 changed files with 190 additions and 5 deletions
+18
View File
@@ -214,6 +214,24 @@ test.describe('the rose, in Prague at 08:00 on 1 March 2026', () => {
expect(requests.filter((url) => !url.startsWith(server.origin + '/'))).toEqual([]);
});
test('touch her: a fond answer; three quick taps, and she says she has thorns (thorns.md)', async ({ page }) => {
// The clock is driven, not frozen: taps at one frozen instant would be one touch.
await page.clock.install({ time: MORNING });
await open(page);
const touch = page.getByRole('button', { name: en.rose.touch.label });
await touch.click();
await expect(page.locator('.bubble')).toHaveText(en.rose.touch.fond[0]!);
await page.clock.runFor(5_000);
for (let i = 0; i < 3; i++) {
await touch.click();
await page.clock.runFor(400);
}
await expect(page.locator('.bubble')).toHaveText(en.rose.touch.thorns);
await expect(page.getByRole('img', { name: 'The rose, a bud.' })).toBeVisible();
await touch.focus();
expect((await new AxeBuilder({ page }).analyze()).violations.map((v) => `${v.id}: ${v.help}`)).toEqual([]);
});
test('the rose and her care have no accessibility violations', async ({ page }) => {
await page.clock.setFixedTime(MORNING);
await open(page);