Make state optional when filling address with e2e-util (#44090)
Co-authored-by: Francesco <frosso@users.noreply.github.com>
This commit is contained in:
parent
0654fa1997
commit
4dcc7d8bf8
|
@ -150,10 +150,12 @@ const shopper = {
|
|||
'#billing_city',
|
||||
customerBillingDetails.city
|
||||
);
|
||||
await expect( page ).toSelect(
|
||||
'#billing_state',
|
||||
customerBillingDetails.state
|
||||
);
|
||||
if ( customerBillingDetails.state ) {
|
||||
await expect( page ).toSelect(
|
||||
'#billing_state',
|
||||
customerBillingDetails.state
|
||||
);
|
||||
}
|
||||
await expect( page ).toFill(
|
||||
'#billing_postcode',
|
||||
customerBillingDetails.postcode
|
||||
|
@ -197,10 +199,12 @@ const shopper = {
|
|||
'#shipping_city',
|
||||
customerShippingDetails.city
|
||||
);
|
||||
await expect( page ).toSelect(
|
||||
'#shipping_state',
|
||||
customerShippingDetails.state
|
||||
);
|
||||
if ( customerShippingDetails.state ) {
|
||||
await expect( page ).toSelect(
|
||||
'#shipping_state',
|
||||
customerShippingDetails.state
|
||||
);
|
||||
}
|
||||
await expect( page ).toFill(
|
||||
'#shipping_postcode',
|
||||
customerShippingDetails.postcode
|
||||
|
|
Loading…
Reference in New Issue