Skip to content

Commit

Permalink
fix: make enabling HighVelocitySales more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack committed Oct 8, 2023
1 parent 17a2088 commit 85529c2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/plugins/high-velocity-sales-settings/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ export class HighVelocitySalesSetupPage {
}

public async setUpAndEnable(): Promise<void> {
await this.page.waitForSelector(SET_UP_AND_ENABLE_HVS_BUTTON);
await this.page.click(SET_UP_AND_ENABLE_HVS_BUTTON);
await this.page.waitForSelector(SET_UP_AND_ENABLE_HVS_BUTTON, {
visible: true
});
await Promise.all([
this.page.waitForSelector(ENABLE_TOGGLE, { timeout: 60_000 }),
await this.page.click(SET_UP_AND_ENABLE_HVS_BUTTON)
]);
await throwPageErrors(this.page);
await this.page.waitForSelector(ENABLE_TOGGLE);
await this.page.close();
}
}

0 comments on commit 85529c2

Please sign in to comment.