-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add safe send_keys methods to FunctionalTest. Stop implicit wait.
Add methods to more reliably send key events to elements. This seems to have fixed one of the most pernicious flaky tests, test_journalist_interface_ui_with_modal, allowing removal of the hideous retry hack that could make the tests take minutes longer. Use them to replace other usages of send_keys, including some that have definitely been flaky, though not as bad as that one. Also simplify the safe_click* methods, as WebDriverWait.until returns the result of the wait condition, and some of the other element manipulations were unnecessary, given the expected conditions. Stop setting a default implicit wait in the web drivers. If an element might not be present, we should use explicit waits instead of adding this potential delay to every element-locating call. There's also ample Selenium folklore that mixing implicit and explicit waits leads to unpredictable timeouts and possible bad behavior. Rename _alert_wait and _alert_accept. Double the timeout in alert_wait. This helped with some timeouts waiting for confirmation popups.
- Loading branch information
Showing
4 changed files
with
124 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.