Skip to content
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

[Test] Fix stale element error in messaging integration test #1753

Merged
merged 1 commit into from Nov 5, 2021

Conversation

ltrung
Copy link
Contributor

@ltrung ltrung commented Nov 5, 2021

Issue #:
The messaging session integration test sometimes failed with stale element error in the last step when checking whether we no longer see the disconnect button because there can be a race condition when the page refreshes right after Selenium webdriver found the element reference causing it to be stale and isDisplayed will throw StaleElementReferenceError.

Description of changes:

  • Moving the 1st wait time up first before the check to give some buffer between connect/disconnect step and the check.
  • Add try/catch just to be safe.
  • Refactor the test.

Testing:

Can these tested using a demo application? Please provide reproducible step-by-step instructions.
N/A

Checklist:

  1. Have you successfully run npm run build:release locally? N/A

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? N/A

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ltrung ltrung force-pushed the fix-message-test branch 2 times, most recently from 64d3504 to e6eaf09 Compare November 5, 2021 17:00
@ltrung ltrung merged commit cec3fd5 into master Nov 5, 2021
@ltrung ltrung deleted the fix-message-test branch November 5, 2021 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants