Update e2e

This commit is contained in:
Ilyas Foo 2022-04-12 11:47:22 +08:00
parent 1fb2418e57
commit 29e27fff35
3 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,7 @@
# Unreleased
- Update test for payment task. #32467
# 1.0.0
- Add returned type annotations and remove unused vars. #8020

View File

@ -25,6 +25,10 @@ export class PaymentsSetup extends BasePage {
await this.clickButtonWithText( 'Got it' );
}
async toggleOtherPaymentMethods(): Promise< void > {
await this.clickButtonWithText( 'Other payment methods' );
}
async goToPaymentMethodSetup(
method: PaymentMethodWithSetupButton
): Promise< void > {

View File

@ -67,6 +67,7 @@ const testAdminPaymentSetupTask = () => {
await waitForTimeout( 1000 );
await homeScreen.clickOnTaskList( 'Set up payments' );
await paymentsSetup.isDisplayed();
await paymentsSetup.toggleOtherPaymentMethods();
await paymentsSetup.methodHasBeenSetup( 'bacs' );
} );
@ -76,6 +77,8 @@ const testAdminPaymentSetupTask = () => {
await homeScreen.isDisplayed();
await waitForTimeout( 1000 );
await homeScreen.clickOnTaskList( 'Set up payments' );
await paymentsSetup.isDisplayed();
await paymentsSetup.toggleOtherPaymentMethods();
await paymentsSetup.enableCashOnDelivery();
await homeScreen.navigate();
await homeScreen.isDisplayed();