-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maps] add functional test to ensure visualize create menu only shows…
… Maps app (#58746) Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
4c2aa0a
commit ea43dce
Showing
3 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); | ||
}); | ||
} |