Skip to content

Commit

Permalink
[data view mgmt] fix flaky scripted fields test (#126992)
Browse files Browse the repository at this point in the history
* more debugging

* more debugging

* more debugging

* add a couple of retries

* no reason to reset filter

* Update tabs.tsx

* Update _scripted_fields_filter.ts
  • Loading branch information
mattkime authored Apr 14, 2022
1 parent bde1ba5 commit 9c360f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions test/functional/apps/management/_scripted_fields_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const PageObjects = getPageObjects(['settings']);

// FLAKY: https://github.com/elastic/kibana/issues/126027
describe.skip('filter scripted fields', function describeIndexTests() {
describe('filter scripted fields', function describeIndexTests() {
before(async function () {
// delete .kibana index and then wait for Kibana to re-create it
await browser.setWindowSize(1200, 800);
Expand Down Expand Up @@ -80,7 +79,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(lang).to.be('expression');
}
});
await PageObjects.settings.clearScriptedFieldLanguageFilter('expression');
});
});
}
12 changes: 8 additions & 4 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,14 @@ export class SettingsPageObject extends FtrService {

async clearScriptedFieldLanguageFilter(type: string) {
await this.testSubjects.clickWhenNotDisabled('scriptedFieldLanguageFilterDropdown');
await this.testSubjects.existOrFail('scriptedFieldLanguageFilterDropdown-popover');
await this.testSubjects.existOrFail(
`scriptedFieldLanguageFilterDropdown-option-${type}-checked`
);
await this.retry.try(async () => {
await this.testSubjects.existOrFail('scriptedFieldLanguageFilterDropdown-popover');
});
await this.retry.try(async () => {
await this.testSubjects.existOrFail(
`scriptedFieldLanguageFilterDropdown-option-${type}-checked`
);
});
await this.testSubjects.click(`scriptedFieldLanguageFilterDropdown-option-${type}-checked`);
await this.testSubjects.existOrFail(`scriptedFieldLanguageFilterDropdown-option-${type}`);
await this.browser.pressKeys(this.browser.keys.ESCAPE);
Expand Down

0 comments on commit 9c360f5

Please sign in to comment.