-
Notifications
You must be signed in to change notification settings - Fork 229
chore(e2e-tests): wait for data modeling components in tests #7215
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR addresses test flakiness in the data modeling tab end-to-end tests by replacing brittle synchronous assertions with more robust asynchronous waiting patterns.
- Replaces
isDisplayed()
andisExisting()
assertions withwaitForDisplayed()
calls - Adds explicit waits for relationship edit buttons before attempting to interact with them
- Uses
waitForDisplayed({ reverse: true })
to wait for element removal instead of checking existence
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@@ -585,11 +585,13 @@ describe('Data Modeling tab', function () { | |||
const relationshipItem = drawer.$( | |||
Selectors.DataModelCollectionRelationshipItem(relationshipId) | |||
); | |||
expect(await relationshipItem.isDisplayed()).to.be.true; | |||
await relationshipItem.waitForDisplayed(); |
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.
👍
Looking at the following flakes:
https://parsley.mongodb.com/test/10gen_compass_main_test_packaged_app_macos_14_x64_test_packaged_app_2_3883a58f02d467a07462a326fe2559b0cb672010_25_08_19_16_08_15/0/a8352028097e38aa69aa7787580e602d?bookmarks=0,8&shareLine=0
https://parsley.mongodb.com/test/10gen_compass_main_test_packaged_app_rhel_test_packaged_app_2_37f34fac1b921225b14697730c0564ab569113ad_25_08_18_19_43_43/0/f595bc23473e1bb5ae834dd14010291d?bookmarks=0,14&shareLine=0