Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

feat: add Sauce Labs Unified Platform endpoint for US #1532

Merged
merged 3 commits into from
Aug 29, 2020
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions app/renderer/actions/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ export function newSession (caps, attachSessId = null) {
https = session.server.remote.ssl;
break;
case ServerTypes.sauce:
host = session.server.sauce.dataCenter === 'eu-central-1' ?
'ondemand.eu-central-1.saucelabs.com' : 'ondemand.saucelabs.com';
host = `ondemand.${session.server.sauce.dataCenter}.saucelabs.com`;
port = 80;
if (session.server.sauce.useSCProxy) {
host = session.server.sauce.scHost || 'localhost';
Expand Down
8 changes: 5 additions & 3 deletions app/renderer/components/Session/ServerTabSauce.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Form, Row, Col, Input, Checkbox, Radio } from 'antd';
import { Form, Row, Col, Input, Checkbox, Radio, Tooltip } from 'antd';
import SessionStyles from './Session.css';
import { INPUT } from '../AntdTypes';
const FormItem = Form.Item;
Expand Down Expand Up @@ -34,8 +34,10 @@ export default class ServerTabSauce extends Component {
<Col span={24}>
<FormItem>
<div className={['ant-input-group-addon', SessionStyles.addonDataCenter].join(' ') }>{t('SauceLabs Data Center')}</div>
<Radio.Group className={SessionStyles.inputDataCenter} buttonStyle="solid" defaultValue='us-west-1' id='sauceObjectDataCenter' value={server.sauce.dataCenter} onChange={(e) => setServerParam('dataCenter', e.target.value)}>
<Radio value='us-west-1'>{t('US')}</Radio>
<Radio.Group className={[SessionStyles.inputDataCenter, SessionStyles.addonDataCenterRadioContainer].join(' ')} buttonStyle="solid" defaultValue='us-west-1' id='sauceObjectDataCenter' value={server.sauce.dataCenter} onChange={(e) => setServerParam('dataCenter', e.target.value)}>
<Tooltip placement="top" title={t('UP')}>
<Radio value='us-west-1'>{t('US')}</Radio>
</Tooltip>
<Radio value='eu-central-1'>{t('EU')}</Radio>
</Radio.Group>
</FormItem>
Expand Down
6 changes: 6 additions & 0 deletions app/renderer/components/Session/Session.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,9 @@
height: 32px;
border-right: 1px solid #d9d9d9 !important;
}

.addonDataCenterRadioContainer {
line-height: 32px;
display: table-cell;
padding-left: 11px;
}
1 change: 1 addition & 0 deletions assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
"SauceLabs Data Center": "SauceLabs Data Center",
"US": "US",
"EU": "EU",
"UP": "Appium Desktop will use the new Sauce Labs Unified Platform US endpoint by default. If you want to use the old US endpoint then do the following: Go to the 'Custom server'-tab, add 'ondemand.saucelabs.com' as a remote host, use port '433', the remote path is '/wd/hub' and last but not least enable 'SSL'.",
"proxyThroughSC": "Proxy through Sauce Connect's Selenium Relay",
"SSL": "SSL",
"text": "text",
Expand Down