mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
6dc3fb77c5
commit
3687a6b4f5
3 changed files with 65 additions and 4 deletions
|
@ -79,6 +79,10 @@ export function VisualizePageProvider({ getService, getPageObjects }: FtrProvide
|
|||
await this.waitForVisualizationSelectPage();
|
||||
}
|
||||
|
||||
public async hasVisType(type: string) {
|
||||
return await testSubjects.exists(`visType-${type}`);
|
||||
}
|
||||
|
||||
public async clickVisType(type: string) {
|
||||
await testSubjects.click(`visType-${type}`);
|
||||
await header.waitUntilLoadingHasFinished();
|
||||
|
@ -100,6 +104,10 @@ export function VisualizePageProvider({ getService, getPageObjects }: FtrProvide
|
|||
await this.clickVisType('region_map');
|
||||
}
|
||||
|
||||
public async hasRegionMap() {
|
||||
return await this.hasVisType('region_map');
|
||||
}
|
||||
|
||||
public async clickMarkdownWidget() {
|
||||
await this.clickVisType('markdown');
|
||||
}
|
||||
|
@ -120,6 +128,10 @@ export function VisualizePageProvider({ getService, getPageObjects }: FtrProvide
|
|||
await this.clickVisType('tile_map');
|
||||
}
|
||||
|
||||
public async hasTileMap() {
|
||||
return await this.hasVisType('tile_map');
|
||||
}
|
||||
|
||||
public async clickTagCloud() {
|
||||
await this.clickVisType('tagcloud');
|
||||
}
|
||||
|
@ -144,6 +156,18 @@ export function VisualizePageProvider({ getService, getPageObjects }: FtrProvide
|
|||
await this.clickVisType('input_control_vis');
|
||||
}
|
||||
|
||||
public async clickLensWidget() {
|
||||
await this.clickVisType('lens');
|
||||
}
|
||||
|
||||
public async clickMapsApp() {
|
||||
await this.clickVisType('maps');
|
||||
}
|
||||
|
||||
public async hasMapsApp() {
|
||||
return await this.hasVisType('maps');
|
||||
}
|
||||
|
||||
public async createSimpleMarkdownViz(vizName: string) {
|
||||
await this.gotoVisualizationLandingPage();
|
||||
await this.navigateToNewVisualization();
|
||||
|
@ -315,10 +339,6 @@ export function VisualizePageProvider({ getService, getPageObjects }: FtrProvide
|
|||
async () => (await globalNav.getLastBreadcrumb()) === vizName
|
||||
);
|
||||
}
|
||||
|
||||
public async clickLensWidget() {
|
||||
await this.clickVisType('lens');
|
||||
}
|
||||
}
|
||||
|
||||
return new VisualizePage();
|
||||
|
|
|
@ -45,6 +45,7 @@ export default function({ loadTestFile, getService }) {
|
|||
loadTestFile(require.resolve('./import_geojson'));
|
||||
loadTestFile(require.resolve('./layer_errors'));
|
||||
loadTestFile(require.resolve('./embeddable'));
|
||||
loadTestFile(require.resolve('./visualize_create_menu'));
|
||||
loadTestFile(require.resolve('./discover'));
|
||||
});
|
||||
});
|
||||
|
|
40
x-pack/test/functional/apps/maps/visualize_create_menu.js
Normal file
40
x-pack/test/functional/apps/maps/visualize_create_menu.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* 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 expect from '@kbn/expect';
|
||||
|
||||
export default function({ getPageObjects }) {
|
||||
const PageObjects = getPageObjects(['visualize', 'header', 'maps']);
|
||||
|
||||
describe('visualize create menu', () => {
|
||||
before(async () => {
|
||||
await PageObjects.visualize.navigateToNewVisualization();
|
||||
});
|
||||
|
||||
it('should show maps application in create menu', async () => {
|
||||
const hasMapsApp = await PageObjects.visualize.hasMapsApp();
|
||||
expect(hasMapsApp).to.equal(true);
|
||||
});
|
||||
|
||||
it('should not show legacy region map visualizion in create menu', async () => {
|
||||
const hasLegecyViz = await PageObjects.visualize.hasRegionMap();
|
||||
expect(hasLegecyViz).to.equal(false);
|
||||
});
|
||||
|
||||
it('should not show legacy tilemap map visualizion in create menu', async () => {
|
||||
const hasLegecyViz = await PageObjects.visualize.hasTileMap();
|
||||
expect(hasLegecyViz).to.equal(false);
|
||||
});
|
||||
|
||||
it('should take users to Maps application when Maps is clicked', async () => {
|
||||
await PageObjects.visualize.clickMapsApp();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.maps.waitForLayersToLoad();
|
||||
const doesLayerExist = await PageObjects.maps.doesLayerExist('Road map');
|
||||
expect(doesLayerExist).to.equal(true);
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue