upgrade babel
parent
075c3d04b3
commit
b46f255745
20
conf.e2e.js
20
conf.e2e.js
|
@ -1,6 +1,5 @@
|
|||
require("babel/register")({
|
||||
stage: 1
|
||||
});
|
||||
require("babel-register");
|
||||
require("babel-polyfill");
|
||||
|
||||
var utils = require('./e2e/utils');
|
||||
|
||||
|
@ -20,9 +19,13 @@ exports.config = {
|
|||
},
|
||||
mochaOpts: {
|
||||
timeout: 45000,
|
||||
compilers: 'js:babel/register'
|
||||
compilers: 'js:babel-register',
|
||||
require: 'babel-polyfill'
|
||||
},
|
||||
// capabilities: {
|
||||
// 'browserName': 'firefox'
|
||||
// },
|
||||
// capabilities: {
|
||||
// browserName: 'internet explorer',
|
||||
// version: '11'
|
||||
// },
|
||||
|
@ -99,10 +102,6 @@ exports.config = {
|
|||
|
||||
browser.driver.manage().window().maximize();
|
||||
|
||||
browser.getCapabilities().then(function (cap) {
|
||||
browser.browserName = cap.caps_.browserName;
|
||||
});
|
||||
|
||||
browser.get(browser.params.glob.host + 'login');
|
||||
|
||||
var username = $('input[name="username"]');
|
||||
|
@ -125,11 +124,6 @@ exports.config = {
|
|||
.then(function() {
|
||||
return utils.common.closeJoyride();
|
||||
})
|
||||
.then(function() {
|
||||
return browser.getCapabilities();
|
||||
}).then(function (cap) {
|
||||
browser.browserName = cap.caps_.browserName;
|
||||
})
|
||||
.then(function() {
|
||||
return browser.get(browser.params.glob.host);
|
||||
});
|
||||
|
|
|
@ -8,10 +8,20 @@ module.exports = browser.getCapabilities().then(function(s) {
|
|||
var shortName, shortVersion;
|
||||
var ie, ff, ch, sa;
|
||||
var platform;
|
||||
platform = s.caps_.platform;
|
||||
browserName = s.caps_.browserName;
|
||||
browserVersion = s.caps_.version;
|
||||
|
||||
var capabilities = {};
|
||||
|
||||
for(let item of s) {
|
||||
capabilities[item[0]] = item[1];
|
||||
}
|
||||
|
||||
platform = capabilities.platform;
|
||||
browserName = capabilities.browserName;
|
||||
browserVersion = capabilities.version;
|
||||
shortVersion = browserVersion.split('.')[0];
|
||||
|
||||
browser.browserName = browserName;
|
||||
|
||||
ie = /i.*explore/.test(browserName);
|
||||
ff = /firefox/.test(browserName);
|
||||
ch = /chrome/.test(browserName);
|
||||
|
@ -86,7 +96,7 @@ module.exports = browser.getCapabilities().then(function(s) {
|
|||
};
|
||||
|
||||
// Save current webdriver session id for later use
|
||||
browser.webdriverRemoteSessionId = s.caps_['webdriver.remote.sessionid'];
|
||||
browser.webdriverRemoteSessionId = capabilities['webdriver.remote.sessionid'];
|
||||
|
||||
browser.inSauceLabs = function() {
|
||||
return !!(browser.params.inSauceLabs);
|
||||
|
|
|
@ -6,7 +6,7 @@ var chaiAsPromised = require('chai-as-promised');
|
|||
chai.use(chaiAsPromised);
|
||||
var expect = chai.expect;
|
||||
|
||||
describe.only('modules', function() {
|
||||
describe('modules', function() {
|
||||
before(async function(){
|
||||
browser.get(browser.params.glob.host + 'project/project-0/admin/project-profile/modules');
|
||||
|
||||
|
@ -20,10 +20,10 @@ describe.only('modules', function() {
|
|||
|
||||
let functionality = functionalities.get(0);
|
||||
|
||||
let label = functionality.$('.check div');
|
||||
let input = functionality.$('.check input');
|
||||
|
||||
browser.actions()
|
||||
.mouseMove(label)
|
||||
.mouseMove(input)
|
||||
.click()
|
||||
.perform();
|
||||
|
||||
|
@ -40,10 +40,10 @@ describe.only('modules', function() {
|
|||
|
||||
let functionality = functionalities.get(0);
|
||||
|
||||
let label = functionality.$('.check div');
|
||||
let input = functionality.$('.check input');
|
||||
|
||||
browser.actions()
|
||||
.mouseMove(label)
|
||||
.mouseMove(input)
|
||||
.click()
|
||||
.perform();
|
||||
|
||||
|
@ -58,18 +58,18 @@ describe.only('modules', function() {
|
|||
it('enable videoconference', async function() {
|
||||
let functionality = $$('.module').get(4);
|
||||
|
||||
let label = functionality.$('.check div');
|
||||
let input = functionality.$('.check input');
|
||||
|
||||
browser.actions()
|
||||
.mouseMove(label)
|
||||
.mouseMove(input)
|
||||
.click()
|
||||
.perform();
|
||||
|
||||
let videoconference = functionality.$$('select').get(0);
|
||||
|
||||
videoconference.$(`option:nth-child(1)`).click();
|
||||
videoconference.$(`option:nth-child(2)`).click();
|
||||
|
||||
let salt = functionality.$$('select').get(0);
|
||||
let salt = $('#videoconference-prefix');
|
||||
|
||||
salt.sendKeys('abccceee');
|
||||
|
||||
|
|
|
@ -26,10 +26,8 @@ common.hasClass = async function (element, cls) {
|
|||
return classes.split(' ').indexOf(cls) !== -1;
|
||||
};
|
||||
|
||||
common.isBrowser = async function(browserName) {
|
||||
let cap = await browser.getCapabilities();
|
||||
|
||||
return browserName === cap.caps_.browserName;
|
||||
common.isBrowser = function(browserName) {
|
||||
return browserName === browser.browserName;
|
||||
};
|
||||
|
||||
common.browserSkip = function(browserName, name, fn) {
|
||||
|
@ -102,8 +100,7 @@ common.waitLoader = function () {
|
|||
common.takeScreenshot = async function (section, filename) {
|
||||
await common.waitRequestAnimationFrame();
|
||||
|
||||
let cap = await browser.getCapabilities();
|
||||
let browserName = cap.caps_.browserName;
|
||||
let browserName = browser.browserName;
|
||||
|
||||
let screenshotsFolder = __dirname + "/../screenshots/" + browserName + "/";
|
||||
let dir = screenshotsFolder + section + "/";
|
||||
|
|
|
@ -18,11 +18,14 @@
|
|||
"scripts": {
|
||||
"scss-lint": "gulp scss-lint --fail",
|
||||
"test": "./node_modules/karma/bin/karma start",
|
||||
"e2e": "node ./node_modules/babel/bin/babel-node.js --stage=1 ./run-e2e.js"
|
||||
"e2e": "./node_modules/.bin/babel-node run-e2e.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "1.4.7",
|
||||
"babel": "^5.6.5",
|
||||
"babel-cli": "^6.6.5",
|
||||
"babel-polyfill": "^6.7.4",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"babel-register": "^6.7.2",
|
||||
"bluebird": "^3.0.2",
|
||||
"chai": "^3.3.0",
|
||||
"chai-as-promised": "^5.1.0",
|
||||
|
|
Loading…
Reference in New Issue