From 689863a03a3ba3c0643ee268f269c8795e52cfd4 Mon Sep 17 00:00:00 2001 From: Wim Selles Date: Sat, 29 Aug 2020 18:23:35 +0200 Subject: [PATCH] feat: add Sauce Labs Unified Platform endpoint for US (#1532) * feat: add Sauce Labs Unified Platform endpoint for US - add tooltip - fix layout * chore: fix translation.json * chore: fix translation.json --- app/renderer/actions/Session.js | 3 +-- app/renderer/components/Session/ServerTabSauce.js | 8 +++++--- app/renderer/components/Session/Session.css | 6 ++++++ assets/locales/en/translation.json | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/renderer/actions/Session.js b/app/renderer/actions/Session.js index 2f349a9f2..363bd2799 100644 --- a/app/renderer/actions/Session.js +++ b/app/renderer/actions/Session.js @@ -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'; diff --git a/app/renderer/components/Session/ServerTabSauce.js b/app/renderer/components/Session/ServerTabSauce.js index a893cfd58..da05d3447 100644 --- a/app/renderer/components/Session/ServerTabSauce.js +++ b/app/renderer/components/Session/ServerTabSauce.js @@ -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; @@ -34,8 +34,10 @@ export default class ServerTabSauce extends Component {
{t('SauceLabs Data Center')}
- setServerParam('dataCenter', e.target.value)}> - {t('US')} + setServerParam('dataCenter', e.target.value)}> + + {t('US')} + {t('EU')}
diff --git a/app/renderer/components/Session/Session.css b/app/renderer/components/Session/Session.css index f1f4e6b26..1d873b2f8 100644 --- a/app/renderer/components/Session/Session.css +++ b/app/renderer/components/Session/Session.css @@ -236,3 +236,9 @@ height: 32px; border-right: 1px solid #d9d9d9 !important; } + +.addonDataCenterRadioContainer { + line-height: 32px; + display: table-cell; + padding-left: 11px; +} diff --git a/assets/locales/en/translation.json b/assets/locales/en/translation.json index 3935b9199..c4207354f 100644 --- a/assets/locales/en/translation.json +++ b/assets/locales/en/translation.json @@ -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",