Skip to content

Commit

Permalink
Added some tests to AccordianKeyValues
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
  • Loading branch information
rubenvp8510 committed May 3, 2019
1 parent 8f9e291 commit dcfa684
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import React from 'react';
import { shallow } from 'enzyme';
import IoIosWarning from 'react-icons/lib/io/android-warning';

import AccordianKeyValues, { KeyValuesSummary } from './AccordianKeyValues';
import * as markers from './AccordianKeyValues.markers';
Expand Down Expand Up @@ -91,4 +92,10 @@ describe('<AccordianKeyValues>', () => {
expect(table.length).toBe(1);
expect(table.prop('data')).toBe(tags);
});

it('renders right icon', () => {
const rightIcon = <IoIosWarning />;
wrapper.setProps({ isOpen: true, rightIcon });
expect(wrapper.find(rightIcon).length).toBe(0);
});
});

0 comments on commit dcfa684

Please sign in to comment.