mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Use existing e2e environment config file
This commit is contained in:
parent
9d460605a8
commit
e9eba09ebb
5 changed files with 13 additions and 18 deletions
|
@ -3,7 +3,7 @@
|
|||
## Local Environment Variables
|
||||
Allows using environment variables inside the tests.
|
||||
|
||||
- Duplicate `.env.sample` and rename it as `.env`, set values and add new variables if needed.
|
||||
- Duplicate `.env.e2e.example` and rename it as `.env.e2e`, set values and add new variables if needed.
|
||||
|
||||
## Run Tests
|
||||
```
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
require('dotenv').config();
|
||||
|
||||
const {test, expect} = require('@playwright/test');
|
||||
const {
|
||||
CUSTOMER_EMAIL,
|
||||
|
@ -20,7 +18,7 @@ async function fillCheckoutForm(page) {
|
|||
await page.fill('#billing_email', CUSTOMER_EMAIL);
|
||||
}
|
||||
|
||||
test('PayPal button place order from product page', async ({page}) => {
|
||||
test('PayPal button place order from Product page', async ({page}) => {
|
||||
|
||||
await page.goto('/product/product/');
|
||||
|
||||
|
@ -48,7 +46,7 @@ test('PayPal button place order from product page', async ({page}) => {
|
|||
await expect(title).toHaveText('Order received');
|
||||
});
|
||||
|
||||
test('ACDC', async ({page}) => {
|
||||
test('Advanced Credit and Debit Card (ACDC) place order from Checkout page', async ({page}) => {
|
||||
|
||||
await page.goto('/product/product/');
|
||||
await page.locator('.single_add_to_cart_button').click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue