adapt unit tests to account for new redirect
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m16s
CI/CD Pipeline / deploy-staging (push) Successful in 4m24s
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
philipp 2024-01-22 20:55:05 +01:00
parent a1a5e2ad89
commit 60b9a4dbba

View File

@ -15,7 +15,6 @@ test('cox can create and delete trip', async ({ page }) => {
await page.locator('#sidebar #planned_starting_time').press('Tab'); await page.locator('#sidebar #planned_starting_time').press('Tab');
await page.getByRole('spinbutton').fill('5'); await page.getByRole('spinbutton').fill('5');
await page.getByRole('button', { name: 'Erstellen', exact: true }).click(); await page.getByRole('button', { name: 'Erstellen', exact: true }).click();
await page.getByRole('link', { name: 'Geplante Ausfahrten' }).click();
await expect(page.locator('body')).toContainText('18:00 Uhr (cox) Details'); await expect(page.locator('body')).toContainText('18:00 Uhr (cox) Details');
await page.goto('http://localhost:8000/planned'); await page.goto('http://localhost:8000/planned');
@ -57,7 +56,6 @@ test.describe('cox can edit trips', () => {
await sharedPage.locator('#sidebar #notes').click(); await sharedPage.locator('#sidebar #notes').click();
await sharedPage.locator('#sidebar #notes').fill('Meine Anmerkung'); await sharedPage.locator('#sidebar #notes').fill('Meine Anmerkung');
await sharedPage.getByRole('button', { name: 'Speichern' }).click(); await sharedPage.getByRole('button', { name: 'Speichern' }).click();
await sharedPage.getByRole('link', { name: 'Geplante Ausfahrten' }).click();
await sharedPage.getByRole('link', { name: 'Details' }).click(); await sharedPage.getByRole('link', { name: 'Details' }).click();
await expect(sharedPage.locator('#sidebar')).toContainText('Meine Anmerkung'); await expect(sharedPage.locator('#sidebar')).toContainText('Meine Anmerkung');
@ -94,7 +92,6 @@ test.describe('cox can edit trips', () => {
await sharedPage.getByRole('spinbutton').fill('3'); await sharedPage.getByRole('spinbutton').fill('3');
await sharedPage.getByRole('button', { name: 'Speichern' }).click(); await sharedPage.getByRole('button', { name: 'Speichern' }).click();
await expect(sharedPage.locator('body')).toContainText('Ausfahrt erfolgreich aktualisiert.'); await expect(sharedPage.locator('body')).toContainText('Ausfahrt erfolgreich aktualisiert.');
await sharedPage.getByRole('link', { name: 'Geplante Ausfahrten' }).click();
}); });
test('call off trip', async () => { test('call off trip', async () => {
@ -105,7 +102,6 @@ test.describe('cox can edit trips', () => {
await sharedPage.getByRole('spinbutton').fill('0'); await sharedPage.getByRole('spinbutton').fill('0');
await sharedPage.getByRole('button', { name: 'Speichern' }).click(); await sharedPage.getByRole('button', { name: 'Speichern' }).click();
await expect(sharedPage.locator('body')).toContainText('Ausfahrt erfolgreich aktualisiert.'); await expect(sharedPage.locator('body')).toContainText('Ausfahrt erfolgreich aktualisiert.');
await sharedPage.getByRole('link', { name: 'Geplante Ausfahrten' }).click();
await expect(sharedPage.locator('body')).toContainText('(Absage cox )'); await expect(sharedPage.locator('body')).toContainText('(Absage cox )');
}); });