mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix return subscription plan id
This commit is contained in:
parent
62364d1e84
commit
bdc69a6fc6
3 changed files with 16 additions and 1 deletions
|
@ -2,6 +2,8 @@ const {test, expect} = require('@playwright/test');
|
|||
const {
|
||||
WP_MERCHANT_USER,
|
||||
WP_MERCHANT_PASSWORD,
|
||||
WP_CUSTOMER_USER,
|
||||
WP_CUSTOMER_PASSWORD,
|
||||
AUTHORIZATION
|
||||
} = process.env;
|
||||
|
||||
|
@ -15,6 +17,16 @@ async function loginAsAdmin(page) {
|
|||
]);
|
||||
}
|
||||
|
||||
async function loginAsCustomer(page) {
|
||||
await page.goto('/wp-admin');
|
||||
await page.locator('input[name="log"]').fill(WP_CUSTOMER_USER);
|
||||
await page.locator('input[name="pwd"]').fill(WP_CUSTOMER_PASSWORD);
|
||||
await Promise.all([
|
||||
page.waitForNavigation(),
|
||||
page.locator('text=Log In').click()
|
||||
]);
|
||||
}
|
||||
|
||||
test.describe.serial('Merchant', () => {
|
||||
const title = (Math.random() + 1).toString(36).substring(7);
|
||||
let product_id = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue