Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Sep 4, 2020
1 parent 3a34553 commit e3967aa
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,34 +114,41 @@ describe('CaseView ', () => {
expect(wrapper.find(`[data-test-subj="case-view-title"]`).first().prop('title')).toEqual(
data.title
);

expect(wrapper.find(`[data-test-subj="case-view-status"]`).first().text()).toEqual(
data.status
);

expect(
wrapper
.find(`[data-test-subj="case-view-tag-list"] [data-test-subj="case-tag-coke"]`)
.first()
.text()
).toEqual(data.tags[0]);

expect(
wrapper
.find(`[data-test-subj="case-view-tag-list"] [data-test-subj="case-tag-pepsi"]`)
.first()
.text()
).toEqual(data.tags[1]);

expect(wrapper.find(`[data-test-subj="case-view-username"]`).first().text()).toEqual(
data.createdBy.username
);

expect(wrapper.contains(`[data-test-subj="case-view-closedAt"]`)).toBe(false);

expect(wrapper.find(`[data-test-subj="case-view-createdAt"]`).first().prop('value')).toEqual(
data.createdAt
);

expect(
wrapper
.find(`[data-test-subj="description-action"] [data-test-subj="user-action-markdown"]`)
.first()
.prop('raw')
).toEqual(data.description);
.text()
).toBe(data.description);
});
});

Expand Down
Loading

0 comments on commit e3967aa

Please sign in to comment.