Skip to content

Commit

Permalink
Add error icon test to ResultItem.test.js
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yan <jonoy@canva.com>
  • Loading branch information
Jono Yan committed Apr 13, 2022
1 parent 5afa09b commit 62d2370
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ it('<ResultItem /> should not render any ServiceTags when there are no services'
const serviceTags = wrapper.find(`[data-test="${markers.SERVICE_TAGS}"]`).find(Tag);
expect(serviceTags).toHaveLength(0);
});

it('<ResultItem /> should render error icon on ServiceTags that have an error tag', () => {
trace.spans[0].tags.push({ key: 'error', value: true });
const wrapper = shallow(<ResultItem trace={trace} durationPercent={50} linkTo="" />);
const errorServiceTags = wrapper.find('.ResultItem--errorIcon').getElements();
expect(errorServiceTags).toHaveLength(1);
});

0 comments on commit 62d2370

Please sign in to comment.