-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix uncaught exception in e2e & screenshots update #1433
Conversation
WalkthroughThis update enhances the Cypress testing framework by introducing a new error handling mechanism to manage cross-origin errors. An event listener for uncaught exceptions has been implemented across multiple test files, allowing tests to proceed without failing when such errors occur. This improvement significantly boosts the robustness and reliability of the test suite, enabling smoother test execution even in the face of exceptions. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_app_info_dialog.png
is excluded by!**/*.png
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_home_screen.png
is excluded by!**/*.png
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_open_webview.png
is excluded by!**/*.png
Files selected for processing (1)
- cypress/tests/upload-app.spec.ts (1 hunks)
Additional comments not posted (1)
cypress/tests/upload-app.spec.ts (1)
44-48
: Consider the implications of suppressing all uncaught exceptions.The addition of
Cypress.on('uncaught:exception', (err) => { return false; });
prevents tests from failing due to uncaught exceptions, which is useful for handling known cross-origin errors. However, it may also mask other unexpected issues that could indicate real problems in the application. Consider logging the error or selectively handling specific known errors to avoid missing critical issues.
Deploying irenestaging with Cloudflare Pages
|
c7fa2ad
to
8ffd6e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_app_info_dialog.png
is excluded by!**/*.png
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_home_screen.png
is excluded by!**/*.png
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_open_webview.png
is excluded by!**/*.png
Files selected for processing (1)
- cypress/tests/upload-app.spec.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- cypress/tests/upload-app.spec.ts
Test summaryRun details
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud |
8ffd6e0
to
36fbbcc
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_app_info_dialog.png
is excluded by!**/*.png
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_home_screen.png
is excluded by!**/*.png
cypress/snapshots/base/dynamic-scan.spec.ts/mfva_open_webview.png
is excluded by!**/*.png
Files selected for processing (3)
- cypress/tests/auth.spec.ts (1 hunks)
- cypress/tests/dynamic-scan.spec.ts (1 hunks)
- cypress/tests/upload-app.spec.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- cypress/tests/upload-app.spec.ts
Additional comments not posted (2)
cypress/tests/auth.spec.ts (1)
18-22
: Good use of Cypress event handling for uncaught exceptions.The addition of
Cypress.on('uncaught:exception', ...)
effectively prevents tests from failing due to uncaught exceptions, improving test stability. Ensure that this behavior is intended for all tests within this file.cypress/tests/dynamic-scan.spec.ts (1)
130-134
: Effective handling of uncaught exceptions in Cypress tests.The use of
Cypress.on('uncaught:exception', ...)
to prevent test failures from uncaught exceptions is a good practice to enhance test robustness. Verify that this behavior is appropriate for all scenarios in this test file.
No description provided.