Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
place retry logic into setFieldType fn
Browse files Browse the repository at this point in the history
mattkime committed Apr 22, 2024
1 parent 7518212 commit aca34ca
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
@@ -787,12 +787,7 @@ export class SettingsPageObject extends FtrService {
) {
await this.clickAddField();
await this.setFieldName(name);

await this.retry.try(async () => {
await this.setFieldType('Composite');
const comboBox = await this.testSubjects.find('typeField');
expect(await this.comboBox.isOptionSelected(comboBox, 'Composite')).to.be(true);
});
await this.setFieldType('Composite');
await this.setCompositeScript(script);
if (subfieldCount > 0) {
await this.testSubjects.find(`typeField_${subfieldCount - 1}`);
@@ -879,8 +874,13 @@ export class SettingsPageObject extends FtrService {
}

async setFieldType(type: string) {
const typeFieldDataTestSubj = 'typeField';
this.log.debug('set type = ' + type);
await this.comboBox.set('typeField', type);
await this.retry.try(async () => {
await this.comboBox.set(typeFieldDataTestSubj, type);
const comboBox = await this.testSubjects.find(typeFieldDataTestSubj);
expect(await this.comboBox.isOptionSelected(comboBox, type)).to.be(true);
});
}

async setFieldScript(script: string) {

0 comments on commit aca34ca

Please sign in to comment.