From ade37f16a8f92532159a7b1f39b4d938fc9e1507 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 29 Jul 2024 13:27:43 +0200 Subject: [PATCH] ov-components: Fixed fullscreen e2e test --- .../e2e/nested-components/events.test.ts | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/openvidu-components-angular/e2e/nested-components/events.test.ts b/openvidu-components-angular/e2e/nested-components/events.test.ts index 1387300d96..b85bc07faf 100644 --- a/openvidu-components-angular/e2e/nested-components/events.test.ts +++ b/openvidu-components-angular/e2e/nested-components/events.test.ts @@ -91,18 +91,26 @@ describe('Testing EVENTS', () => { }); it('should receive the onFullscreenEnabledChanged event', async () => { - await browser.get(`${url}`); + try { + await browser.get(`${url}`); - await utils.clickOn('#ovToolbar-checkbox'); + await utils.clickOn('#ovToolbar-checkbox'); - await utils.clickOn('#apply-btn'); + await utils.clickOn('#apply-btn'); - await utils.checkToolbarIsPresent(); + await utils.checkToolbarIsPresent(); + + await utils.toggleFullscreenFromToolbar(); - await utils.toggleFullscreenFromToolbar(); + await browser.sleep(1000); - await utils.waitForElement('#onFullscreenEnabledChanged'); - expect(await utils.isPresent('#onFullscreenEnabledChanged')).to.be.true; + await utils.waitForElement('#onFullscreenEnabledChanged'); + expect(await utils.isPresent('#onFullscreenEnabledChanged')).to.be.true; + } catch (error) { + // log base64 screenshot for preview in browser + const screenshot = await browser.takeScreenshot(); + console.log('data:image/png;base64,' + screenshot); + } }); it('should receive the onRecordingStartRequested event', async () => {