Skip to content

Commit

Permalink
release: 2.5.0 (#1962)
Browse files Browse the repository at this point in the history
* Updates LX hash

* Updates NEO and GAS logo assets

* Updates config.yml such that the windows config references electronuserland/builder:wine-01.19 (#1947)

* feature: Internationalization (#1933)

* First pass at gathering translations

* Adds more copy

* Adds react-intl

* Creates Intl wrapper component and begins implementation of translations

* Fixes key warning

* More translation implementation

* More translation implementation

* Updates snapshots fixes broken tests

* Adds language options to settings and state tree

* Fixes liting errors

* Fixes liting errors

* Adds translation support to CreateImportWalletForm.jsx

* Adds the korean translations for create/import wallet pages and login

* Updates snapshot tests and fixes flakey test

* Fixes broken tests

* Adds remaining korean and implements dashboard and sidebar translations

* Fixes flow and linting errors

* fixes linting issues

* Updates snapshot tests, test suite still failing

* Fixes broken test suite

* Updates settings view

* Updates progress panel HOC and encrypt form with translations

* Updates snapshot tests

* More translation additions and implementations

* Fixes broken tests and updates snapshots

* More translation implementation

* Fixes broken test

* Fixes broken test

* Cleans up buggy styles in WalletManager.scss

* Adds missing translations to import screen and finishes wallet manager translation implementation

* Updates snapshots

* Very close to full translation implementation

* Reverts changes to sketch file

* Fixes test suite

* Fixes linting errors

* Adds french translation file and settings constant

* Fixes small misc defects

* Updates snapshot tests

* Adds vietnamese translation file and settings constant

* Adds german translation file and settings constant

* Adds chinese to language options (#1949)

* feature: language setting dropdown (#1950)

* Squashes commits implements language option dropdown on home screen

* Updates snapshot tests

* Reverts unintentional changes

* Reverts unintentional changes

* Fixes linting error breaking CI

* audits npm deps for security issues (#1952)

* Updates package.json resolutions to fix numerous npm security warnings

* Updates package.json resolutions to fix numerous npm security warnings

* Updates package.json resolutions to fix numerous npm security warnings

* Fixes new linting errors introduces by dep upgrades

* Fixes new flow errors introduces by dep upgrades

* Fixes new linting errors introduces by dep upgrades

* Updates base docker image in config.yml

* Reverts changes to config.yml

* updates config.yml

* Try with --ignore-engines  flag

* Removes storybook and associated files (#1953)

* Removes storybook and associated files

* Adds --maxWorkers=10 flag to test command

* Adds --forceExit flag to test command

* attempting to debug circleCI timeout issue with --detectOpenHandles flag

* attempting to debug circleCI timeout issue with --detectOpenHandles flag

* More debugging nonsense

* More debugging nonsense

* updates test-ci command

* Adds back code coverage reporting

* remove --forceExit flag

* Reverts changes to code coverage upload

* Update README.md

* feature: Fixes broken dev build, cleans up dependency issues (#1955)

* Updates config.yml

* Cleans up issues in resolutions of package.json

* feature: updates core dependencies (where feasible) (#1956)

* Updates flow and react adds many instances of

* Renames deprecated lifecycle methods

* Fixes linting issues

* Fixes Sidebar.test.js

* Revert "feature: updates core dependencies (where feasible) (#1956)" (#1957)

This reverts commit 097df4b.

* feature: Fixes buggy CSS for network config tooltip (#1958)

* Fixes bug breaking layout and animations for NetworkConfigurationTooltip.jsx

* Updates snapshots

* Removes dead comment

* feature: final major round of translation polish (#1960)

* Implements missing translations in tooltip

* Adds missing translations and fixes various UI bugs

* Updates snapshots fixes broken tests

* Fixes broken test

* Updates snapshots

* More translation work

* Bumps version in package.json

* feature: improve language setting UI (#1964)

* Adds country flags to settings and login dropdowns

* Fixes flow errors

* Removes unused flag assets

* Adds unit tests for new component

* Fixes bug in Settings.jsx

* feature: implements feedback on release 2.5.0 (#1965)

* Adds missing translations, updates portuguese

* updates snapshots

* Adds additional missing translations

* Updates snapshots

* Finishes feedback implementation

* Adds missing tooltip translations to activity page

* Updates snapshots
  • Loading branch information
comountainclimber committed Apr 14, 2020
1 parent e437e66 commit 080a177
Show file tree
Hide file tree
Showing 196 changed files with 22,020 additions and 5,877 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ version: 2
references:
container_config: &container_config
docker:
- image: electronuserland/builder:wine-chrome
- image: electronuserland/builder:wine-chrome-05.18
environment:
TARGET_ARCH: x64
working_directory: ~/neon-wallet

win_config: &win_config
docker:
- image: electronuserland/builder:wine
- image: electronuserland/builder:wine-01.19
environment:
TARGET_ARCH: x64
working_directory: ~/neon-wallet
Expand All @@ -31,7 +31,7 @@ jobs:
- run: apt-get -y update
- run: apt-get -y install libusb-1.0-0-dev icnsutils graphicsmagick libudev-dev
- run: yarn config delete proxy
- run: yarn install --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn lint
- run: yarn flow
- run: yarn dist
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- run: apt-get -y update
- run: apt-get -y install libusb-1.0-0-dev icnsutils graphicsmagick libudev-dev
- run: apt-get install --no-install-recommends -y gcc-multilib g++-multilib
- run: yarn install --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn assets
- run: yarn build -w --x64
- store_artifacts:
Expand All @@ -95,7 +95,7 @@ jobs:
key: neon-wallet-dependencies-cache-{{ checksum "yarn.lock" }}
- run: apt-get -y update
- run: apt-get -y install libusb-1.0-0-dev icnsutils graphicsmagick libudev-dev
- run: yarn install --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn dist
- store_artifacts:
path: dist
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
app/flow-typed/*
app/translations/*
dist/*
__tests__/*
2 changes: 0 additions & 2 deletions .storybook/addons.js

This file was deleted.

11 changes: 0 additions & 11 deletions .storybook/config.js

This file was deleted.

34 changes: 0 additions & 34 deletions .storybook/webpack.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The latest release binaries can be found [here](https://neonwallet.com/), to bui

### Required Tools and Dependencies

- Node (This project uses the current LTS node version, which is `v6.11.0`)
- Node (This project uses the current LTS node version)
- Yarn (https://yarnpkg.com/lang/en/docs/install/)

### Developing and Running
Expand Down
12 changes: 6 additions & 6 deletions __mocks__/electron.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
app: {
getPath: () => {
return 'C:\\tmp\\mock_path'
},
getPath: () => 'C:\\tmp\\mock_path',
},
shell: {
openExternal: url => {
return true
},
openExternal: () => true,
},
remote: {
shell: () => undefined,
dialog: () => undefined,
},
}
62 changes: 58 additions & 4 deletions __tests__/components/Claim.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
import React from 'react'
import { shallow, mount } from 'enzyme'
import { progressValues } from 'spunky'
import { injectIntl } from 'react-intl'

import { createStore, provideStore } from '../testHelpers'
import Claim from '../../app/containers/Claim/Claim'
import IntlWrapper from '../../app/components/Root/IntlWrapper'
import { DEFAULT_LANGUAGE } from '../../app/core/constants'

const { LOADED } = progressValues

const ClaimWithIntl = injectIntl(Claim)

const initialState = {
spunky: {
settings: {
batch: false,
progress: LOADED,
data: {
language: DEFAULT_LANGUAGE,
},
loadedCount: 1,
},
},
}

const INTL_STUB = {
noClaimableGas: 'Address has no claimable GAS',
claimTimeDisclaimer: 'You can claim GAS once every 5 minutes',
claimUnavailableInWatch: 'GAS claims are unavailable in Watch mode',
}

describe('Claim', () => {
const props = {
Expand All @@ -11,18 +39,35 @@ describe('Claim', () => {
}

test('should render claim GAS button as enabled', () => {
const wrapper = shallow(<Claim {...props} />)
const wrapper = shallow(
<Claim intl={{ formatMessage: id => INTL_STUB[id] }} {...props} />,
)
expect(wrapper).toMatchSnapshot()
})

test('should render claim GAS button as disabled', () => {
const wrapper = shallow(<Claim {...props} disableClaimButton />)
const wrapper = shallow(
<Claim
intl={{ formatMessage: id => INTL_STUB[id] }}
{...props}
disableClaimButton
/>,
)
expect(wrapper).toMatchSnapshot()
})

test('should claim GAS when button is clicked', () => {
const claimSpy = jest.fn()
const wrapper = mount(<Claim {...props} doGasClaim={claimSpy} />)

const store = createStore(initialState)
const wrapper = mount(
provideStore(
<IntlWrapper>
<ClaimWithIntl {...props} doGasClaim={claimSpy} />
</IntlWrapper>,
store,
),
)

wrapper.find('button#claim').simulate('click')

Expand All @@ -33,7 +78,16 @@ describe('Claim', () => {
const claimSpy = jest.fn()
const watchOnlyProps = { ...props }
watchOnlyProps.isWatchOnly = true
const wrapper = mount(<Claim {...watchOnlyProps} doGasClaim={claimSpy} />)
const store = createStore(initialState)

const wrapper = mount(
provideStore(
<IntlWrapper>
<ClaimWithIntl {...watchOnlyProps} doGasClaim={claimSpy} />
</IntlWrapper>,
store,
),
)
expect(claimSpy).toHaveBeenCalledTimes(0)
expect(wrapper.find('button#claim').prop('disabled')).toBeTruthy()
})
Expand Down
21 changes: 19 additions & 2 deletions __tests__/components/Dashboard/AssetBalancesPanel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import { createStore, provideStore, provideState } from '../../testHelpers'
import AssetBalancesPanel from '../../../app/components/Dashboard/AssetBalancesPanel'
import {
DEFAULT_CURRENCY_CODE,
DEFAULT_LANGUAGE,
MAIN_NETWORK_ID,
ASSETS,
} from '../../../app/core/constants'
import IntlWrapper from '../../../app/components/Root/IntlWrapper'

const { LOADED } = progressValues

Expand All @@ -36,6 +38,7 @@ const initialState = {
data: {
currency: DEFAULT_CURRENCY_CODE,
tokens: [],
language: DEFAULT_LANGUAGE,
},
loadedCount: 1,
},
Expand Down Expand Up @@ -116,7 +119,14 @@ describe('AssetBalancesPanel', () => {
})

test.only('correctly renders data from state', () => {
const wrapper = mount(provideState(<AssetBalancesPanel />, initialState))
const wrapper = mount(
provideState(
<IntlWrapper>
<AssetBalancesPanel />
</IntlWrapper>,
initialState,
),
)

expect(wrapper.find('#neoWalletValue').text()).toEqual('$2,548,025.48')
expect(wrapper.find('#gasWalletValue').text()).toEqual('$18,100.00')
Expand All @@ -129,7 +139,14 @@ describe('AssetBalancesPanel', () => {

test('account data refreshes when refresh button is clicked', () => {
const store = createStore(initialState)
const wrapper = mount(provideStore(<AssetBalancesPanel />, store))
const wrapper = mount(
provideStore(
<IntlWrapper>
<AssetBalancesPanel />
</IntlWrapper>,
store,
),
)

wrapper
.find('#refresh')
Expand Down
30 changes: 27 additions & 3 deletions __tests__/components/Dashboard/PortfolioPanel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import {
DEFAULT_CURRENCY_CODE,
MAIN_NETWORK_ID,
ASSETS,
DEFAULT_LANGUAGE,
} from '../../../app/core/constants'
import PortfolioPanel from '../../../app/components/Dashboard/PortfolioPanel'
import PortfolioRow from '../../../app/components/Dashboard/PortfolioPanel/PortfolioRow'
import PortfolioTable from '../../../app/components/Dashboard/PortfolioPanel/PortfolioTable'
import PortfolioBreakdownChart from '../../../app/components/Dashboard/PortfolioPanel/PortfolioBreakdownChart'
import IntlWrapper from '../../../app/components/Root/IntlWrapper'

const { LOADED } = progressValues

Expand All @@ -40,6 +42,7 @@ const initialState = {
progress: LOADED,
data: {
currency: DEFAULT_CURRENCY_CODE,
language: DEFAULT_LANGUAGE,
tokens: [],
},
loadedCount: 1,
Expand Down Expand Up @@ -122,19 +125,40 @@ describe('PortfolioPanel', () => {

test.only('renders <PortfolioBreakDownChart/>', () => {
const store = createStore(initialState)
const wrapper = mount(provideStore(<PortfolioPanel />, store))
const wrapper = mount(
provideStore(
<IntlWrapper>
<PortfolioPanel />{' '}
</IntlWrapper>,
store,
),
)
expect(wrapper.find(PortfolioBreakdownChart)).to.have.length(1)
})

test.only('renders 2 <PortfolioRow/> for two assets saturated from store', () => {
const store = createStore(initialState)
const wrapper = mount(provideStore(<PortfolioPanel />, store))
const wrapper = mount(
provideStore(
<IntlWrapper>
<PortfolioPanel />
</IntlWrapper>,
store,
),
)
expect(wrapper.find(PortfolioRow)).to.have.length(2)
})

test('account data refreshes when refresh button is clicked', () => {
const store = createStore(initialState)
const wrapper = mount(provideStore(<PortfolioPanel />, store))
const wrapper = mount(
provideStore(
<IntlWrapper>
<PortfolioPanel />
</IntlWrapper>,
store,
),
)

wrapper
.find('#refresh')
Expand Down
Loading

0 comments on commit 080a177

Please sign in to comment.