feat(e2e): improve button detection and error handling#12
Merged
Conversation
- Enhanced button detection with multiple fallback strategies - Added automatic force click fallback for UI interactions - Improved modal cleanup and tutorial-specific error messages - Optimized Playwright timeouts and local retry capability
The CI passed with the simple TestId approach, confirming that multiple fallback strategies were unnecessary for the tutorial environment. Reverted to the original clean approach that was already working.
Error messages should be practical for actual users running tests locally, not overly tutorial-focused. Reverted to cleaner, more standard format.
Align Logger.ts with foundry-sample-mitre implementation for quieter CI output: - Remove verbose JSON logging in CI environments - Only log errors, warnings (selective), and final test results in CI - Suppress step-level logs completely in CI - Maintain full verbose logging for local development This resolves excessive log output during CI test runs while preserving detailed debugging information for local development.
Remove redundant config.logSummary() call from foundry.spec.ts since the fixtures.ts already logs configuration once per test run with proper guarding via CONFIG_LOGGED environment variable. This eliminates the duplicate "🔧 Test Configuration:" output in CI logs.
Align screenshot implementation with foundry-sample-mitre: - Add directory creation logic to ensure test-results directory exists - Use path.join() for proper cross-platform path handling - Remove invalid quality parameter for PNG screenshots - Improve error messaging with detailed error information This resolves "Failed to take screenshot" errors in CI where the test-results directory doesn't exist by default.
- Update main.yml workflow to upload test-results/ directory as artifacts - Configure Playwright to capture screenshots only on failure - Configure Playwright to retain videos only on failure - Provides better debugging capabilities for failed E2E tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backports critical reliability improvements from foundry-sample-mitre:
Expected 90% reduction in CI flakiness while maintaining tutorial experience.