Skip to content

Commit c01b053

Browse files
committed
REG-33 – sort out timings; separate email delivery wait from UI pauses
1 parent 0004125 commit c01b053

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

features/donation-as-new-donor-restart-donation.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Feature: New donor: restarting donation completes successfully
1919
And I press Donate
2020
When I wait a few seconds
2121
Then I should be redirected to a Thank You confirmation page with the correct amount
22+
When I wait long enough for email processing
2223
Then my last email should contain the correct amounts
2324
And my last email should contain the charity's custom thank you message
24-
And my last email should contain the correct name
25+
And my last email should contain the correct name

features/donation-as-new-donor-then-register.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ Feature: New donor: donation completes successfully and donor registers
1414
And I press Donate
1515
When I wait a few seconds
1616
Then I should be redirected to a Thank You confirmation page with the correct amount
17+
When I wait long enough for email processing
1718
Then my last email should contain the correct amounts
1819
And my last email should contain the charity's custom thank you message
1920
And my last email should contain the correct name
2021
When I press on the button to set a password
2122
And I enter my new password
2223
And I press on the button to create an account
2324
Then the page should update to say I'm registered
24-
When I wait a few seconds
25+
When I wait long enough for email processing
2526
Then I should recieve a registration success email with the email I donated with

features/donation-with-credits.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Feature: Existing donor: credit donation completes successfully
2424
And I press Donate
2525
When I wait a few seconds
2626
Then I should be redirected to a Thank You confirmation page with the correct amount
27+
When I wait long enough for email processing
2728
Then my last email should contain the correct amounts
2829
And my last email should contain the charity's custom thank you message
29-
And my last email should contain the correct name
30+
And my last email should contain the correct name

features/submit-pledge.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ Feature: Pledge form is submitted successfully
2323
When I wait a few seconds
2424
Then I should see a Communities card with heading "Thank you!"
2525
And the main card text should start with confirmation of my chosen pledge amount and the correct charity name
26+
When I wait long enough for email processing
2627
Then my last email subject should contain "Thank you for your pledge"
2728
And my last email should contain my pledged amount

pages/DonateStartPage.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ export default class DonateStartPage {
148148

149149
/**
150150
* set amount value
151-
* @param {int} amount number
151+
* @param {number} amount
152152
*/
153153
async setDonationAmount(amount) {
154-
await inputSelectorValue(donationAmountSelector, amount);
154+
await inputSelectorValue(donationAmountSelector, amount.toString());
155155
// Leave tip at select dropdown's default if in Stripe mode and that field exists.
156156
}
157157

@@ -331,7 +331,9 @@ export default class DonateStartPage {
331331
* incompletes.
332332
*/
333333
async checkNoAccessibilityViolations() {
334-
return; // todo reinstate when known a11y problems fixed.
334+
// todo reinstate when known a11y problems fixed, via
335+
// https://github.com/thebiggive/donate-frontend/pull/1325 and maybe others
336+
return;
335337

336338
/* eslint-disable no-unreachable */
337339

steps/donation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ When(
221221
);
222222

223223
When(
224-
'I wait 45 seconds',
225-
// 45s to allow SF + Mailtrap time to process everything
224+
'I wait long enough for email processing',
225+
// 35s to allow SF + Mailtrap time to process everything
226226
// eslint-disable-next-line wdio/no-pause
227-
async () => browser.pause(45 * 1000)
227+
async () => browser.pause(35 * 1000)
228228
);
229229

230230
Then(

0 commit comments

Comments
 (0)