test: Fix event summary redirect test with increased timeouts

This commit is contained in:
bengizmo 2025-05-20 08:29:18 -03:00
parent 1a563f3133
commit e492f7fec3

View file

@ -160,12 +160,12 @@ test.describe('Event Summary Page', () => {
test('should redirect to login page when not logged in', async ({ page }) => {
// Log out first
await page.goto('/wp-login.php?action=logout');
await page.waitForURL(/.*\/community-login.*/);
await page.waitForURL(/.*\/community-login.*/, { timeout: 10000 });
// Try to access event summary page directly
await page.goto(`/event-summary/?event_id=${testEventId}`);
// Try to access event summary page directly with a timeout
await page.goto(`/event-summary/?event_id=${testEventId}`, { timeout: 30000 });
// Should redirect to login page
await expect(page).toHaveURL(/.*\/community-login.*/);
// Should redirect to login page - increase timeout for redirect
await expect(page).toHaveURL(/.*\/community-login.*/, { timeout: 10000 });
});
});