Commit 59c11ede authored by Tristan Read's avatar Tristan Read Committed by Kyle Wiebers

Fix failing incident status spec

parent b4bfc7b0
...@@ -153,7 +153,7 @@ describe('SidebarEscalationStatus', () => { ...@@ -153,7 +153,7 @@ describe('SidebarEscalationStatus', () => {
await selectAcknowledgedStatus(); await selectAcknowledgedStatus();
}); });
it('calls the mutation', async () => { it('calls the mutation', () => {
const mutationVariables = { const mutationVariables = {
iid: '1', iid: '1',
projectPath: 'gitlab-org/gitlab', projectPath: 'gitlab-org/gitlab',
...@@ -163,12 +163,17 @@ describe('SidebarEscalationStatus', () => { ...@@ -163,12 +163,17 @@ describe('SidebarEscalationStatus', () => {
expect(mutationResolverMock).toHaveBeenCalledWith(mutationVariables); expect(mutationResolverMock).toHaveBeenCalledWith(mutationVariables);
}); });
it('closes the dropdown', async () => { it('closes the dropdown', () => {
expect(findStatusComponent().isVisible()).toBe(false); expect(findStatusComponent().isVisible()).toBe(false);
}); });
it('updates the status', async () => { it('updates the status', () => {
expect(findStatusComponent().attributes('value')).toBe(STATUS_ACKNOWLEDGED); // Sometimes status has a intermediate wrapping component. A quirk of vue-test-utils
// means that in that case 'value' is exposed as a prop. If no wrapping component
// exists it is exposed as an attribute.
const statusValue =
findStatusComponent().props('value') || findStatusComponent().attributes('value');
expect(statusValue).toBe(STATUS_ACKNOWLEDGED);
}); });
}); });
......
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