Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: modify browser in codecept config #643

Merged
merged 3 commits into from
Feb 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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