fix: reduce timeout values and fix test auth issues
Pull Request / unit-tests (pull_request) Successful in 2m31s
Pull Request / analyze-bump-type (pull_request) Successful in 12s
Pull Request / build-and-deploy-ci (pull_request) Failing after 42m4s

- Reduce URL wait timeouts from 10000ms to 5000ms across tests
- Fix tournament-edit-allowTies: add login before navigating to edit page
- Fix epic4-tournament-creation: fill name field before clicking Next
- Fix cucumber config: remove broken cucumber-pretty formatter
This commit is contained in:
2026-05-18 20:05:15 -07:00
parent e08c2bbdfd
commit 005cf7293d
6 changed files with 97 additions and 25 deletions
+8 -5
View File
@@ -89,7 +89,7 @@ test.describe.serial('Epic 4: Tournament Creation', () => {
await page.click('button[type="submit"]');
// Wait for redirect to admin or player profile (indicates successful login)
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
await page.waitForURL(/\/(admin|players)/, { timeout: 5000 });
// Navigate to new tournament page
await page.goto('/admin/tournaments/new');
@@ -106,20 +106,23 @@ test.describe.serial('Epic 4: Tournament Creation', () => {
await page.click('button[type="submit"]');
// Wait for redirect to admin or player profile (indicates successful login)
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
await page.waitForURL(/\/(admin|players)/, { timeout: 5000 });
await page.goto('/admin/tournaments/new');
// Wait for step 1 form to load
await page.waitForSelector('input[name="name"]', { timeout: 10000 });
await page.waitForSelector('input[name="name"]', { timeout: 5000 });
// Check for required fields on Step 1
await expect(page.locator('input[name="name"]')).toBeVisible();
await expect(page.locator('select[name="format"]')).toBeVisible();
// Fill in the required name field first so Next actually advances
await page.fill('input[name="name"]', 'Test Tournament');
// Step through to Step 2 to check for submit button (only appears after clicking Next)
await page.click('button:has-text("Next")');
await page.waitForSelector('button[type="submit"]', { timeout: 10000 });
await page.waitForSelector('button[type="submit"]', { timeout: 5000 });
await expect(page.locator('button[type="submit"]')).toBeVisible();
});
@@ -131,7 +134,7 @@ test.describe.serial('Epic 4: Tournament Creation', () => {
await page.click('button[type="submit"]');
// Wait for redirect to admin or player profile (indicates successful login)
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
await page.waitForURL(/\/(admin|players)/, { timeout: 5000 });
// Navigate to new tournament page
await page.goto('/admin/tournaments/new');