Commit 29ca04e5 authored by peterhegman's avatar peterhegman

Fix failing spec due to icon change

parent 73937308
...@@ -76,8 +76,9 @@ describe('Issuable component', () => { ...@@ -76,8 +76,9 @@ describe('Issuable component', () => {
}); });
const checkExists = findFn => () => findFn().exists(); const checkExists = findFn => () => findFn().exists();
const hasConfidentialIcon = () => const hasIcon = (iconName, iconWrapper = wrapper) =>
wrapper.findAll(GlIcon).wrappers.some(iconWrapper => iconWrapper.props('name') === 'eye-slash'); iconWrapper.findAll(GlIcon).wrappers.some(icon => icon.props('name') === iconName);
const hasConfidentialIcon = () => hasIcon('eye-slash');
const findTaskStatus = () => wrapper.find('.task-status'); const findTaskStatus = () => wrapper.find('.task-status');
const findOpenedAgoContainer = () => wrapper.find('[data-testid="openedByMessage"]'); const findOpenedAgoContainer = () => wrapper.find('[data-testid="openedByMessage"]');
const findAuthor = () => wrapper.find({ ref: 'openedAgoByContainer' }); const findAuthor = () => wrapper.find({ ref: 'openedAgoByContainer' });
...@@ -286,11 +287,7 @@ describe('Issuable component', () => { ...@@ -286,11 +287,7 @@ describe('Issuable component', () => {
it('renders milestone', () => { it('renders milestone', () => {
expect(findMilestone().exists()).toBe(true); expect(findMilestone().exists()).toBe(true);
expect( expect(hasIcon('clock', findMilestone())).toBe(true);
findMilestone()
.find('.fa-clock-o')
.exists(),
).toBe(true);
expect(findMilestone().text()).toEqual(TEST_MILESTONE.title); expect(findMilestone().text()).toEqual(TEST_MILESTONE.title);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment