[Infra UI] Visual Regression Test for Inventory View (#44189)

* [Infra UI] Visual Regression Test for Inventory View

* removing extra code

* Updating tests
This commit is contained in:
Chris Cowan 2019-09-19 09:16:32 -07:00 committed by GitHub
parent 02d30915a0
commit 970f2cc4e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 0 deletions

View file

@ -15,6 +15,7 @@ export default async function ({ readConfigFile }) {
testFiles: [
require.resolve('./tests/login_page'),
require.resolve('./tests/maps'),
require.resolve('./tests/infra'),
],
services: {

View file

@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
export default function ({ loadTestFile, getService }) {
const browser = getService('browser');
describe('InfraUI Visual Regression', function () {
before(async () => {
await browser.setWindowSize(1600, 1000);
});
this.tags('ciGroup10');
loadTestFile(require.resolve('./waffle_map'));
});
}

View file

@ -0,0 +1,25 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { DATES } from '../../../functional/apps/infra/constants';
const DATE_WITH_DATA = DATES.metricsAndLogs.hosts.withData;
export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['common', 'infraHome']);
const visualTesting = getService('visualTesting');
const esArchiver = getService('esArchiver');
describe('waffle map', () => {
before(() => esArchiver.load('infra/metrics_and_logs'));
after(() => esArchiver.unload('infra/metrics_and_logs'));
it('should just work', async () => {
await PageObjects.common.navigateToApp('infraOps');
await PageObjects.infraHome.goToTime(DATE_WITH_DATA);
await PageObjects.infraHome.getWaffleMap();
await visualTesting.snapshot();
});
});
}