From 21c297c73b8042aca9ae303c5db588c0cbafd4a1 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 26 May 2025 10:33:17 +0200 Subject: [PATCH] ov-components: ensure room is left after each test in attribute and event directives --- .../nested-components/attribute-directives.test.ts | 12 ++++++++++++ .../e2e/nested-components/events.test.ts | 3 +++ openvidu-components-angular/e2e/utils.po.test.ts | 2 -- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/openvidu-components-angular/e2e/nested-components/attribute-directives.test.ts b/openvidu-components-angular/e2e/nested-components/attribute-directives.test.ts index bec37714..837790b9 100644 --- a/openvidu-components-angular/e2e/nested-components/attribute-directives.test.ts +++ b/openvidu-components-angular/e2e/nested-components/attribute-directives.test.ts @@ -25,6 +25,9 @@ describe('OpenVidu Components ATTRIBUTE toolbar directives', () => { afterEach(async () => { // console.log('data:image/png;base64,' + await browser.takeScreenshot()); + try { + await utils.leaveRoom(); + } catch (error) {} await browser.quit(); }); @@ -193,6 +196,9 @@ describe('OpenVidu Components ATTRIBUTE stream directives', () => { afterEach(async () => { // console.log('data:image/png;base64,' + await browser.takeScreenshot()); + try { + await utils.leaveRoom(); + } catch (error) {} await browser.quit(); }); @@ -261,6 +267,9 @@ describe('OpenVidu Components ATTRIBUTE participant panels directives', () => { afterEach(async () => { // console.log('data:image/png;base64,' + await browser.takeScreenshot()); + try { + await utils.leaveRoom(); + } catch (error) {} await browser.quit(); }); @@ -321,6 +330,9 @@ describe('OpenVidu Components ATTRIBUTE activity panel directives', () => { afterEach(async () => { // console.log('data:image/png;base64,' + await browser.takeScreenshot()); + try { + await utils.leaveRoom(); + } catch (error) {} await browser.quit(); }); diff --git a/openvidu-components-angular/e2e/nested-components/events.test.ts b/openvidu-components-angular/e2e/nested-components/events.test.ts index d4aeb129..55d07383 100644 --- a/openvidu-components-angular/e2e/nested-components/events.test.ts +++ b/openvidu-components-angular/e2e/nested-components/events.test.ts @@ -24,6 +24,9 @@ describe('OpenVidu Components EVENTS', () => { }); afterEach(async () => { + try { + await utils.leaveRoom(); + } catch (error) {} await browser.quit(); }); diff --git a/openvidu-components-angular/e2e/utils.po.test.ts b/openvidu-components-angular/e2e/utils.po.test.ts index f65af1ed..2fa74a58 100644 --- a/openvidu-components-angular/e2e/utils.po.test.ts +++ b/openvidu-components-angular/e2e/utils.po.test.ts @@ -138,8 +138,6 @@ export class OpenViduComponentsPO { async leaveRoom() { await this.clickOn('body'); - await this.waitForElement('#leave-btn'); - expect(await this.isPresent('#leave-btn')).toBe(true); await this.clickOn('#leave-btn'); }