ov-components: ensure room is left after each test in attribute and event directives

master
Carlos Santos 2025-05-26 10:33:17 +02:00
parent 7df7b31d97
commit 21c297c73b
3 changed files with 15 additions and 2 deletions

View File

@ -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();
});

View File

@ -24,6 +24,9 @@ describe('OpenVidu Components EVENTS', () => {
});
afterEach(async () => {
try {
await utils.leaveRoom();
} catch (error) {}
await browser.quit();
});

View File

@ -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');
}