@@ -196,6 +196,40 @@ describe('screencast', suite => {
196
196
expect ( fs . existsSync ( path ) ) . toBeTruthy ( ) ;
197
197
} ) ;
198
198
199
+ it ( 'should expose video path blank page' , async ( { browser, testInfo} ) => {
200
+ const videosPath = testInfo . outputPath ( '' ) ;
201
+ const size = { width : 320 , height : 240 } ;
202
+ const context = await browser . newContext ( {
203
+ videosPath,
204
+ viewport : size ,
205
+ videoSize : size
206
+ } ) ;
207
+ const page = await context . newPage ( ) ;
208
+ const path = await page . video ( ) ! . path ( ) ;
209
+ expect ( path ) . toContain ( videosPath ) ;
210
+ await context . close ( ) ;
211
+ expect ( fs . existsSync ( path ) ) . toBeTruthy ( ) ;
212
+ } ) ;
213
+
214
+ it ( 'should expose video path blank popup' , async ( { browser, testInfo} ) => {
215
+ const videosPath = testInfo . outputPath ( '' ) ;
216
+ const size = { width : 320 , height : 240 } ;
217
+ const context = await browser . newContext ( {
218
+ videosPath,
219
+ viewport : size ,
220
+ videoSize : size
221
+ } ) ;
222
+ const page = await context . newPage ( ) ;
223
+ const [ popup ] = await Promise . all ( [
224
+ page . waitForEvent ( 'popup' ) ,
225
+ page . evaluate ( 'window.open("about:blank")' )
226
+ ] ) ;
227
+ const path = await popup . video ( ) ! . path ( ) ;
228
+ expect ( path ) . toContain ( videosPath ) ;
229
+ await context . close ( ) ;
230
+ expect ( fs . existsSync ( path ) ) . toBeTruthy ( ) ;
231
+ } ) ;
232
+
199
233
it ( 'should capture navigation' , async ( { browser, server, testInfo} ) => {
200
234
const videosPath = testInfo . outputPath ( '' ) ;
201
235
const context = await browser . newContext ( {
0 commit comments