Fix flaky dashboard nested visualizations test (#20166)

* Fix flaky dashboard nested visualizations test

* Update dashboard_page.js

The wait for page to load did not work consistently in a loop.  I also tried a retry in setQuery method which failed also, but was only for one of the tests, the other test did not use that method.  

The only way I could get it to pass in a run 18 times in a loop was to put a sleep in clickEditVisualization.  This change is only for 6.3.
This commit is contained in:
liza-mae 2018-06-27 12:02:00 -06:00 committed by GitHub
parent aa671139d1
commit df4ae35e97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,7 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
await retry.try(async () => {
await this.showPanelEditControlsDropdownMenu();
await testSubjects.click('dashboardPanelEditLink');
await PageObjects.common.sleep(1000);
const current = await remote.getCurrentUrl();
if (current.indexOf('visualize') < 0) {
throw new Error('not on visualize page');