Make state optional when filling address with e2e-util (#44090)

Co-authored-by: Francesco <frosso@users.noreply.github.com>
This commit is contained in:
Guilherme Pressutto 2024-02-06 14:30:53 -03:00 committed by GitHub
parent 0654fa1997
commit 4dcc7d8bf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 8 deletions

View File

@ -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