1414 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1515 ********************************************************************************/
1616
17- import * as path from 'path' ;
1817import { PlaywrightTestConfig } from '@playwright/test' ;
19- import { ProjectName , getPort , getRepoDir , getRepoPath , needsGlspServer } from './utils' ;
18+ import * as path from 'path' ;
19+ import { ProjectName , getBrowserServerBundlePath , getPort , getRepoDir , getRepoPath , needsGlspServer } from './utils' ;
2020
2121type WebServerConfig = Extract < NonNullable < PlaywrightTestConfig [ 'webServer' ] > , unknown [ ] > [ number ] ;
2222
@@ -30,7 +30,7 @@ interface ProjectServerConfig {
3030export function buildWebServers ( activeProjects : ProjectName [ ] ) : PlaywrightTestConfig [ 'webServer' ] {
3131 // Resolved lazily inside the function: top-level evaluation would run at import time,
3232 // before `dotenv.config()` in playwright.config.ts, so GLSP_REPO_DIR would not be picked up.
33- const repo = `npx glsp repo -d ${ getRepoDir ( ) } ` ;
33+ const repo = `yarn --silent glsp repo -d ${ getRepoDir ( ) } ` ;
3434 const theiaAppDir = path . resolve ( getRepoPath ( 'glsp-theia-integration' ) , 'examples' , 'browser-app' ) ;
3535
3636 const GLSP_SERVER_COMMANDS : Record < string , string > = {
@@ -42,7 +42,7 @@ export function buildWebServers(activeProjects: ProjectName[]): PlaywrightTestCo
4242 const standalonePort = getPort ( 'STANDALONE_PORT' ) ;
4343 const standaloneBrowserPort = getPort ( 'STANDALONE_BROWSER_PORT' ) ;
4444 const theiaPort = getPort ( 'THEIA_PORT' ) ;
45-
45+ const browserServerBundle = getBrowserServerBundlePath ( ) ;
4646 const configs : Partial < Record < ProjectName , ProjectServerConfig > > = {
4747 standalone : {
4848 command : `${ repo } client start --external-server --no-open` ,
@@ -51,7 +51,7 @@ export function buildWebServers(activeProjects: ProjectName[]): PlaywrightTestCo
5151 path : '/diagram.html'
5252 } ,
5353 'standalone-browser' : {
54- command : `${ repo } client start --browser --no-open` ,
54+ command : `${ repo } client start --browser --no-open --external-server ${ browserServerBundle } ` ,
5555 port : standaloneBrowserPort ,
5656 env : { CLIENT_PORT : String ( standaloneBrowserPort ) } ,
5757 path : '/diagram.html'
0 commit comments