fix: reduce timeout values and fix test auth issues
- 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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user