Skip to content

Commit 692ddd7

Browse files
committed
fixup! 🧪(e2e) cover 500 redirect from doc route and URL trailing slash
1 parent ddbc65a commit 692ddd7

1 file changed

Lines changed: 3 additions & 24 deletions

File tree

src/frontend/apps/e2e/__tests__/app-impress/doc-routing.spec.ts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,10 @@ test.describe('Doc Routing', () => {
4040
await expect(page).toHaveURL(/\/docs\/$/);
4141
});
4242

43-
test('checks 500 redirect on docs/[id] page', async ({ page }) => {
44-
await page.route(/.*\/api\/v1.0\/documents\/.*/, async (route) => {
45-
const request = route.request();
46-
if (
47-
request.method().includes('GET') &&
48-
!request.url().includes('page=')
49-
) {
50-
await route.fulfill({
51-
status: 500,
52-
json: { detail: 'Internal Server Error' },
53-
});
54-
} else {
55-
await route.continue();
56-
}
57-
});
58-
59-
await page.goto('/docs/some-server-error-doc');
60-
61-
await expect(
62-
page.getByText(
63-
'An unexpected error occurred. Go grab a coffee or try to refresh the page.',
64-
),
65-
).toBeVisible({ timeout: 15000 });
43+
test('checks 500 page', async ({ page }) => {
44+
await page.waitForTimeout(300);
6645

67-
await expect(page).toHaveURL(/\/500\/?$/);
46+
await page.goto('/500');
6847

6948
const refreshButton = page.getByRole('button', { name: 'Refresh page' });
7049
await expect(refreshButton).toBeVisible();

0 commit comments

Comments
 (0)