Skip to content

Commit

Permalink
ov-components: fixed screen sharing e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Aug 2, 2024
1 parent 7c1066d commit 33d71f2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions openvidu-components-angular/e2e/webcomponent-e2e/stream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ describe('Checking stream elements by disabling/enabling the media', () => {
await browser.sleep(1000);
await utils.waitForElement('#local-element-screen_share');
expect(await utils.getNumberOfElements('.OV_stream')).equal(2);
expect(await utils.getNumberOfElements('video')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('video')).equal(1); //screen sharse video
expect(await utils.getNumberOfElements('audio')).equal(1); //screen share audio

await utils.disableScreenShare();
expect(await utils.getNumberOfElements('.OV_stream')).equal(1);
Expand All @@ -108,7 +108,7 @@ describe('Checking stream elements by disabling/enabling the media', () => {
await utils.waitForElement('#local-element-screen_share');
expect(await utils.getNumberOfElements('.OV_stream')).equal(2);
expect(await utils.getNumberOfElements('video')).equal(2);
expect(await utils.getNumberOfElements('audio')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(2); //screen share audio and local audio

await utils.disableScreenShare();
expect(await utils.getNumberOfElements('.OV_stream')).equal(1);
Expand Down Expand Up @@ -220,13 +220,13 @@ describe('Checking stream elements by disabling/enabling the media', () => {
await utils.waitForElement('#local-element-screen_share');
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios

await browser.switchTo().window(tabs[0]);
await browser.sleep(1000);
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios

await browser.switchTo().window(tabs[1]);
await utils.disableScreenShare();
Expand Down Expand Up @@ -259,13 +259,13 @@ describe('Checking stream elements by disabling/enabling the media', () => {
await utils.waitForElement('#local-element-screen_share');
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(3);
expect(await utils.getNumberOfElements('audio')).equal(2);
expect(await utils.getNumberOfElements('audio')).equal(3); // screen share audios and local audio and remote audio

await browser.switchTo().window(tabs[0]);
await browser.sleep(1000);
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(3);
expect(await utils.getNumberOfElements('audio')).equal(2);
expect(await utils.getNumberOfElements('audio')).equal(3); // screen share audios and local audio and remote audio

await browser.switchTo().window(tabs[1]);
await utils.disableScreenShare();
Expand Down Expand Up @@ -296,31 +296,31 @@ describe('Checking stream elements by disabling/enabling the media', () => {
await utils.waitForElement('.OV_stream.local');
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios

await utils.clickOn('#screenshare-btn');
await browser.sleep(500);
await utils.waitForElement('#local-element-screen_share');
expect(await utils.getNumberOfElements('.OV_stream')).equal(4);
expect(await utils.getNumberOfElements('video')).equal(2);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(2); // screen share audios

await browser.switchTo().window(tabs[0]);
await browser.sleep(500);
expect(await utils.getNumberOfElements('.OV_stream')).equal(4);
expect(await utils.getNumberOfElements('video')).equal(2);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(2); // screen share audios

await utils.disableScreenShare();
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios

await browser.switchTo().window(tabs[1]);
await browser.sleep(500);
expect(await utils.getNumberOfElements('.OV_stream')).equal(3);
expect(await utils.getNumberOfElements('video')).equal(1);
expect(await utils.getNumberOfElements('audio')).equal(0);
expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios
});
});

Expand Down

0 comments on commit 33d71f2

Please sign in to comment.