Skip to content

Commit

Permalink
Dismiss 'Azure suggests region' popup if present
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielweyer committed Oct 11, 2024
1 parent e9502ac commit d456e58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file removed parser/out/log/de-de_eur_europe-west_windows.jpeg
Binary file not shown.
11 changes: 10 additions & 1 deletion parser/src/azurePortalExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export class AzurePortal {
const loadedPromise = this.waitForLoadedRegionalPrices();
const idleMainAppPromise = this.waitForIdleMainApp();
await Promise.all([loadedPromise, idleMainAppPromise]);
await this.dismissAzureSuggestsRegionPopupIfPresent();
}

private async dismissAzureSuggestsRegionPopupIfPresent(): Promise<void> {
await this.dismissPopupIfPresent('.tooltip-popup-close-btn');
}

async selectHourlyPricing(): Promise<void> {
Expand All @@ -50,7 +55,11 @@ export class AzurePortal {
}

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

private async dismissPopupIfPresent(cssSelector: string): Promise<void> {
const closeButton = await this.p.$(cssSelector);

if (closeButton !== null) {
closeButton.click();
Expand Down

0 comments on commit d456e58

Please sign in to comment.