@@ -47,15 +47,14 @@ versions.forEach((version) => {
4747 let sandbox , cwd , receiver , childProcess , webAppPort
4848
4949 before ( async function ( ) {
50- // bump from 60 to 90 seconds because we also need to install dependencies and download chromium
50+ // bump from 60 to 90 seconds because playwright is heavy
5151 this . timeout ( 90000 )
5252 sandbox = await createSandbox ( [ `@playwright/test@${ version } ` , 'typescript' ] , true )
5353 cwd = sandbox . folder
5454 const { NODE_OPTIONS , ...restOfEnv } = process . env
55- // Install system dependencies
56- execSync ( 'npx playwright install-deps' , { cwd, env : restOfEnv } )
5755 // Install chromium (configured in integration-tests/playwright.config.js)
58- execSync ( 'npx playwright install' , { cwd, env : restOfEnv } )
56+ // *Be advised*: this means that we'll only be using chromium for this test suite
57+ execSync ( 'npx playwright install chromium' , { cwd, env : restOfEnv , stdio : 'inherit' } )
5958 webAppPort = await getPort ( )
6059 webAppServer . listen ( webAppPort )
6160 } )
@@ -202,7 +201,9 @@ versions.forEach((version) => {
202201 } )
203202 } )
204203
205- it ( 'works when tests are compiled to a different location' , ( done ) => {
204+ it ( 'works when tests are compiled to a different location' , function ( done ) {
205+ // this has shown some flakiness
206+ this . retries ( 1 )
206207 let testOutput = ''
207208
208209 receiver . gatherPayloadsMaxTimeout ( ( { url } ) => url === '/api/v2/citestcycle' , payloads => {
@@ -215,7 +216,7 @@ versions.forEach((version) => {
215216 assert . include ( testOutput , '1 passed' )
216217 assert . include ( testOutput , '1 skipped' )
217218 assert . notInclude ( testOutput , 'TypeError' )
218- } ) . then ( ( ) => done ( ) ) . catch ( done )
219+ } , 25000 ) . then ( ( ) => done ( ) ) . catch ( done )
219220
220221 childProcess = exec (
221222 'node ./node_modules/typescript/bin/tsc' +
@@ -1082,6 +1083,15 @@ versions.forEach((version) => {
10821083
10831084 context ( 'libraries capabilities' , ( ) => {
10841085 it ( 'adds capabilities to tests' , ( done ) => {
1086+ receiver . setKnownTests (
1087+ {
1088+ playwright : {
1089+ 'passing-test.js' : [
1090+ 'should work with passing tests'
1091+ ]
1092+ }
1093+ }
1094+ )
10851095 receiver . setSettings ( {
10861096 flaky_test_retries_enabled : true ,
10871097 itr_enabled : false ,
@@ -1111,12 +1121,14 @@ versions.forEach((version) => {
11111121 env : {
11121122 ...getCiVisAgentlessConfig ( receiver . port ) ,
11131123 PW_BASE_URL : `http://localhost:${ webAppPort } ` ,
1124+ TEST_DIR : './ci-visibility/playwright-tests-test-capabilities' ,
11141125 DD_TEST_SESSION_NAME : 'my-test-session-name'
11151126 } ,
11161127 stdio : 'pipe'
11171128 }
11181129 )
1119- childProcess . on ( 'exit' , ( exitCode ) => {
1130+
1131+ childProcess . on ( 'exit' , ( ) => {
11201132 eventsPromise . then ( ( ) => {
11211133 done ( )
11221134 } ) . catch ( done )
0 commit comments