aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-04-10 08:01:27 +0800
committerDan <danjm.com@gmail.com>2018-04-10 08:01:27 +0800
commit285265ce8aba4c1c9685c2dff0e16fab3b2daca7 (patch)
treed6d63e34ab2a3698dad4c25041fb93a67e4e917f /test/integration
parent4e6c0574dd70ea216636eb07612c6e568428c510 (diff)
downloadtangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.tar
tangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.tar.gz
tangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.tar.bz2
tangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.tar.lz
tangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.tar.xz
tangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.tar.zst
tangerine-wallet-browser-285265ce8aba4c1c9685c2dff0e16fab3b2daca7.zip
Add basic currency localization test.
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/lib/currency-localization.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/integration/lib/currency-localization.js b/test/integration/lib/currency-localization.js
new file mode 100644
index 000000000..7705c9720
--- /dev/null
+++ b/test/integration/lib/currency-localization.js
@@ -0,0 +1,28 @@
+const reactTriggerChange = require('../../lib/react-trigger-change')
+const {
+ timeout,
+ queryAsync,
+ findAsync,
+} = require('../../lib/util')
+
+QUnit.module('currency localization')
+
+QUnit.test('renders localized currency', (assert) => {
+ const done = assert.async()
+ runCurrencyLocalizationTest(assert).then(done).catch((err) => {
+ assert.notOk(err, `Error was thrown: ${err.stack}`)
+ done()
+ })
+})
+
+async function runCurrencyLocalizationTest(assert, done) {
+ console.log('*** start runCurrencyLocalizationTest')
+ const selectState = await queryAsync($, 'select')
+ selectState.val('currency localization')
+ reactTriggerChange(selectState[0])
+ await timeout(1000)
+ const txView = await queryAsync($, '.tx-view')
+ const heroBalance = await findAsync($(txView), '.hero-balance')
+ const fiatAmount = await findAsync($(heroBalance), '.fiat-amount')
+ assert.equal(fiatAmount[0].textContent, '₱102,707.97')
+}