Browse Source

check dev mode test

gre-patch-1
Arnaud97234 6 years ago
parent
commit
e8eac6c6b6
No known key found for this signature in database GPG Key ID: C77229DB9ECCFE6
  1. 1
      src/components/SelectCurrency/index.js
  2. 2
      src/components/base/CurrencyBadge.js
  3. 5
      src/components/base/Modal/ModalBody.js
  4. 6
      test-e2e/enable-dev-mode.spec.js

1
src/components/SelectCurrency/index.js

@ -40,7 +40,6 @@ const SelectCurrency = ({ onChange, value, t, placeholder, currencies, ...props
renderValue={renderOption}
options={options}
placeholder={placeholder || t('common.selectCurrency')}
data-e2e="test"
noOptionsMessage={({ inputValue }: { inputValue: string }) =>
t('common.selectCurrencyNoOption', { currencyName: inputValue })
}

2
src/components/base/CurrencyBadge.js

@ -45,7 +45,7 @@ function CurrencyBadge({ currency, ...props }: { currency: Currency }) {
<Box ff="Museo Sans|ExtraBold" color="dark" fontSize={2} style={{ letterSpacing: 2 }}>
{currency.ticker}
</Box>
<Box ff="Open Sans" color="dark" fontSize={5}>
<Box ff="Open Sans" color="dark" fontSize={5} data-e2e="currencyBadge">
{currency.name}
</Box>
</Box>

5
src/components/base/Modal/ModalBody.js

@ -42,7 +42,10 @@ class ModalBody extends PureComponent<Props, State> {
const { children, onClose, deferHeight, ...props } = this.props
const { isHidden } = this.state
return (
<Body style={{ height: isHidden && deferHeight ? deferHeight : undefined }}>
<Body
style={{ height: isHidden && deferHeight ? deferHeight : undefined }}
data-e2e="modalBody"
>
{onClose && (
<CloseContainer onClick={onClose}>
<IconCross size={16} />

6
test-e2e/enable-dev-mode.spec.js

@ -113,6 +113,12 @@ describe('Application launch', () => {
// Add New Account
await app.client.click('[data-e2e=menuAddAccount_button]')
await waitForExpectedText(app, '[data-e2e=modal_title]', 'Add accounts')
// Select Bitcoin Testnet from dropdown list
await app.client.setValue('[data-e2e=modalBody] input', 'Bitcoin testnet')
await app.client.keys('Enter')
const currencyBadge = await app.client.getText('[data-e2e=currencyBadge]')
expect(currencyBadge).toEqual('Bitcoin Testnet')
},
TIMEOUT,
)

Loading…
Cancel
Save