Skip to content

Commit

Permalink
frontend: Updated e2e routes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Feb 11, 2025
1 parent 9aa79a2 commit 4ac3cb4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/e2e/config.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const LAUNCH_MODE = process.env.LAUNCH_MODE || 'DEV';
export const EDITION = process.env.EDITION || 'CE';
7 changes: 4 additions & 3 deletions frontend/e2e/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expect } from 'chai';
import { Builder, WebDriver } from 'selenium-webdriver';
import { OpenViduCallConfig } from './selenium.conf';
import { OpenViduCallPO } from './utils.po.test';
import { EDITION } from './config';

const url = OpenViduCallConfig.appUrl;

Expand Down Expand Up @@ -48,7 +49,7 @@ describe('Testing Embedded Mode', () => {

it('should allow access if accessed from iframe with valid token', async () => {
// access to a page under the same domain
await browser.get('http://localhost:5080/unauthorized');
await browser.get(`${url}/unauthorized`);
const token = await utils.getJWTToken();
// Inject an iframe with the token
await utils.buildIframeAndSwitch(`${url}/embedded?token=${token}`);
Expand All @@ -63,7 +64,7 @@ describe('Testing Embedded Mode', () => {

it('should redirect to "unauthorized" if token is expired in embedded mode', async () => {
// access to a page under the same domain
await browser.get('http://localhost:5080/unauthorized');
await browser.get(`${url}/unauthorized`);
const expiredToken = await utils.getExpiredJWTToken();
await utils.buildIframeAndSwitch(url + `/embedded?token=${expiredToken}`);

Expand Down Expand Up @@ -194,7 +195,7 @@ describe('Testing Console Routes', () => {
await utils.waitForElement('ov-access-permissions');
});

it('should load the "appearance" route inside "console"', async () => {
(EDITION === 'CE' ? it : it.skip)('should load the "appearance" route inside "console"', async () => {
await browser.get(url + '/console/appearance');
await utils.waitForElement('ov-appearance');
await utils.waitForElement('ov-pro-feature-card');
Expand Down
1 change: 0 additions & 1 deletion frontend/e2e/utils.po.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class OpenViduCallPO {
});

const tokenJson: any = await token.json();
console.log(tokenJson);
return tokenJson.token;
}

Expand Down

0 comments on commit 4ac3cb4

Please sign in to comment.