Skip to content

Commit

Permalink
feat(e2e): test opening invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaDTH authored and ChristiaanScheermeijer committed Jun 1, 2023
1 parent 4285e7f commit 7a0d029
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test-e2e/tests/payments/subscription_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,24 @@ function runTestSuite(props: ProviderProps, providerName: string) {
renewPlan(I, addYear(today), props.yearlyOffer.price);
}
});

Scenario(`I can view my invoices - ${providerName}`, async ({ I }) => {
if (props.canRenewSubscription) {
paidLoginContext = await I.registerOrLogin(paidLoginContext);
I.amOnPage(constants.paymentsUrl);
I.waitForLoaderDone();
I.see('Transactions');
I.dontSee('No transactions');

I.scrollTo('[class*="mainColumn"] :last-child');

// Open the invoice which is opened in a new tab
I.click('Show receipt');
I.switchToNextTab();

// Assert invoice functionality by validating the presence of the purchase button
I.seeElement('.purchase-button');
I.closeCurrentTab();
}
});
}

0 comments on commit 7a0d029

Please sign in to comment.