Remove redundant timeout parameters across E2E tests and add performance optimization documentation.

- Reduced E2E test execution time by removing unnecessary `{ timeout: 10000 }` overrides for assertions and element waits, relying on global `expect` configuration.
- Removed redundant `networkidle` wait states for faster form render validations.
- Documented comprehensive performance optimization strategies in `E2E_PERFORMANCE_OPTIMIZATION.md`.
- Added `E2E_COVERAGE_GUIDE.md` for integrating and merging E2E test coverage with unit test coverage.
This commit is contained in:
2025-11-09 00:30:56 +01:00
parent a6a10855fa
commit d5eb855ae1
15 changed files with 1024 additions and 107 deletions

View File

@@ -94,7 +94,6 @@ test.describe('Registration Flow', () => {
test('should show validation errors for empty form', async ({ page }) => {
// Wait for React hydration to complete
await page.waitForLoadState('networkidle');
// Interact with email field to ensure form is interactive
const emailInput = page.locator('input[name="email"]');
@@ -105,9 +104,9 @@ test.describe('Registration Flow', () => {
await page.locator('button[type="submit"]').click();
// Wait for validation errors - Firefox may be slower
await expect(page.locator('#email-error')).toBeVisible({ timeout: 10000 });
await expect(page.locator('#first_name-error')).toBeVisible({ timeout: 10000 });
await expect(page.locator('#password-error')).toBeVisible({ timeout: 10000 });
await expect(page.locator('#email-error')).toBeVisible();
await expect(page.locator('#first_name-error')).toBeVisible();
await expect(page.locator('#password-error')).toBeVisible();
});
test('should show validation error for invalid email', async ({ page }) => {
@@ -217,7 +216,7 @@ test.describe('Registration Flow', () => {
// Use Promise.all to wait for navigation
await Promise.all([
page.waitForURL('/login', { timeout: 10000 }),
page.waitForURL('/login'),
loginLink.click()
]);