diff --git a/.github/workflows/openvidu-call-e2e-test.yml b/.github/workflows/openvidu-call-e2e-test.yml index 800ce1b6..21660415 100644 --- a/.github/workflows/openvidu-call-e2e-test.yml +++ b/.github/workflows/openvidu-call-e2e-test.yml @@ -14,7 +14,7 @@ on: jobs: prepare_openvidu_components_angular: - name: Prepare openvidu-angular + name: Prepare openvidu-components-angular runs-on: ubuntu-latest steps: - env: @@ -80,12 +80,12 @@ jobs: sleep 5 done - name: Serve openvidu-call + env: + CALL_PRIVATE_ACCESS: true run: node openvidu-call-back/dist/server.js & - name: Run tests env: LAUNCH_MODE: CI - CALL_PRIVATE_ACCESS: true - run: npm run e2e:auth --prefix openvidu-call-front home_e2e_test: @@ -218,4 +218,4 @@ jobs: env: LAUNCH_MODE: CI CALL_PRIVATE_ACCESS: false - run: npm run e2e:recording --prefix openvidu-call-front + run: npm run e2e:recordings --prefix openvidu-call-front diff --git a/openvidu-call-front/e2e/recording.test.ts b/openvidu-call-front/e2e/recording.test.ts index 4a749977..108f1186 100644 --- a/openvidu-call-front/e2e/recording.test.ts +++ b/openvidu-call-front/e2e/recording.test.ts @@ -31,7 +31,7 @@ describe('Testing recordings', () => { await utils.checkRecordingIsStarting(); await utils.checkRecordingIsStarted(); - await browser.sleep(2000); + await browser.sleep(5000); await utils.stopRecordingFromPanel(); await utils.checkRecordingIsStopped(); @@ -67,18 +67,26 @@ describe('Testing recordings', () => { }); it('should be able to play a recording', async () => { - await connectStartAndStopRecording(); + try { + await connectStartAndStopRecording(); - await utils.waitForElement('.recording-item'); - expect(await utils.getNumberOfElements('.recording-item')).equals(1); + await utils.waitForElement('.recording-item'); + expect(await utils.getNumberOfElements('.recording-item')).equals(1); + + await utils.playRecording(); - await utils.playRecording(); + await browser.sleep(2000); + await utils.waitForElement('app-recording-dialog'); - await browser.sleep(1000); - await utils.waitForElement('app-recording-dialog'); + await browser.sleep(2000); - // participant video and recording video - expect(await utils.getNumberOfElements('video')).equals(2); + // participant video and recording video + expect(await utils.getNumberOfElements('video')).equals(2); + } catch (error) { + // If the test fails, we will take a screenshot + const screenshot = await browser.takeScreenshot(); + console.log('data:image/png;base64,' + screenshot); + } }); // it('should be able to download a recording', async () => {}); diff --git a/openvidu-call-front/e2e/selenium.conf.ts b/openvidu-call-front/e2e/selenium.conf.ts index 6c9c1751..d69f8000 100644 --- a/openvidu-call-front/e2e/selenium.conf.ts +++ b/openvidu-call-front/e2e/selenium.conf.ts @@ -16,6 +16,7 @@ const chromeArguments = [ '--use-fake-device-for-media-stream' ]; const chromeArgumentsCI = [ + '--window-size=1300,1000', '--headless', '--no-sandbox', '--disable-gpu',