Skip to content

Commit

Permalink
Stop trying to get TSVB to pass, try area charts
Browse files Browse the repository at this point in the history
There is a timezone bug with tsvb:
elastic#15501
  • Loading branch information
stacey-gammon committed Dec 12, 2017
1 parent bd934a9 commit 1131683
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions test/functional/apps/dashboard/_dashboard_snapshots.js
@@ -1,5 +1,8 @@
import expect from 'expect.js';

import { AREA_CHART_VIS_NAME } from '../../page_objects/dashboard_page';


export default function ({ getService, getPageObjects }) {
const dashboardVisualizations = getService('dashboardVisualizations');
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']);
Expand All @@ -9,6 +12,7 @@ export default function ({ getService, getPageObjects }) {
describe('dashboard snapshots', function describeIndexTests() {
before(async function () {
await PageObjects.dashboard.initTests();
await PageObjects.dashboard.preserveCrossAppState();
await remote.setWindowSize(1000, 500);
});

Expand All @@ -20,14 +24,9 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.dashboard.gotoDashboardLandingPage();
});

it('compare TSVB snapshot', async () => {
// This flip between apps fixes the url so state is preserved when switching apps in test mode.
// Without this flip the url in test mode looks something like
// "http://localhost:5620/app/kibana?_t=1486069030837#/dashboard?_g=...."
// after the initial flip, the url will look like this: "http://localhost:5620/app/kibana#/dashboard?_g=...."
await PageObjects.header.clickVisualize();
await PageObjects.header.clickDashboard();

// This one won't work because of https://github.com/elastic/kibana/issues/15501. See if we can get it to work
// once TSVB has timezone support.
it.skip('compare TSVB snapshot', async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
Expand All @@ -45,5 +44,24 @@ export default function ({ getService, getPageObjects }) {

expect(percentSimilar).to.be(0);
});

it('compare area chart snapshot', async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
await PageObjects.dashboard.addVisualizations([AREA_CHART_VIS_NAME]);
await PageObjects.dashboard.saveDashboard('area');
await PageObjects.header.clickToastOK();

await PageObjects.dashboard.clickFullScreenMode();
await PageObjects.dashboard.toggleExpandPanel();

await PageObjects.dashboard.waitForRenderCounter(2);
const percentSimilar = await screenshot.compareAgainstBaseline('area_chart');

await PageObjects.dashboard.clickExitFullScreenLogoButton();

expect(percentSimilar).to.be(0);
});
});
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1131683

Please sign in to comment.