@@ -2,11 +2,15 @@ import path from 'node:path';
22import { defineConfig , devices } from '@playwright/test' ;
33import baseConfig from '../playwright.config' ;
44
5+ const PORT = 3001 ;
6+ const BASE_URL = `http://localhost:${ PORT } ` ;
7+
58const buildCommand = [
69 'INCLUDE_AUTH_PAGES=true' ,
10+ `NOTIFY_DOMAIN_NAME=localhost:${ PORT } ` ,
711 'NEXT_PUBLIC_TIME_TILL_LOGOUT_SECONDS=25' ,
812 'NEXT_PUBLIC_PROMPT_SECONDS_BEFORE_LOGOUT=5' ,
9- ' npm run build && npm run start' ,
13+ ` npm run build && npm run start -- -- -p ${ PORT } ` ,
1014] . join ( ' ' ) ;
1115
1216export default defineConfig ( {
@@ -21,7 +25,7 @@ export default defineConfig({
2125 name : 'component:setup' ,
2226 testMatch : 'component.setup.ts' ,
2327 use : {
24- baseURL : 'http://localhost:3000' ,
28+ baseURL : BASE_URL ,
2529 ...devices [ 'Desktop Chrome' ] ,
2630 headless : true ,
2731 screenshot : 'only-on-failure' ,
@@ -32,7 +36,7 @@ export default defineConfig({
3236 testMatch : 'template-mgmt-logout-warning.component.modal.spec.ts' ,
3337 use : {
3438 screenshot : 'only-on-failure' ,
35- baseURL : 'http://localhost:3000' ,
39+ baseURL : BASE_URL ,
3640 ...devices [ 'Desktop Chrome' ] ,
3741 headless : true ,
3842 storageState : path . resolve ( __dirname , '../.auth/user.json' ) ,
@@ -52,7 +56,7 @@ export default defineConfig({
5256 timeout : 2 * 60 * 1000 , // 2 minutes
5357 command : buildCommand ,
5458 cwd : path . resolve ( __dirname , '../../../..' ) ,
55- url : 'http://localhost:3000/ templates/create-and-submit-templates' ,
59+ url : ` ${ BASE_URL } / templates/create-and-submit-templates` ,
5660 reuseExistingServer : ! process . env . CI ,
5761 stderr : 'pipe' ,
5862 } ,
0 commit comments