-
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.
Fix issue with disabled lab mode (#16351)
* Fix saved object finder issue * Add functional test
- Loading branch information
Showing
5 changed files
with
50 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import expect from 'expect.js'; | ||
|
||
export default function ({ getService, getPageObjects }) { | ||
const log = getService('log'); | ||
const PageObjects = getPageObjects(['common', 'header', 'discover', 'settings']); | ||
|
||
describe('visualize lab mode', () => { | ||
|
||
it('disabling does not break loading saved searches', async () => { | ||
await PageObjects.common.navigateToUrl('discover', ''); | ||
await PageObjects.discover.saveSearch('visualize_lab_mode_test'); | ||
const hasSaved = await PageObjects.discover.hasSavedSearch('visualize_lab_mode_test'); | ||
expect(hasSaved).to.be(true); | ||
|
||
log.info('found saved search before toggling enableLabs mode'); | ||
|
||
// Navigate to advanced setting and disable lab mode | ||
await PageObjects.header.clickManagement(); | ||
await PageObjects.settings.clickKibanaSettings(); | ||
await PageObjects.settings.toggleAdvancedSettingCheckbox('visualize:enableLabs'); | ||
|
||
// Expect the discover still to list that saved visualization in the open list | ||
await PageObjects.header.clickDiscover(); | ||
const stillHasSaved = await PageObjects.discover.hasSavedSearch('visualize_lab_mode_test'); | ||
expect(stillHasSaved).to.be(true); | ||
log.info('found saved search after toggling enableLabs mode'); | ||
}); | ||
|
||
after(async () => { | ||
await PageObjects.header.clickManagement(); | ||
await PageObjects.settings.clickKibanaSettings(); | ||
await PageObjects.settings.clearAdvancedSettings('visualize:enableLabs'); | ||
}); | ||
|
||
}); | ||
} |
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