Skip to content

Commit

Permalink
add a couple of retries
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Apr 13, 2022
1 parent ee6587f commit 29bc44e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export function Tabs({
);

const userEditPermission = dataViews.getCanSaveSync();
console.log('scriptedFieldLanguages', JSON.stringify(scriptedFieldLanguages));

const getFilterSection = useCallback(
(type: string) => {
return (
Expand Down
1 change: 0 additions & 1 deletion test/functional/apps/management/_scripted_fields_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(lang).to.be('expression');
}
});
console.log('TEST - last check');
await PageObjects.settings.clearScriptedFieldLanguageFilter('expression');
});
});
Expand Down
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

0 comments on commit 29bc44e

Please sign in to comment.