diff --git a/tests/view/components/dropdown.js b/tests/view/components/dropdown.js
index 1c50fa757a..0cc67cb481 100644
--- a/tests/view/components/dropdown.js
+++ b/tests/view/components/dropdown.js
@@ -16,6 +16,7 @@ import { mount } from 'enzyme';
import Dropdown from '../../../view/admin/components/common/Dropdown.js';
describe('Dropdown component tests', () => {
+ const ZERO = 0;
const ONE = 1;
const DUMMY_STRING = 'COOL';
const DUMMY_FUNCTION = () => {};
@@ -24,9 +25,10 @@ describe('Dropdown component tests', () => {
* Sets up the component with dummy prop values.
* @param {Object} propAddons Optional object specifying
* overrides to the default props
+ * @param {ReactElem} childElems The react elements
* @returns {Object} The rendered component
*/
- function setup(propAddons) {
+ function setup(propAddons, childElems) {
const defaultProps = {
options: [],
dropDownStyle: {},
@@ -38,17 +40,55 @@ describe('Dropdown component tests', () => {
showSearchIcon: false,
onAddNewButton: DUMMY_FUNCTION,
onClickItem: DUMMY_FUNCTION,
+ showInputElem: false, //default
};
// update props as needed
if (propAddons) {
Object.assign(defaultProps, propAddons);
}
// use monut to test all lifecycle methods, and children
- const enzymeWrapper = mount(