mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Handle terms and different shipping/billing checkboxes in playwright
This commit is contained in:
parent
715e3d4a92
commit
d99c59ef75
1 changed files with 10 additions and 0 deletions
|
@ -18,6 +18,16 @@ async function fillCheckoutForm(page) {
|
|||
await page.fill('#billing_city', '10715');
|
||||
await page.fill('#billing_phone', '1234567890');
|
||||
await page.fill('#billing_email', CUSTOMER_EMAIL);
|
||||
|
||||
const differentShippingLocator = page.locator('[name="ship_to_different_address"]');
|
||||
if (await differentShippingLocator.count() > 0) {
|
||||
await differentShippingLocator.uncheck();
|
||||
}
|
||||
|
||||
const termsLocator = page.locator('[name="terms"]');
|
||||
if (await termsLocator.count() > 0) {
|
||||
await termsLocator.check();
|
||||
}
|
||||
}
|
||||
|
||||
test('PayPal button place order from Product page', async ({page}) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue