aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@users.noreply.github.com>2018-11-20 08:06:34 +0800
committerGitHub <noreply@github.com>2018-11-20 08:06:34 +0800
commit4c87c05a02d5bf5634234a74910e5d3e559dd413 (patch)
tree638338429538e6bc62b5ad812c11e1f7925fe184 /test
parent7fe37276a17cbbcb566a0650603eb5ed6115179b (diff)
downloadtangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.gz
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.bz2
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.lz
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.xz
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.zst
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.zip
Fix rounding issue when sending max tokens (#5695)
* Fix rounding issue when sending max tokens * Ensure amount row shows exact amount of max tokens on send screen (#2) * Fix tests * Change stored redux value from BigNumber to hex string. Fix TokenInput default value
Diffstat (limited to 'test')
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js8
-rw-r--r--test/unit/ui/app/selectors.spec.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 2b5c8ee18..0ef945f8d 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -840,7 +840,7 @@ describe('MetaMask', function () {
})
it('renders the balance for the new token', async () => {
- const balance = await findElement(driver, By.css('.transaction-view-balance .transaction-view-balance__token-balance'))
+ const balance = await findElement(driver, By.css('.transaction-view-balance .transaction-view-balance__primary-balance'))
await driver.wait(until.elementTextMatches(balance, /^100\s*TST\s*$/))
const tokenAmount = await balance.getText()
assert.ok(/^100\s*TST\s*$/.test(tokenAmount))
@@ -1019,8 +1019,8 @@ describe('MetaMask', function () {
// test cancelled on firefox until https://github.com/mozilla/geckodriver/issues/906 is resolved,
// or possibly until we use latest version of firefox in the tests
if (process.env.SELENIUM_BROWSER !== 'firefox') {
- const tokenBalanceAmount = await findElement(driver, By.css('.transaction-view-balance__token-balance'))
- assert.equal(await tokenBalanceAmount.getText(), '43 TST')
+ const tokenBalanceAmount = await findElements(driver, By.css('.transaction-view-balance__primary-balance'))
+ await driver.wait(until.elementTextMatches(tokenBalanceAmount[0], /43\s*TST/))
}
})
})
@@ -1180,7 +1180,7 @@ describe('MetaMask', function () {
})
it('renders the balance for the chosen token', async () => {
- const balance = await findElement(driver, By.css('.transaction-view-balance__token-balance'))
+ const balance = await findElement(driver, By.css('.transaction-view-balance__primary-balance'))
await driver.wait(until.elementTextMatches(balance, /0\s*BAT/))
await delay(regularDelayMs)
})
diff --git a/test/unit/ui/app/selectors.spec.js b/test/unit/ui/app/selectors.spec.js
index 78c4267ee..e2b198abf 100644
--- a/test/unit/ui/app/selectors.spec.js
+++ b/test/unit/ui/app/selectors.spec.js
@@ -148,7 +148,7 @@ describe('Selectors', function () {
it('#getSelectedTokenToFiatRate', () => {
const selectedTokenToFiatRate = selectors.getSelectedTokenToFiatRate(mockState)
- assert.equal(selectedTokenToFiatRate, '0.21880988420033493')
+ assert.equal(selectedTokenToFiatRate, '0.21880988420033492152')
})
describe('#getSelectedTokenContract', () => {