mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-14 15:09:59 -04:00
Name Sauce Labs tests to indicate when run by Travis
This commit is contained in:
parent
58ba061c66
commit
90d10dd417
1 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,7 @@ const bindAll = require('lodash.bindall');
|
|||
|
||||
const headless = process.env.SMOKE_HEADLESS || false;
|
||||
const remote = process.env.SMOKE_REMOTE || false;
|
||||
const travis = process.env.SMOKE_TRAVIS || false;
|
||||
const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env;
|
||||
const {By, until} = webdriver;
|
||||
|
||||
|
@ -24,7 +25,13 @@ class SeleniumHelper {
|
|||
}
|
||||
buildDriver (name) {
|
||||
if (remote === 'true'){
|
||||
this.driver = this.getSauceDriver(SAUCE_USERNAME, SAUCE_ACCESS_KEY, name);
|
||||
let nameToUse;
|
||||
if (travis === 'true'){
|
||||
nameToUse = 'travis: ' + name;
|
||||
} else {
|
||||
nameToUse = name;
|
||||
}
|
||||
this.driver = this.getSauceDriver(SAUCE_USERNAME, SAUCE_ACCESS_KEY, nameToUse);
|
||||
} else {
|
||||
this.driver = this.getDriver();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue