mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Discover] Fix flaky saved objects tagging functional test (#155974)
This PR fixes #150249, an occasional flaky test of Discover's saved search tagging Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2179
This commit is contained in:
parent
9b2562e5db
commit
e7a3a4810f
1 changed files with 11 additions and 0 deletions
|
@ -20,6 +20,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
'timePicker',
|
||||
'discover',
|
||||
]);
|
||||
const retry = getService('retry');
|
||||
|
||||
/**
|
||||
* Select tags in the searchbar's tag filter.
|
||||
|
@ -118,6 +119,16 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
|
||||
it('allows to create a tag from the tag selector', async () => {
|
||||
await PageObjects.discover.clickSaveSearchButton();
|
||||
const searchName = 'search-with-new-tag';
|
||||
// preventing an occasional flakiness when the saved object wasn't set and the form can't be submitted
|
||||
await retry.waitFor(
|
||||
`saved search title is set to ${searchName} and save button is clickable`,
|
||||
async () => {
|
||||
const saveButton = await testSubjects.find('confirmSaveSavedObjectButton');
|
||||
await testSubjects.setValue('savedObjectTitle', searchName);
|
||||
return (await saveButton.getAttribute('disabled')) !== 'true';
|
||||
}
|
||||
);
|
||||
await testSubjects.setValue('savedObjectTitle', 'search-with-new-tag');
|
||||
await testSubjects.click('savedObjectTagSelector');
|
||||
await testSubjects.click(`tagSelectorOption-action__create`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue