Commit 29ca04e5 authored by peterhegman's avatar peterhegman

Fix failing spec due to icon change

parent 73937308
......@@ -76,8 +76,9 @@ describe('Issuable component', () => {
});
const checkExists = findFn => () => findFn().exists();
const hasConfidentialIcon = () =>
wrapper.findAll(GlIcon).wrappers.some(iconWrapper => iconWrapper.props('name') === 'eye-slash');
const hasIcon = (iconName, iconWrapper = wrapper) =>
iconWrapper.findAll(GlIcon).wrappers.some(icon => icon.props('name') === iconName);
const hasConfidentialIcon = () => hasIcon('eye-slash');
const findTaskStatus = () => wrapper.find('.task-status');
const findOpenedAgoContainer = () => wrapper.find('[data-testid="openedByMessage"]');
const findAuthor = () => wrapper.find({ ref: 'openedAgoByContainer' });
......@@ -286,11 +287,7 @@ describe('Issuable component', () => {
it('renders milestone', () => {
expect(findMilestone().exists()).toBe(true);
expect(
findMilestone()
.find('.fa-clock-o')
.exists(),
).toBe(true);
expect(hasIcon('clock', findMilestone())).toBe(true);
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