From 96319fec0d2af2be5802a56d6b05a3ada939c8df Mon Sep 17 00:00:00 2001 From: Steven Thomas Date: Thu, 13 Sep 2018 16:22:40 -0400 Subject: increasing test coverage to 20 percent Issue-ID: AAI-1599 Change-Id: I345e38d4319e52b56de0a33d7065e02617cc2103 Signed-off-by: Steven Thomas --- test/input/SelectInput.test.js | 13 +++++++++++++ test/input/ToggleInput.test.js | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/input/SelectInput.test.js create mode 100644 test/input/ToggleInput.test.js (limited to 'test/input') 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( ); + 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( ); + expect(toggle).toHaveLength(1); // ensure the message bar is mounted + expect(toggle.find('input')).toHaveLength(1); // ensure the InlineMessage is mounted + }); +}) -- cgit 1.2.3-korg