Commit 7173fa11 authored by pburdette's avatar pburdette

Refactor stage spec

Stage spec was not working
and never has been. Re worked
the spec and changed a class in
the component.
parent bfb16d59
......@@ -137,7 +137,7 @@ export default {
},
isDropdownOpen() {
return this.$el.classList.contains('open');
return this.$el.classList.contains('show');
},
pipelineActionRequestComplete() {
......
......@@ -81,10 +81,15 @@ describe('Pipelines stage component', () => {
});
it('should close the dropdown', () => {
wrapper.trigger('click');
wrapper.setMethods({
closeDropdown: jest.fn(),
isDropdownOpen: jest.fn().mockReturnValue(false),
});
wrapper.find('button').trigger('click');
return waitForPromises().then(() => {
expect(wrapper.classes('open')).toBe(false);
expect(wrapper.vm.closeDropdown).toHaveBeenCalled();
});
});
});
......
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