[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:
parent
02d30915a0
commit
970f2cc4e8
|
@ -15,6 +15,7 @@ export default async function ({ readConfigFile }) {
|
|||
testFiles: [
|
||||
require.resolve('./tests/login_page'),
|
||||
require.resolve('./tests/maps'),
|
||||
require.resolve('./tests/infra'),
|
||||
],
|
||||
|
||||
services: {
|
||||
|
|
18
x-pack/test/visual_regression/tests/infra/index.js
Normal file
18
x-pack/test/visual_regression/tests/infra/index.js
Normal 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'));
|
||||
});
|
||||
}
|
25
x-pack/test/visual_regression/tests/infra/waffle_map.js
Normal file
25
x-pack/test/visual_regression/tests/infra/waffle_map.js
Normal 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();
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue