Skip to content

Commit

Permalink
Updated donations browser tests for new default suggested value
Browse files Browse the repository at this point in the history
ref #20793

- now that there's a non-zero suggested value amount Stripe's UI shows a button to change the amount rather than showing the amount input field immediately
- added extra click to the tests and an expectation that the default value is set correctly
  • Loading branch information
kevinansfield committed Aug 20, 2024
1 parent 0b3f7d7 commit d3c2c7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ghost/core/test/e2e-browser/portal/donations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ test.describe('Portal', () => {
// go to website and open portal
await sharedPage.goto('/#/portal/support');

const totalAmount = sharedPage.getByTestId('product-summary-total-amount');
await expect(totalAmount).toHaveText('$5.00');
await sharedPage.getByText('Change amount').click();
await sharedPage.locator('#customUnitAmount').fill('12.50');
await sharedPage.locator('#email').fill('member-donation-test-1@ghost.org');
await completeStripeSubscription(sharedPage);
Expand All @@ -34,6 +37,7 @@ test.describe('Portal', () => {
await sharedPage.goto('#/portal/support');

// Don't need to fill email as it's already filled
await sharedPage.getByText('Change amount').click();
await sharedPage.locator('#customUnitAmount').fill('12.50');
await completeStripeSubscription(sharedPage);

Expand Down

0 comments on commit d3c2c7b

Please sign in to comment.