-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
PinkyJie
committed
Dec 16, 2015
1 parent
f2ef8db
commit 7896561
Showing
5 changed files
with
65 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ const HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter' | |
const SpecReporter = require('jasmine-spec-reporter'); | ||
|
||
const webpackConfig = require('./webpack.config'); | ||
const args = require('yargs').argv; | ||
|
||
const e2eBaseFolder = './source/test/e2e'; | ||
|
||
exports.config = { | ||
baseUrl: `http://${webpackConfig.devServer.host}:${webpackConfig.devServer.port}`, | ||
const config = { | ||
framework: 'jasmine2', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
|
@@ -15,9 +15,6 @@ exports.config = { | |
print: () => {} | ||
}, | ||
specs: `${e2eBaseFolder}/specs/*.spec.js`, | ||
capabilities: { | ||
browserName: 'chrome' | ||
}, | ||
onPrepare: () => { | ||
// support ES6, need to put this line in onPrepare to make line number | ||
// in error report correct | ||
|
@@ -51,3 +48,56 @@ exports.config = { | |
timeout: 10000 | ||
} | ||
}; | ||
|
||
if (args.ci) { | ||
// run by sauce lab | ||
config.seleniumAddress = 'http://sd4399340:[email protected]/wd/hub'; | ||
// https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/ | ||
config.multiCapabilities = [ | ||
{ | ||
name: `chrome-on-windows-${args.buildId}`, | ||
build: args.buildId, | ||
browserName: 'chrome', | ||
platform: 'Windows 7' | ||
}, | ||
{ | ||
name: `safari-on-mac-${args.buildId}`, | ||
build: args.buildId, | ||
browserName: 'safari', | ||
platform: 'OS X 10.11' | ||
}, | ||
{ | ||
name: `ie9-on-windows-${args.buildId}`, | ||
build: args.buildId, | ||
browserName: 'internet explorer', | ||
platform: 'Windows 7', | ||
version: '9.0' | ||
}, | ||
{ | ||
name: `safari-on-iphone-${args.buildId}`, | ||
build: args.buildId, | ||
browserName: 'iphone', | ||
platform: 'OS X 10.10', | ||
version: '9.1', | ||
deviceName: 'iPhone 5s', | ||
deviceOrientation: 'portrait' | ||
}, | ||
{ | ||
name: `chrome-on-andoird-${args.buildId}`, | ||
build: args.buildId, | ||
browserName: 'android', | ||
platform: 'Linux', | ||
version: '4.4', | ||
deviceName: 'Android Emulator', | ||
deviceOrientation: 'portrait' | ||
} | ||
]; | ||
} else { | ||
// local run | ||
config.baseUrl = `http://${webpackConfig.devServer.host}:${webpackConfig.devServer.port}/`; | ||
config.capabilities = { | ||
browserName: 'chrome' | ||
}; | ||
} | ||
|
||
exports.config = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters