aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-11 14:37:33 +0800
committerDan <danjm.com@gmail.com>2018-05-11 14:37:33 +0800
commit5d79d126484a25ed6ad7f07c779ba91900abae7c (patch)
tree6c87097c14a58beacf1bbb6dcab6f8e4785874b3
parent22e2806ae22548c78f94c90e11597a823351d80f (diff)
downloaddexon-wallet-5d79d126484a25ed6ad7f07c779ba91900abae7c.tar.gz
dexon-wallet-5d79d126484a25ed6ad7f07c779ba91900abae7c.tar.zst
dexon-wallet-5d79d126484a25ed6ad7f07c779ba91900abae7c.zip
SendRowErrorMessage component test.
-rw-r--r--ui/app/components/send_/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/ui/app/components/send_/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js b/ui/app/components/send_/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js
new file mode 100644
index 00000000..2304a43d
--- /dev/null
+++ b/ui/app/components/send_/send-content/send-row-wrapper/send-row-error-message/tests/send-row-error-message-component.test.js
@@ -0,0 +1,28 @@
+import React from 'react'
+import assert from 'assert'
+import { shallow } from 'enzyme'
+import SendRowErrorMessage from '../send-row-error-message.component.js'
+
+describe('SendRowErrorMessage Component', function () {
+ let wrapper
+
+ beforeEach(() => {
+ wrapper = shallow(<SendRowErrorMessage
+ errors={{ error1: 'abc', error2: 'def' }}
+ errorType={'error3'}
+ />, { context: { t: str => str + '_t' } })
+ })
+
+ describe('render', () => {
+ it('should render null if the passed errors do not contain an error of errorType', () => {
+ assert.equal(wrapper.find('.send-v2__error').length, 0)
+ assert.equal(wrapper.html(), null)
+ })
+
+ it('should render an error message if the passed errors contain an error of errorType', () => {
+ wrapper.setProps({ errors: { error1: 'abc', error2: 'def', error3: 'xyz' } })
+ assert.equal(wrapper.find('.send-v2__error').length, 1)
+ assert.equal(wrapper.find('.send-v2__error').text(), 'xyz_t')
+ })
+ })
+})
an Eßer2022-09-081-2/+0 * Add WWW entries to port MakefilesStefan Eßer2022-09-081-0/+1 * rust: bring back update to 1.63Baptiste Daroussin2022-08-251-1/+1 * Revert "lang/rust: Bump revisions after 1.63.0"Piotr Kubaj2022-08-251-1/+1 * lang/rust: Bump revisions after 1.63.0Mikael Urankar2022-08-251-1/+1 * lang/rust: Bump revisions after 1.62.0Mikael Urankar2022-07-021-1/+1 * lang/rust: Bump revisions after 1.61.0Mikael Urankar2022-05-311-1/+1 * lang/rust: Relink ports after the Rust 1.60.0 updateTobias Kortkamp2022-05-031-1/+1 * lang/rust: Bump revisions after 1.59.0Mikael Urankar2022-03-151-1/+1 * lang/rust: Relink consumersTobias Kortkamp2022-02-031-1/+1 * lang/rust: Bump revisions after 1.58.0Tobias Kortkamp2022-01-171-1/+1 * lang/rust: Rebuild consumers for Rust 1.57.0Tobias Kortkamp2021-12-051-1/+1 * textproc/angle-grinder: fix build on powerpcPiotr Kubaj2021-11-161-0/+62 * *: Rebuild for Rust 1.56.0Tobias Kortkamp2021-10-251-0/+1 * textproc/angle-grinder: Update to 0.18.0Lewis Cook2021-10-073-227/+254 * *: Rebuild lang/rust consumers after the 1.55.0 updateTobias Kortkamp2021-09-191-1/+1 * lang/rust: Rebuild consumers for 1.54.0Mikael Urankar2021-08-281-0/+1 * textproc/angle-grinder: Update to 0.17.0Lewis Cook2021-08-023-695/+650 * */*: fix all ports using Rust on powerpc that fail due to libcPiotr Kubaj2021-06-291-0/+62 * lang/rust: Rebuild consumers for 1.53.0Tobias Kortkamp2021-06-271-1/+1 * Rebuild lang/rust consumers after d8837418ea743776Tobias Kortkamp2021-05-121-1/+1 * textproc/angle-grinder: Unbreak build with Rust 1.52.0 (D30099)Tobias Kortkamp2021-05-083-20/+19 * One more small cleanup, forgotten yesterday.Mathieu Arnold2021-04-071-1/+0 * Remove # $FreeBSD$ from Makefiles.Mathieu Arnold2021-04-061-1/+0 * Rebuild lang/rust consumers after r569489Tobias Kortkamp2021-03-301-1/+1 * lang/rust: Update to 1.50.0Mikael Urankar2021-02-141-0/+1 * Update MAINTAINER fields for myself (lcook)Lewis Cook2021-01-221-1/+1 * textproc/angle-grinder: Update to 0.16Fernando Apesteguía2021-01-202-318/+361 * lang/rust: Update to 1.49.0Mikael Urankar2021-01-061-1/+1 * lang/rust: Update to 1.48.0Mikael Urankar2020-11-241-1/+1 * lang/rust: Update to 1.47.0Mikael Urankar2020-10-131-0/+1 * textproc/angle-grinder: Update to 0.15.0Dmitri Goutnik2020-09-053-511/+459