From a1bf55ff5fd98a95af76db7b74a8dcb37195f9e1 Mon Sep 17 00:00:00 2001 From: Jon Lane Date: Thu, 20 Jul 2023 14:28:40 -0700 Subject: [PATCH] Update config to use API URL --- plugins/woocommerce/tests/api-core-tests/global-setup.js | 2 +- plugins/woocommerce/tests/api-core-tests/playwright.config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce/tests/api-core-tests/global-setup.js b/plugins/woocommerce/tests/api-core-tests/global-setup.js index 5a43ab3cf95..6e52445462e 100644 --- a/plugins/woocommerce/tests/api-core-tests/global-setup.js +++ b/plugins/woocommerce/tests/api-core-tests/global-setup.js @@ -2,7 +2,7 @@ const { site } = require( '../e2e-pw/utils' ); module.exports = async ( config ) => { // If BASE_URL is configured, we can assume we're on CI - if ( process.env.BASE_URL ) { + if ( process.env.API_BASE_URL ) { await site.reset( process.env.USER_KEY, process.env.USER_SECRET ); } }; diff --git a/plugins/woocommerce/tests/api-core-tests/playwright.config.js b/plugins/woocommerce/tests/api-core-tests/playwright.config.js index 0bfcd3d4d22..281dc7711a6 100644 --- a/plugins/woocommerce/tests/api-core-tests/playwright.config.js +++ b/plugins/woocommerce/tests/api-core-tests/playwright.config.js @@ -1,10 +1,10 @@ const { devices } = require( '@playwright/test' ); require( 'dotenv' ).config( { path: __dirname + '/.env' } ); -const { BASE_URL, CI, DEFAULT_TIMEOUT_OVERRIDE, USER_KEY, USER_SECRET } = +const { API_BASE_URL, CI, DEFAULT_TIMEOUT_OVERRIDE, USER_KEY, USER_SECRET } = process.env; -const baseURL = BASE_URL ?? 'http://localhost:8086'; +const baseURL = API_BASE_URL ?? 'http://localhost:8086'; const userKey = USER_KEY ?? 'admin'; const userSecret = USER_SECRET ?? 'password'; const base64auth = btoa( `${ userKey }:${ userSecret }` );