-
Notifications
You must be signed in to change notification settings - Fork 295
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
Bugfix
: Fix flaky e2e test - instructor edits a channel
#9922
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces a modification to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (1)
src/test/playwright/e2e/course/CourseMessages.spec.ts (1)
151-151
: Consider these improvements for better maintainability.While the current implementation works, consider these enhancements:
- Extract the timeout value to a constant for easier maintenance
- Add a custom error message for better debugging
- Use a more specific selector if possible
+ // At the top of the file with other constants + const HEADER_VISIBILITY_TIMEOUT = 10000; - await page.locator('jhi-conversation-header').waitFor({ state: 'visible', timeout: 10000 }); + await page.locator('jhi-conversation-header').waitFor({ + state: 'visible', + timeout: HEADER_VISIBILITY_TIMEOUT, + message: 'Conversation header did not become visible within 10 seconds' + });
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
src/test/playwright/e2e/course/CourseMessages.spec.ts
(1 hunks)
🔇 Additional comments (1)
src/test/playwright/e2e/course/CourseMessages.spec.ts (1)
151-151
: LGTM! The wait condition addresses the flaky test issue.
The added wait condition ensures the conversation header is visible before proceeding with assertions, which should resolve the flaky behavior in multi-node environments.
|
Checklist
General
Client
Motivation and Context
"Instructor should be able to edit a channel" test is flaky and sometimes fails on multi-node build plan. The reason is the header of conversation page sometimes loading longer than expected.
Description
This PR adds a waiting for the header of conversation page with additional timeout - 10 seconds (instead of default 5 seconds) and starts asserting its elements only after it's loaded and visible to user.
Steps for Testing
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Code Review
Summary by CodeRabbit
Bug Fixes
Tests