2016-01-15 23:34:28 +03:00
|
|
|
'use strict';
|
|
|
|
const loadJson = require('./tests/e2e/helpers').loadJson;
|
2016-01-17 01:36:23 +03:00
|
|
|
const travis = process.env.TRAVIS;
|
|
|
|
|
|
|
|
let config = {
|
2016-08-28 21:46:10 +03:00
|
|
|
specs: ['./tests/e2e/**/*.e2e.js'],
|
2016-01-15 23:34:28 +03:00
|
|
|
baseUrl: 'http://localhost:3000',
|
|
|
|
framework: 'jasmine2',
|
|
|
|
onPrepare: function() {
|
2017-01-12 18:05:11 +03:00
|
|
|
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
|
2016-01-16 00:22:11 +03:00
|
|
|
// add jasmine spec reporter
|
|
|
|
jasmine.getEnv().addReporter(new SpecReporter({displaySpecDuration: true}));
|
2016-01-15 23:34:28 +03:00
|
|
|
// load APIs.guru list
|
2016-06-09 20:40:54 +03:00
|
|
|
return loadJson('https://api.apis.guru/v2/list.json').then((list) => {
|
2016-01-15 23:34:28 +03:00
|
|
|
global.apisGuruList = list;
|
2016-08-29 01:05:34 +03:00
|
|
|
return browser.getCapabilities().then(function (caps) {
|
|
|
|
browser.isIE = caps.get('browserName') === 'internet explorer';
|
2016-01-17 14:51:21 +03:00
|
|
|
});
|
2016-01-15 23:34:28 +03:00
|
|
|
});
|
|
|
|
},
|
2016-01-17 01:36:23 +03:00
|
|
|
//directConnect: true,
|
2016-01-15 23:34:28 +03:00
|
|
|
useAllAngular2AppRoots: true,
|
2016-01-17 21:56:05 +03:00
|
|
|
allScriptsTimeout: 180000,
|
2016-01-15 23:34:28 +03:00
|
|
|
jasmineNodeOpts: {
|
|
|
|
showTiming: true,
|
2016-01-16 00:22:11 +03:00
|
|
|
showColors: true,
|
2016-01-17 21:56:05 +03:00
|
|
|
defaultTimeoutInterval: 180000,
|
2016-01-16 00:22:11 +03:00
|
|
|
print: function() {}
|
2016-01-17 01:36:23 +03:00
|
|
|
},
|
2016-01-17 14:51:21 +03:00
|
|
|
multiCapabilities: [
|
2016-08-28 21:46:10 +03:00
|
|
|
{ browserName: 'chrome' }
|
|
|
|
// { browserName: 'firefox' }
|
2016-01-17 14:51:21 +03:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
if (travis) {
|
|
|
|
config.sauceUser = process.env.SAUCE_USERNAME;
|
|
|
|
config.sauceKey = process.env.SAUCE_ACCESS_KEY;
|
|
|
|
config.sauceSeleniumAddres = 'localhost:4445/wd/hub';
|
|
|
|
config.multiCapabilities = [{
|
2016-01-17 01:36:23 +03:00
|
|
|
browserName: 'chrome',
|
|
|
|
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
|
2016-01-17 02:15:16 +03:00
|
|
|
build: process.env.TRAVIS_BUILD_NUMBER,
|
|
|
|
name: 'Redoc Chrome/Linux build ' + process.env.TRAVIS_BUILD_NUMBER
|
|
|
|
},{
|
|
|
|
browserName: 'safari',
|
|
|
|
platform: 'OS X 10.11',
|
|
|
|
version: '9.0',
|
|
|
|
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
|
|
|
|
build: process.env.TRAVIS_BUILD_NUMBER,
|
2016-01-17 20:34:16 +03:00
|
|
|
name: 'Redoc Safari Latest/OSX build ' + process.env.TRAVIS_BUILD_NUMBER,
|
2016-07-17 18:07:12 +03:00
|
|
|
idleTimeout: 180,
|
2016-07-17 18:24:01 +03:00
|
|
|
maxDuration: 1800*2
|
2016-01-17 02:15:16 +03:00
|
|
|
},{
|
|
|
|
browserName: 'firefox',
|
2017-06-26 14:11:08 +03:00
|
|
|
platform: 'Windows 10',
|
2017-08-01 11:29:37 +03:00
|
|
|
version: '47.0',
|
2016-01-17 02:15:16 +03:00
|
|
|
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
|
|
|
|
build: process.env.TRAVIS_BUILD_NUMBER,
|
2016-07-17 18:07:12 +03:00
|
|
|
name: 'Redoc Firefox Latest/Win build ' + process.env.TRAVIS_BUILD_NUMBER,
|
2016-07-17 18:24:01 +03:00
|
|
|
maxDuration: 1800*2
|
2016-01-17 02:15:16 +03:00
|
|
|
},{
|
|
|
|
browserName: 'internet explorer',
|
|
|
|
version: '11.0',
|
|
|
|
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
|
|
|
|
build: process.env.TRAVIS_BUILD_NUMBER,
|
2016-07-17 18:07:12 +03:00
|
|
|
name: 'Redoc IE11/Win build ' + process.env.TRAVIS_BUILD_NUMBER,
|
2016-07-17 18:24:01 +03:00
|
|
|
maxDuration: 1800*2
|
2016-01-17 14:51:21 +03:00
|
|
|
}];
|
2016-01-17 01:36:23 +03:00
|
|
|
} else {
|
|
|
|
config.directConnect = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.config = config;
|