Skip to content

Commit

Permalink
Dismiss nudge popup
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielweyer committed Sep 17, 2023
1 parent 37853b2 commit 5136b3b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Empty file removed parser/out/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions parser/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ function timeEvent(eventName: string): void {
await portal.selectHourlyPricing();
timeEvent('hourlyPricingSelectionCompletedAt');

await portal.dismissNudgePopupIfPresent();

console.log();

timeEvent('parsePricingStartedAt');
Expand Down
8 changes: 8 additions & 0 deletions parser/src/azurePortalExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ export class AzurePortal {
await setSelect(this.p, selector, 'hour');
}

async dismissNudgePopupIfPresent(): Promise<void> {
const closeButton = await this.p.$('[data-testid="nudge-popup-close-btn"]');

if (closeButton !== null) {
closeButton.click();
}
}

async selectReservedInstances(): Promise<void> {
console.log('Selecting reserved instances');
const selector = '[name="pricingModel"]';
Expand Down

0 comments on commit 5136b3b

Please sign in to comment.