File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ describeif( shouldRunWCBlocksTests )(
100
100
await shopper . placeOrderWCB ( shopperPage , false ) ;
101
101
102
102
if ( auth ) {
103
+ const placeOrderButton = shopperPage . locator (
104
+ '.wc-block-components-checkout-place-order-button'
105
+ ) ;
106
+ await expect ( placeOrderButton ) . toBeDisabled ( ) ;
107
+ await expect ( placeOrderButton ) . toHaveClass (
108
+ / w c - b l o c k - c o m p o n e n t s - b u t t o n - - l o a d i n g /
109
+ ) ;
103
110
await shopper . confirmCardAuthentication ( shopperPage ) ;
104
111
}
105
112
Original file line number Diff line number Diff line change @@ -143,20 +143,15 @@ export const placeOrderWCB = async (
143
143
page : Page ,
144
144
confirmOrderReceived = true
145
145
) => {
146
- const placeOrderButton = page . locator (
147
- '.wc-block-components-checkout-place-order-button'
148
- ) ;
146
+ const placeOrderButton = page . getByRole ( 'button' , {
147
+ name : 'Place Order' ,
148
+ } ) ;
149
149
150
150
await placeOrderButton . focus ( ) ;
151
151
await waitForUiRefresh ( page ) ;
152
152
153
153
await placeOrderButton . click ( ) ;
154
154
155
- await expect ( placeOrderButton ) . toBeDisabled ( ) ;
156
- await expect ( placeOrderButton ) . toHaveClass (
157
- / w c - b l o c k - c o m p o n e n t s - b u t t o n - - l o a d i n g /
158
- ) ;
159
-
160
155
if ( confirmOrderReceived ) {
161
156
await page . waitForURL ( / \/ o r d e r - r e c e i v e d \/ / ) ;
162
157
await expect (
You can’t perform that action at this time.
0 commit comments