mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Allow setting product url in .env.e2e
This commit is contained in:
parent
5a97bdfe87
commit
66d32229b7
2 changed files with 7 additions and 3 deletions
|
@ -1,10 +1,12 @@
|
|||
const {test, expect} = require('@playwright/test');
|
||||
|
||||
const {
|
||||
CUSTOMER_EMAIL,
|
||||
CUSTOMER_PASSWORD,
|
||||
CREDIT_CARD_NUMBER,
|
||||
CREDIT_CARD_EXPIRATION,
|
||||
CREDIT_CARD_CVV
|
||||
CREDIT_CARD_CVV,
|
||||
PRODUCT_URL,
|
||||
} = process.env;
|
||||
|
||||
async function fillCheckoutForm(page) {
|
||||
|
@ -20,7 +22,7 @@ async function fillCheckoutForm(page) {
|
|||
|
||||
test('PayPal button place order from Product page', async ({page}) => {
|
||||
|
||||
await page.goto('/product/product/');
|
||||
await page.goto(PRODUCT_URL);
|
||||
|
||||
const [popup] = await Promise.all([
|
||||
page.waitForEvent('popup'),
|
||||
|
@ -48,7 +50,7 @@ test('PayPal button place order from Product page', async ({page}) => {
|
|||
|
||||
test('Advanced Credit and Debit Card (ACDC) place order from Checkout page @ci', async ({page}) => {
|
||||
|
||||
await page.goto('/product/product/');
|
||||
await page.goto(PRODUCT_URL);
|
||||
await page.locator('.single_add_to_cart_button').click();
|
||||
|
||||
await page.goto('/checkout/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue