@@ -2396,9 +2396,9 @@ class Playwright extends Helper {
2396
2396
}
2397
2397
2398
2398
if ( this . options . recordVideo && this . page && this . page . video ( ) ) {
2399
- test . artifacts . video = await saveVideoForPage ( this . page , `${ test . title } .failed` )
2399
+ test . artifacts . video = saveVideoForPage ( this . page , `${ test . title } .failed` )
2400
2400
for ( const sessionName in this . sessionPages ) {
2401
- test . artifacts [ `video_${ sessionName } ` ] = await saveVideoForPage (
2401
+ test . artifacts [ `video_${ sessionName } ` ] = saveVideoForPage (
2402
2402
this . sessionPages [ sessionName ] ,
2403
2403
`${ test . title } _${ sessionName } .failed` ,
2404
2404
)
@@ -2424,9 +2424,9 @@ class Playwright extends Helper {
2424
2424
async _passed ( test ) {
2425
2425
if ( this . options . recordVideo && this . page && this . page . video ( ) ) {
2426
2426
if ( this . options . keepVideoForPassedTests ) {
2427
- test . artifacts . video = await saveVideoForPage ( this . page , `${ test . title } .passed` )
2427
+ test . artifacts . video = saveVideoForPage ( this . page , `${ test . title } .passed` )
2428
2428
for ( const sessionName of Object . keys ( this . sessionPages ) ) {
2429
- test . artifacts [ `video_${ sessionName } ` ] = await saveVideoForPage (
2429
+ test . artifacts [ `video_${ sessionName } ` ] = saveVideoForPage (
2430
2430
this . sessionPages [ sessionName ] ,
2431
2431
`${ test . title } _${ sessionName } .passed` ,
2432
2432
)
@@ -3917,7 +3917,7 @@ async function refreshContextSession() {
3917
3917
}
3918
3918
}
3919
3919
3920
- async function saveVideoForPage ( page , name ) {
3920
+ function saveVideoForPage ( page , name ) {
3921
3921
if ( ! page . video ( ) ) return null
3922
3922
const fileName = `${ `${ global . output_dir } ${ pathSeparator } videos${ pathSeparator } ${ uuidv4 ( ) } _${ clearString ( name ) } ` . slice ( 0 , 245 ) } .webm`
3923
3923
page
@@ -3928,11 +3928,10 @@ async function saveVideoForPage(page, name) {
3928
3928
page
3929
3929
. video ( )
3930
3930
. delete ( )
3931
- . catch ( ( e ) => { } )
3931
+ . catch ( ( ) => { } )
3932
3932
} )
3933
3933
return fileName
3934
3934
}
3935
-
3936
3935
async function saveTraceForContext ( context , name ) {
3937
3936
if ( ! context ) return
3938
3937
if ( ! context . tracing ) return
0 commit comments