Skip to content

Commit

Permalink
feat: add Sauce Labs Unified Platform endpoint for US
Browse files Browse the repository at this point in the history
- add tooltip
- fix layout
  • Loading branch information
wswebcreation committed Aug 29, 2020
1 parent 23ebafb commit 9eb6e3b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
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 endpoint the the US by default. If you want to use the old US endpoint then do the following: Go to 'Custom server', add 'ondemand.saucelabs.com' as a remote host, use port '433'<br/>, the remote path is ''/wd/hub<br/> and last but not least enable 'SSL'",
"proxyThroughSC": "Proxy through Sauce Connect's Selenium Relay",
"SSL": "SSL",
"text": "text",
Expand Down

0 comments on commit 9eb6e3b

Please sign in to comment.