mirror of https://github.com/OpenVidu/openvidu.git
ov-components: Remove old and unnecessary test and refactored code
parent
b2e50aa53b
commit
d52dc9b6cf
|
@ -1,20 +1,20 @@
|
|||
import { expect } from 'chai';
|
||||
import { Builder, By, WebDriver } from 'selenium-webdriver';
|
||||
|
||||
import { AngularConfig } from '../selenium.conf';
|
||||
import { NestedConfig } from '../selenium.conf';
|
||||
import { OpenViduComponentsPO } from '../utils.po.test';
|
||||
|
||||
const url = AngularConfig.appUrl;
|
||||
const url = NestedConfig.appUrl;
|
||||
|
||||
describe('Testing TOOLBAR STRUCTURAL DIRECTIVES', () => {
|
||||
let browser: WebDriver;
|
||||
let utils: OpenViduComponentsPO;
|
||||
async function createChromeBrowser(): Promise<WebDriver> {
|
||||
return await new Builder()
|
||||
.forBrowser(AngularConfig.browserName)
|
||||
.withCapabilities(AngularConfig.browserCapabilities)
|
||||
.setChromeOptions(AngularConfig.browserOptions)
|
||||
.usingServer(AngularConfig.seleniumAddress)
|
||||
.forBrowser(NestedConfig.browserName)
|
||||
.withCapabilities(NestedConfig.browserCapabilities)
|
||||
.setChromeOptions(NestedConfig.browserOptions)
|
||||
.usingServer(NestedConfig.seleniumAddress)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -147,10 +147,10 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => {
|
|||
|
||||
async function createChromeBrowser(): Promise<WebDriver> {
|
||||
return await new Builder()
|
||||
.forBrowser(AngularConfig.browserName)
|
||||
.withCapabilities(AngularConfig.browserCapabilities)
|
||||
.setChromeOptions(AngularConfig.browserOptions)
|
||||
.usingServer(AngularConfig.seleniumAddress)
|
||||
.forBrowser(NestedConfig.browserName)
|
||||
.withCapabilities(NestedConfig.browserCapabilities)
|
||||
.setChromeOptions(NestedConfig.browserOptions)
|
||||
.usingServer(NestedConfig.seleniumAddress)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -669,10 +669,10 @@ describe('Testing LAYOUT STRUCTURAL DIRECTIVES', () => {
|
|||
|
||||
async function createChromeBrowser(): Promise<WebDriver> {
|
||||
return await new Builder()
|
||||
.forBrowser(AngularConfig.browserName)
|
||||
.withCapabilities(AngularConfig.browserCapabilities)
|
||||
.setChromeOptions(AngularConfig.browserOptions)
|
||||
.usingServer(AngularConfig.seleniumAddress)
|
||||
.forBrowser(NestedConfig.browserName)
|
||||
.withCapabilities(NestedConfig.browserCapabilities)
|
||||
.setChromeOptions(NestedConfig.browserOptions)
|
||||
.usingServer(NestedConfig.seleniumAddress)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -767,10 +767,10 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => {
|
|||
|
||||
async function createChromeBrowser(): Promise<WebDriver> {
|
||||
return await new Builder()
|
||||
.forBrowser(AngularConfig.browserName)
|
||||
.withCapabilities(AngularConfig.browserCapabilities)
|
||||
.setChromeOptions(AngularConfig.browserOptions)
|
||||
.usingServer(AngularConfig.seleniumAddress)
|
||||
.forBrowser(NestedConfig.browserName)
|
||||
.withCapabilities(NestedConfig.browserCapabilities)
|
||||
.setChromeOptions(NestedConfig.browserOptions)
|
||||
.usingServer(NestedConfig.seleniumAddress)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -1049,31 +1049,4 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => {
|
|||
|
||||
expect(await utils.isPresent('ov-broadcasting-activity')).to.be.false;
|
||||
});
|
||||
|
||||
it('should SHOW STREAMING ERROR', async () => {
|
||||
await browser.get(`${url}`);
|
||||
|
||||
await utils.clickOn('#ovActivitiesPanel-checkbox');
|
||||
|
||||
await utils.clickOn('#broadcastingError-checkbox');
|
||||
|
||||
await utils.clickOn('#apply-btn');
|
||||
|
||||
await utils.checkToolbarIsPresent();
|
||||
|
||||
await utils.clickOn('#activities-panel-btn');
|
||||
|
||||
await browser.sleep(500);
|
||||
|
||||
await utils.waitForElement('#custom-activities-panel');
|
||||
|
||||
const status = await utils.waitForElement('#broadcasting-status');
|
||||
|
||||
expect(await status.getAttribute('innerText')).equals('FAILED');
|
||||
|
||||
await utils.clickOn('#broadcasting-activity');
|
||||
await browser.sleep(500);
|
||||
const error = await utils.waitForElement('#broadcasting-error');
|
||||
expect(await error.getAttribute('innerText')).equals('TEST_ERROR');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { expect } from 'chai';
|
||||
import { Builder, By, WebDriver } from 'selenium-webdriver';
|
||||
|
||||
import { AngularConfig } from '../selenium.conf';
|
||||
import { NestedConfig } from '../selenium.conf';
|
||||
import { OpenViduComponentsPO } from '../utils.po.test';
|
||||
|
||||
const url = AngularConfig.appUrl;
|
||||
const url = NestedConfig.appUrl;
|
||||
|
||||
describe('Testing EVENTS', () => {
|
||||
let browser: WebDriver;
|
||||
|
@ -12,10 +12,10 @@ describe('Testing EVENTS', () => {
|
|||
|
||||
async function createChromeBrowser(): Promise<WebDriver> {
|
||||
return await new Builder()
|
||||
.forBrowser(AngularConfig.browserName)
|
||||
.withCapabilities(AngularConfig.browserCapabilities)
|
||||
.setChromeOptions(AngularConfig.browserOptions)
|
||||
.usingServer(AngularConfig.seleniumAddress)
|
||||
.forBrowser(NestedConfig.browserName)
|
||||
.withCapabilities(NestedConfig.browserCapabilities)
|
||||
.setChromeOptions(NestedConfig.browserOptions)
|
||||
.usingServer(NestedConfig.seleniumAddress)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ export const WebComponentConfig: BrowserConfig = {
|
|||
browserOptions: new chrome.Options().addArguments(...(LAUNCH_MODE === 'CI' ? chromeArgumentsCI : chromeArguments))
|
||||
};
|
||||
|
||||
export const AngularConfig: BrowserConfig = {
|
||||
export const NestedConfig: BrowserConfig = {
|
||||
appUrl: 'http://localhost:4200/#/testing',
|
||||
seleniumAddress: LAUNCH_MODE === 'CI' ? 'http://localhost:3000/webdriver' : '',
|
||||
browserName: 'Chrome',
|
||||
|
|
Loading…
Reference in New Issue