summaryrefslogtreecommitdiffstats
path: root/test/input
diff options
context:
space:
mode:
authorSteven Thomas <steve.thomas@amdocs.com>2018-09-13 16:22:40 -0400
committerSteven Thomas <steve.thomas@amdocs.com>2018-09-13 16:23:05 -0400
commit96319fec0d2af2be5802a56d6b05a3ada939c8df (patch)
tree630e87f62fbbebcded761bf3e67d0f3eb5b78598 /test/input
parentd1975c8134f0401b0ccebf3719eda129d53dac14 (diff)
increasing test coverage to 20 percent
Issue-ID: AAI-1599 Change-Id: I345e38d4319e52b56de0a33d7065e02617cc2103 Signed-off-by: Steven Thomas <steve.thomas@amdocs.com>
Diffstat (limited to 'test/input')
-rw-r--r--test/input/SelectInput.test.js13
-rw-r--r--test/input/ToggleInput.test.js12
2 files changed, 25 insertions, 0 deletions
diff --git a/test/input/SelectInput.test.js b/test/input/SelectInput.test.js
new file mode 100644
index 0000000..a669361
--- /dev/null
+++ b/test/input/SelectInput.test.js
@@ -0,0 +1,13 @@
+import React from 'react';
+import { mount } from 'enzyme';
+import Select from 'react-select';
+
+import SelectInput from 'generic-components/input/SelectInput.jsx';
+
+describe('SelectInput Tests', () => {
+ it('render select input - visible', () => {
+ const select = mount( <SelectInput /> );
+ expect(select).toHaveLength(1); // ensure the message bar is mounted
+ expect(select.find(Select)).toHaveLength(1); // ensure the InlineMessage is mounted
+ });
+})
diff --git a/test/input/ToggleInput.test.js b/test/input/ToggleInput.test.js
new file mode 100644
index 0000000..80f0345
--- /dev/null
+++ b/test/input/ToggleInput.test.js
@@ -0,0 +1,12 @@
+import React from 'react';
+import { mount } from 'enzyme';
+
+import ToggleInput from 'generic-components/input/ToggleInput.jsx';
+
+describe('ToggleInput Tests', () => {
+ it('render toggle input - visible', () => {
+ const toggle = mount( <ToggleInput /> );
+ expect(toggle).toHaveLength(1); // ensure the message bar is mounted
+ expect(toggle.find('input')).toHaveLength(1); // ensure the InlineMessage is mounted
+ });
+})