Select bank transfer explicitly on customer payment page e2e test (#51210)
Select bank transfer explicitly Co-authored-by: Jon Lane <jon.lane@automattic.com>
This commit is contained in:
parent
36f85ef0c6
commit
43cc912bba
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Explicitly select the payment method on the customer payment page e2e test
|
|
@ -100,15 +100,22 @@ test.describe(
|
|||
test( 'can pay for the order through the customer payment page', async ( {
|
||||
page,
|
||||
} ) => {
|
||||
await test.step( 'Load the customer payment page', async () => {
|
||||
// key required, so can't go directly to the customer payment page
|
||||
await page.goto(
|
||||
`wp-admin/admin.php?page=wc-orders&action=edit&id=${ orderId }`
|
||||
);
|
||||
await page.locator( 'label[for=order_status] > a' ).click();
|
||||
|
||||
} );
|
||||
await test.step( 'Select payment method and pay for the order', async () => {
|
||||
// explicitly select the payment method
|
||||
await page.getByText( 'Direct bank transfer' ).click();
|
||||
// pay for the order
|
||||
await page.locator( 'button#place_order' ).click();
|
||||
|
||||
await page
|
||||
.getByRole( 'button', { name: 'Pay for order' } )
|
||||
.click();
|
||||
} );
|
||||
await test.step( 'Verify the order received page', async () => {
|
||||
// Verify we landed on the order received page
|
||||
await expect(
|
||||
page.getByText( 'Your order has been received' )
|
||||
|
@ -120,5 +127,6 @@ test.describe(
|
|||
await page.getByText( `Total: $${ productPrice }` ).count()
|
||||
).toBeGreaterThan( 0 );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue