mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: fixed e2e tests
parent
b013d851da
commit
d83604b92a
|
@ -123,7 +123,8 @@ describe('Testing API Directives', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should run the app with VIDEO MUTED in prejoin page', async () => {
|
it('should run the app with VIDEO MUTED in prejoin page', async () => {
|
||||||
let idVideoEnabled;
|
try {
|
||||||
|
let idVideoEnabled;
|
||||||
const script = 'return document.getElementsByTagName("video")[0].srcObject.getVideoTracks()[0].enabled;';
|
const script = 'return document.getElementsByTagName("video")[0].srcObject.getVideoTracks()[0].enabled;';
|
||||||
|
|
||||||
await browser.get(`${url}&prejoin=true&videoMuted=true`);
|
await browser.get(`${url}&prejoin=true&videoMuted=true`);
|
||||||
|
@ -152,6 +153,11 @@ describe('Testing API Directives', () => {
|
||||||
|
|
||||||
await utils.waitForElement('#videocam_off');
|
await utils.waitForElement('#videocam_off');
|
||||||
expect(await utils.isPresent('#videocam_off')).to.be.true;
|
expect(await utils.isPresent('#videocam_off')).to.be.true;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
console.log(await browser.takeScreenshot());
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should run the app with VIDEO MUTED and WITHOUT PREJOIN page', async () => {
|
it('should run the app with VIDEO MUTED and WITHOUT PREJOIN page', async () => {
|
||||||
|
@ -160,6 +166,8 @@ describe('Testing API Directives', () => {
|
||||||
|
|
||||||
await browser.get(`${url}&prejoin=false&videoMuted=true`);
|
await browser.get(`${url}&prejoin=false&videoMuted=true`);
|
||||||
|
|
||||||
|
await browser.sleep(2000);
|
||||||
|
|
||||||
await utils.checkSessionIsPresent();
|
await utils.checkSessionIsPresent();
|
||||||
|
|
||||||
await utils.checkLayoutPresent();
|
await utils.checkLayoutPresent();
|
||||||
|
|
|
@ -197,13 +197,15 @@ export class SessionComponent implements OnInit, OnDestroy {
|
||||||
async ngOnDestroy() {
|
async ngOnDestroy() {
|
||||||
// Reconnecting session is received in Firefox
|
// Reconnecting session is received in Firefox
|
||||||
// To avoid 'Connection lost' message uses session.off()
|
// To avoid 'Connection lost' message uses session.off()
|
||||||
this.session?.off('reconnecting');
|
if (!this.usedInPrejoinPage) {
|
||||||
await this.participantService.clear();
|
this.session?.off('reconnecting');
|
||||||
this.session = null;
|
await this.participantService.clear();
|
||||||
this.sessionScreen = null;
|
this.session = null;
|
||||||
if (this.menuSubscription) this.menuSubscription.unsubscribe();
|
this.sessionScreen = null;
|
||||||
if (this.layoutWidthSubscription) this.layoutWidthSubscription.unsubscribe();
|
if (this.menuSubscription) this.menuSubscription.unsubscribe();
|
||||||
if (this.captionLanguageSubscription) this.captionLanguageSubscription.unsubscribe();
|
if (this.layoutWidthSubscription) this.layoutWidthSubscription.unsubscribe();
|
||||||
|
if (this.captionLanguageSubscription) this.captionLanguageSubscription.unsubscribe();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
leaveSession() {
|
leaveSession() {
|
||||||
|
|
Loading…
Reference in New Issue