fix: reduce e2e test timeouts and add detailed error logging #359
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
E2E tests were taking 18-26 minutes to fail due to page load timeouts. Tests waited 120 seconds per page load, and when pages failed to load (due to hanging resources or network issues), the tests would run for a very long time before reporting failures.
Additionally, there was no visibility into:
Solution
This PR makes tests fail fast (within 30 seconds instead of 120 seconds) and adds comprehensive diagnostic logging to help identify the root cause of timeout issues.
Changes
1. Cypress Configuration (
cypress.config.cjs)pageLoadTimeoutfrom 120s → 30s (4x faster failure)defaultCommandTimeout: 10000(10s for commands)2. Navigation Tests (
helpcenter-navigation-status.cy.js)cy.visit()with explicit 30s timeout3. Copy for AI Tests (
copy-for-llm.cy.js)cypress.logfile (visible in CI)cy.visit()calls with 30s timeoutImpact
Before:
After:
Example Log Output
This will help us quickly identify which pages are problematic and how long they're actually taking to load, enabling faster debugging and resolution of the underlying issues.