diff --git a/frontend/tests/cox.spec.ts b/frontend/tests/cox.spec.ts index 467e5cc..eaa0375 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -57,7 +57,8 @@ test.describe('cox can edit trips', () => { await sharedPage.getByRole('link', { name: 'Geplante Ausfahrten' }).click(); await sharedPage.getByRole('link', { name: 'Details' }).click(); await expect(sharedPage.locator('#sidebar')).toContainText('Meine Anmerkung'); - await sharedPage.locator('.sidebar-overlay').click(); + + await sharedPage.getByRole('button', { name: 'Ausfahrt erstellen schließen' }).click(); }); test('add and remove guest', async () => { @@ -79,7 +80,7 @@ test.describe('cox can edit trips', () => { await expect(sharedPage.locator('#sidebar')).toContainText('Keine Ruderer angemeldet'); await expect(sharedPage.getByRole('link', { name: 'Termin löschen' })).toBeVisible(); - await sharedPage.locator('.sidebar-overlay').click(); + await sharedPage.getByRole('button', { name: 'Ausfahrt erstellen schließen' }).click(); }); test('change amount rower', async () => {