Skip to content

Commit

Permalink
Update visual_builder_page.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed Jul 13, 2021
1 parent 81b5648 commit 065d834
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/functional/page_objects/visual_builder_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ export class VisualBuilderPageObject extends FtrService {
return (await label.findAllByTestSubject('comboBoxInput'))[1];
}

public async clickColorPicker(): Promise<void> {
const picker = await this.find.byCssSelector('.tvbColorPicker button');
public async clickColorPicker(nth: number = 0): Promise<void> {
const picker = (await this.find.allByCssSelector('.tvbColorPicker button'))[nth];
await picker.clickMouseButton();
}

Expand All @@ -598,10 +598,10 @@ export class VisualBuilderPageObject extends FtrService {
}

public async setColorPickerValue(colorHex: string, nth: number = 0): Promise<void> {
const picker = await this.find.allByCssSelector('.tvbColorPicker button');
await picker[nth].clickMouseButton();
await this.clickColorPicker(nth);
await this.checkColorPickerPopUpIsPresent();
await this.find.setValue('.euiColorPicker input', colorHex);
await this.clickColorPicker(nth);
await this.visChart.waitForVisualizationRenderingStabilized();
}

Expand Down

0 comments on commit 065d834

Please sign in to comment.