Update config to use API URL
This commit is contained in:
parent
9c571c97ce
commit
a1bf55ff5f
|
@ -2,7 +2,7 @@ const { site } = require( '../e2e-pw/utils' );
|
||||||
|
|
||||||
module.exports = async ( config ) => {
|
module.exports = async ( config ) => {
|
||||||
// If BASE_URL is configured, we can assume we're on CI
|
// 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 );
|
await site.reset( process.env.USER_KEY, process.env.USER_SECRET );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
const { devices } = require( '@playwright/test' );
|
const { devices } = require( '@playwright/test' );
|
||||||
require( 'dotenv' ).config( { path: __dirname + '/.env' } );
|
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;
|
process.env;
|
||||||
|
|
||||||
const baseURL = BASE_URL ?? 'http://localhost:8086';
|
const baseURL = API_BASE_URL ?? 'http://localhost:8086';
|
||||||
const userKey = USER_KEY ?? 'admin';
|
const userKey = USER_KEY ?? 'admin';
|
||||||
const userSecret = USER_SECRET ?? 'password';
|
const userSecret = USER_SECRET ?? 'password';
|
||||||
const base64auth = btoa( `${ userKey }:${ userSecret }` );
|
const base64auth = btoa( `${ userKey }:${ userSecret }` );
|
||||||
|
|
Loading…
Reference in New Issue