[ui] DomiUi: @domi/ui v1.4.0: Water and Touch her are Button again (the handler fix from here), the credit is DomiCredit link={false}

This commit is contained in:
2026-11-23 02:31:50 +01:00
parent 7f8b6861f9
commit 87ca83cd1b
17 changed files with 213 additions and 60 deletions
+6 -4
View File
@@ -23,11 +23,13 @@ const h1 = (): HTMLElement => screen.getByRole('heading', { level: 1 });
describe('the licence credit (CPAL-1.0 Exhibit B; domi-ui.md D9)', () => {
const credit = 'Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák';
/** The credit line as a reader gets it: @domi/ui's DomiCredit sets its parts in spans. */
const creditLine = (): string => document.querySelector('.domi-credit')?.textContent?.replace(/\s+/g, ' ').trim() ?? '';
it('stands at the foot of the first screen in its exact words, as plain text that leads nowhere', () => {
render(Shell);
const line = screen.getByText(credit);
expect(line.textContent).toBe(credit);
expect(line.closest('a')).toBeNull();
expect(creditLine()).toBe(credit);
expect(document.querySelector('.domi-credit a')).toBeNull();
expect(document.querySelectorAll('a[href^="https://aula"]')).toHaveLength(0);
});
@@ -35,7 +37,7 @@ describe('the licence credit (CPAL-1.0 Exhibit B; domi-ui.md D9)', () => {
window.location.hash = '#letter';
render(Shell, { letter: LETTER });
await waitFor(() => expect(h1().textContent).toBe(en.letter.title));
expect(screen.getByText(credit)).toBeTruthy();
expect(creditLine()).toBe(credit);
});
});