diff --git a/web/tests/e2e/hlsRecovery.browser.spec.js b/web/tests/e2e/hlsRecovery.browser.spec.js index f651378c8..bcfe997cf 100644 --- a/web/tests/e2e/hlsRecovery.browser.spec.js +++ b/web/tests/e2e/hlsRecovery.browser.spec.js @@ -248,19 +248,24 @@ it.each(['exhausted','networkExhausted','unrecoverable','native'])( }, ); -it.each(['exhausted','unrecoverable','native'])( +it.each(['exhausted','networkExhausted','unrecoverable','native'])( '%s recovery reports failure without fallback when go2rtc is enabled',async branch=>{ const {browser,page}=await openPlayer({enabled:true,nativePlayer:branch==='native'}); try { if(branch==='native') await page.locator('video').dispatchEvent('error'); - else await page.evaluate(value=>window.emitFatal(value==='exhausted'?'media':'other',value==='exhausted'?4:1),branch); + else await page.evaluate(value=>window.emitFatal( + value==='exhausted'?'media':value==='networkExhausted'?'network':'other', + value==='exhausted'||value==='networkExhausted'?4:1, + ),branch); expect(await page.evaluate(()=>window.errors)).toEqual([]); await page.waitForFunction(()=>window.failures.length>0); // The error overlay may fetch the latest recording for its last-frame // image; only manifest requests indicate an HLS transport fallback. expect(await page.evaluate(()=>window.requests.map(r=>r.url).filter(url=>url.includes('.m3u8')))) .toEqual(['/go2rtc/api/stream.m3u8?src=fixture%20camera&mp4=flac']); - expect(await page.evaluate(()=>window.failures[0])).toBe(branch==='unrecoverable'?'fixture fatal':'live.go2rtcHlsFailedRetry'); + expect(await page.evaluate(()=>window.failures[0])).toBe( + branch==='unrecoverable'||branch==='networkExhausted'?'fixture fatal':'live.go2rtcHlsFailedRetry', + ); } finally {await browser.close();} }, );