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 () => {
|
||||
let idVideoEnabled;
|
||||
try {
|
||||
let idVideoEnabled;
|
||||
const script = 'return document.getElementsByTagName("video")[0].srcObject.getVideoTracks()[0].enabled;';
|
||||
|
||||
await browser.get(`${url}&prejoin=true&videoMuted=true`);
|
||||
|
@ -152,6 +153,11 @@ describe('Testing API Directives', () => {
|
|||
|
||||
await utils.waitForElement('#videocam_off');
|
||||
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 () => {
|
||||
|
@ -160,6 +166,8 @@ describe('Testing API Directives', () => {
|
|||
|
||||
await browser.get(`${url}&prejoin=false&videoMuted=true`);
|
||||
|
||||
await browser.sleep(2000);
|
||||
|
||||
await utils.checkSessionIsPresent();
|
||||
|
||||
await utils.checkLayoutPresent();
|
||||
|
|
|
@ -197,13 +197,15 @@ export class SessionComponent implements OnInit, OnDestroy {
|
|||
async ngOnDestroy() {
|
||||
// Reconnecting session is received in Firefox
|
||||
// To avoid 'Connection lost' message uses session.off()
|
||||
this.session?.off('reconnecting');
|
||||
await this.participantService.clear();
|
||||
this.session = null;
|
||||
this.sessionScreen = null;
|
||||
if (this.menuSubscription) this.menuSubscription.unsubscribe();
|
||||
if (this.layoutWidthSubscription) this.layoutWidthSubscription.unsubscribe();
|
||||
if (this.captionLanguageSubscription) this.captionLanguageSubscription.unsubscribe();
|
||||
if (!this.usedInPrejoinPage) {
|
||||
this.session?.off('reconnecting');
|
||||
await this.participantService.clear();
|
||||
this.session = null;
|
||||
this.sessionScreen = null;
|
||||
if (this.menuSubscription) this.menuSubscription.unsubscribe();
|
||||
if (this.layoutWidthSubscription) this.layoutWidthSubscription.unsubscribe();
|
||||
if (this.captionLanguageSubscription) this.captionLanguageSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
leaveSession() {
|
||||
|
|
Loading…
Reference in New Issue