Skip to content

Commit

Permalink
Merge pull request #5072 from mozilla/e2e-first-mask
Browse files Browse the repository at this point in the history
For first mask, look for any masks
  • Loading branch information
groovecoder authored Oct 3, 2024
2 parents 710291c + 06566e8 commit 7c7b7bf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions e2e-tests/pages/dashboardPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,16 @@ export class DashboardPage {
await this.premiumRandomMask.click();
}

// Wait for the mask card count to increase, or the error banner
expect(
this.bannerEmailError.or(maskCards.nth(preMaskCardsCount)),
).toBeVisible({ timeout: 3000 });
if (preMaskCardsCount === 0) {
// Wait for the first mask card
expect(maskCards).toBeVisible({ timeout: 3000 });
} else {
// Wait for the mask card count to increase, or the error banner
expect(
this.bannerEmailError.or(maskCards.nth(preMaskCardsCount)),
).toBeVisible({ timeout: 3000 });
}

expect(
this.bannerEmailError,
"No mask error banner. If fails, maybe rate-limited?",
Expand Down

0 comments on commit 7c7b7bf

Please sign in to comment.