Stabilize dashboard snapshot tests (#15603) (#15620)

* Tests were sometimes failing locally when waiting for a render counter of 6

Render counter value, as it turns out, is unstable and unreliable, and
is in the process of being replaced.  For now, we have to use a lower
render counter (sometimes it’s 6, sometimes it’s 4) and add a sleep.
Very unfortunate, but hopefully will soon be able to be use the newer
logic.

* Remove extra test runs
This commit is contained in:
Stacey Gammon 2017-12-14 18:53:08 -05:00 committed by GitHub
parent ef0cdaad10
commit e4a4969889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ import { AREA_CHART_VIS_NAME } from '../../page_objects/dashboard_page';
export default function ({ getService, getPageObjects, updateBaselines }) {
const dashboardVisualizations = getService('dashboardVisualizations');
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']);
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'common']);
const screenshot = getService('screenshots');
const remote = getService('remote');
@ -56,7 +56,12 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
await PageObjects.dashboard.clickFullScreenMode();
await PageObjects.dashboard.toggleExpandPanel();
await PageObjects.dashboard.waitForRenderCounter(6);
// TODO: hopefully we will be able to get rid of this sleep once render-complete is implemented.
// right now the render-counter value is unstable and unreliable. Sometimes it'll be 4 when it's "settled",
// sometimes it'll be 6.
await PageObjects.dashboard.waitForRenderCounter(4);
await PageObjects.common.sleep(1000);
const percentSimilar = await screenshot.compareAgainstBaseline('area_chart', updateBaselines);
await PageObjects.dashboard.clickExitFullScreenLogoButton();