-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 for tooltip filter actions (#38988)
- Loading branch information
Showing
8 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
x-pack/plugins/maps/public/components/map/__snapshots__/feature_tooltip.test.js.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 @@ | ||
/* | ||
* 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 }) { | ||
describe('embeddable', function () { | ||
loadTestFile(require.resolve('./dashboard')); | ||
loadTestFile(require.resolve('./embeddable_state')); | ||
loadTestFile(require.resolve('./tooltip_filter_actions')); | ||
}); | ||
} |
43 changes: 43 additions & 0 deletions
43
x-pack/test/functional/apps/maps/embeddable/tooltip_filter_actions.js
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,43 @@ | ||
/* | ||
* 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, getService }) { | ||
const PageObjects = getPageObjects(['common', 'dashboard', 'maps']); | ||
const kibanaServer = getService('kibanaServer'); | ||
const testSubjects = getService('testSubjects'); | ||
const filterBar = getService('filterBar'); | ||
|
||
describe('tooltip filter actions', () => { | ||
|
||
before(async () => { | ||
await kibanaServer.uiSettings.replace({ | ||
'defaultIndex': 'c698b940-e149-11e8-a35a-370a8516603a' | ||
}); | ||
await PageObjects.common.navigateToApp('dashboard'); | ||
await PageObjects.dashboard.loadSavedDashboard('dash for tooltip filter action test'); | ||
|
||
await PageObjects.maps.lockTooltipAtPosition(200, -200); | ||
}); | ||
|
||
it('should display create filter button when tooltip is locked', async () => { | ||
const exists = await testSubjects.exists('mapTooltipCreateFilterButton'); | ||
expect(exists).to.be(true); | ||
}); | ||
|
||
it('should create filters when create filter button is clicked', async () => { | ||
await testSubjects.click('mapTooltipCreateFilterButton'); | ||
|
||
const hasSourceFilter = await filterBar.hasFilter('name', 'charlie'); | ||
expect(hasSourceFilter).to.be(true); | ||
|
||
const hasJoinFilter = await filterBar.hasFilter('shape_name', 'charlie'); | ||
expect(hasJoinFilter).to.be(true); | ||
}); | ||
|
||
}); | ||
} |
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