Skip to content

Commit

Permalink
simplify code, add retry
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Apr 19, 2024
1 parent 5c1438f commit ab5dc59
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,12 @@ export class SettingsPageObject extends FtrService {
) {
await this.clickAddField();
await this.setFieldName(name);
await this.setFieldTypeComposite();

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.setCompositeScript(script);
if (subfieldCount > 0) {
await this.testSubjects.find(`typeField_${subfieldCount - 1}`);
Expand Down Expand Up @@ -878,12 +883,6 @@ export class SettingsPageObject extends FtrService {
await this.comboBox.set('typeField', type);
}

async setFieldTypeComposite() {
this.log.debug('set type = Composite');
const comboBox = await this.testSubjects.find('typeField');
this.comboBox.setElement(comboBox, 'Composite');
}

async setFieldScript(script: string) {
this.log.debug('set script = ' + script);
await this.toggleRow('valueRow');
Expand Down

0 comments on commit ab5dc59

Please sign in to comment.