Skip to content

Commit

Permalink
Chore: modify browser in codecept config (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanDeMicco authored Feb 8, 2018
1 parent 9d2e5be commit ce3d50c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions codecept.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const DEFAULT_WAIT_TIME = 15000; // 15 seconds
const DEFAULT_WAIT_TIME = 90000; // 90 seconds
const {
SAUCE_USERNAME,
SAUCE_ACCESS_KEY,
Expand All @@ -13,17 +13,17 @@ const {
const MOBILE_PLATFORMS = ['iOS', 'Android'];

// Local selenium config
const webDriverIOlocal = {
const commonConfigObj = {
browser: BROWSER_NAME,
url: 'http://localhost:8000',
browser: 'chrome',
smartWait: DEFAULT_WAIT_TIME,
restart: false,
waitForTimeout: DEFAULT_WAIT_TIME
};

const helperObj = {};
if (typeof SAUCE_USERNAME === 'undefined') {
helperObj.WebDriverIO = webDriverIOlocal;
helperObj.WebDriverIO = commonConfigObj;
} else {
// Common saucelab config
const sauceObj = {
Expand All @@ -40,7 +40,7 @@ if (typeof SAUCE_USERNAME === 'undefined') {
}
};

const mixedInSauceObj = Object.assign({}, webDriverIOlocal, sauceObj);
const mixedInSauceObj = Object.assign({}, commonConfigObj, sauceObj);
if (MOBILE_PLATFORMS.indexOf(BROWSER_PLATFORM) === -1) {
// webdriver (desktop)
Object.assign(sauceObj.desiredCapabilities, {
Expand All @@ -52,7 +52,8 @@ if (typeof SAUCE_USERNAME === 'undefined') {
Object.assign(sauceObj.desiredCapabilities, {
platformVersion: PLATFORM_VERSION,
deviceName: DEVICE_NAME,
deviceOrientation: 'portrait'
deviceOrientation: 'portrait',
appiumVersion: '1.7.2'
});
helperObj.Appium = mixedInSauceObj;
}
Expand Down

0 comments on commit ce3d50c

Please sign in to comment.