add stub maps test

This commit is contained in:
spalger 2019-06-21 21:20:36 -07:00
parent 293bc93973
commit 32dc965adb
2 changed files with 37 additions and 0 deletions

View file

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

View file

@ -0,0 +1,36 @@
/*
* 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 ({ getPageObjects, getService }) {
const kibanaServer = getService('kibanaServer');
const esArchiver = getService('esArchiver');
const browser = getService('browser');
const visualTesting = getService('visualTesting');
const PageObjects = getPageObjects(['maps']);
describe('maps app', function () {
before(async () => {
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('maps/data');
await esArchiver.load('maps/kibana');
await kibanaServer.uiSettings.replace({
'defaultIndex': 'logstash-*'
});
await browser.setWindowSize(1600, 1000);
});
after(async () => {
await esArchiver.unload('maps/data');
await esArchiver.unload('maps/kibana');
});
it('renders document example top hits', async () => {
await PageObjects.maps.loadSavedMap('document example top hits');
await PageObjects.maps.getMapboxStyle();
await visualTesting.snapshot();
});
});
}