[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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user