Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data view mgmt] fix flaky scripted fields test #126992

Merged
merged 10 commits into from
Apr 14, 2022
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 @@ -291,10 +291,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