[Discover] [Value suggestion non-timebased functional test] Unskip (#115718) (#117694)

* [Discover] Add a retry in a value suggestion non timebased test

* Dismiss popover before Discover even loads

* Set local storage value in navigateToApp

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Maja Grubic 2021-11-05 19:37:07 +01:00 committed by GitHub
parent 006840ed39
commit 19d2071d75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View file

@ -279,6 +279,9 @@ export class CommonPageObject extends FtrService {
this.log.debug(msg);
throw new Error(msg);
}
if (appName === 'discover') {
await this.browser.setLocalStorageItem('data.autocompleteFtuePopover', 'true');
}
return currentUrl;
});

View file

@ -11,10 +11,10 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const queryBar = getService('queryBar');
const PageObjects = getPageObjects(['common', 'settings', 'context']);
const retry = getService('retry');
const PageObjects = getPageObjects(['common', 'settings', 'context', 'header']);
// FLAKY: https://github.com/elastic/kibana/issues/114745
describe.skip('value suggestions non time based', function describeIndexTests() {
describe('value suggestions non time based', function describeIndexTests() {
before(async function () {
await esArchiver.loadIfNeeded(
'test/functional/fixtures/es_archiver/index_pattern_without_timefield'
@ -29,11 +29,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('shows all autosuggest options for a filter in discover context app', async () => {
await PageObjects.common.navigateToApp('discover');
await queryBar.setQuery('type.keyword : ');
const suggestions = await queryBar.getSuggestions();
expect(suggestions.length).to.be(1);
expect(suggestions).to.contain('"apache"');
await retry.try(async () => {
const suggestions = await queryBar.getSuggestions();
expect(suggestions.length).to.be(1);
expect(suggestions).to.contain('"apache"');
});
});
});
}