-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Added regression test for requests page #8608
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes introduce a new test case to the Cypress end-to-end testing suite for the requests page. The test, titled "Export task. Request for status fails, UI is not crushing," simulates a scenario where an export status request fails with a 500 error. It checks for the correct error message display, ensures the notification can be closed, and verifies that the requests page remains functional after the error. 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 using PR comments)
Other keywords and placeholders
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: 1
🧹 Outside diff range and nitpick comments (2)
tests/cypress/e2e/features/requests_page.js (2)
361-378
: LGTM! Well-structured test case for error handling.
The test effectively verifies the UI's resilience when the export status request fails. Good coverage of:
- Error simulation using cy.intercept
- Error message verification
- UI state validation post-error
Consider adding these additional assertions to make the test more robust:
cy.contains('.cvat-header-button', 'Requests').should('be.visible').click();
cy.get('.cvat-requests-page').should('be.visible');
+cy.get('.cvat-requests-card').should('exist');
+cy.get('.cvat-request-item-progress-failed').should('exist');
373-374
: Verify error message content.
The test should verify the complete error message content to ensure proper error handling.
-cy.contains('Could not export dataset').should('be.visible');
+cy.get('.ant-notification-notice-error')
+ .should('be.visible')
+ .within(() => {
+ cy.contains('Could not export dataset').should('be.visible');
+ cy.contains('Network error').should('be.visible');
+ });
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8608 +/- ##
===========================================
+ Coverage 74.22% 74.25% +0.03%
===========================================
Files 403 403
Lines 43375 43375
Branches 3925 3925
===========================================
+ Hits 32195 32210 +15
+ Misses 11180 11165 -15
|
Motivation and context
Added test for #8575
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
New Features
Bug Fixes