I have set up all the video recording options in my .testcaferc file and have just added a beforeEach test hook in my fixture to resize the window to 1920 x 1080. Everything works fine, except my reports now warn me about the browser window being resized during recording.
Is there any way to delay the video recording until after the browser window is resized?
.testcaferc.json:
"videoEncodingOptions": {
"aspect": "16:9",
"framerate": 30
},
"videoOptions": {
"failedOnly": true,
"pathPattern": "${DATE}_${TIME}/${TEST}_recording.mp4",
"singleFile": false
},
"videoPath": "artifacts/recordings/"
test snippet:
fixture `login`
.page `blah`
.beforeEach( async t => {
await t
.resizeWindow(1920, 1080)
})
test('valid_user_is_able_to_login', async t => {
Report warning:
Warnings:
The browser window was resized during the "valid_user_is_able_to_login" test while TestCafe recorded a video. TestCafe cannot adjust the video resolution during recording. As a result, the video content may appear broken. Do not resize the browser window when TestCafe records a video.
I'm guessing if TestCafe added a config for window size in their .testcaferc file, then everything would work together to avoid this error, but currently, that's not an option I see in their documentation: https://testcafe.io/documentation/402638/reference/configuration-file#browsers
Thanks,