From db4a5c002840451b6b3e11a0f48b398238d87425 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 9 Jun 2026 15:07:47 +0200 Subject: [PATCH] fix(journey-item-row): update JourneyItemRow spec to match new aria-label The 'remove confirm' tests were still finding the remove button by the old label ('Wirklich entfernen?'). After the aria-label change the button is named 'Eintrag entfernen'; the visible confirmation text 'Wirklich entfernen?' in the DOM is unaffected. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/lib/geschichte/JourneyItemRow.svelte.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/geschichte/JourneyItemRow.svelte.spec.ts b/frontend/src/lib/geschichte/JourneyItemRow.svelte.spec.ts index 3123aae7..ee47da0d 100644 --- a/frontend/src/lib/geschichte/JourneyItemRow.svelte.spec.ts +++ b/frontend/src/lib/geschichte/JourneyItemRow.svelte.spec.ts @@ -87,7 +87,7 @@ describe('JourneyItemRow — remove confirm', () => { }); // Click remove (x button) - await userEvent.click(page.getByRole('button', { name: 'Wirklich entfernen?' })); + await userEvent.click(page.getByRole('button', { name: 'Eintrag entfernen' })); await expect.element(page.getByText('Wirklich entfernen?')).toBeInTheDocument(); await expect.element(page.getByRole('button', { name: 'Bestätigen' })).toBeInTheDocument(); @@ -100,13 +100,13 @@ describe('JourneyItemRow — remove confirm', () => { ...defaultProps({ onRemove }) }); - await userEvent.click(page.getByRole('button', { name: 'Wirklich entfernen?' })); + await userEvent.click(page.getByRole('button', { name: 'Eintrag entfernen' })); await userEvent.click(page.getByRole('button', { name: 'Abbrechen' })); expect(onRemove).not.toHaveBeenCalled(); // The remove button should be back await expect - .element(page.getByRole('button', { name: 'Wirklich entfernen?' })) + .element(page.getByRole('button', { name: 'Eintrag entfernen' })) .toBeInTheDocument(); }); });