diff options
Diffstat (limited to 'spec/frontend/environments/environment_pin_spec.js')
-rw-r--r-- | spec/frontend/environments/environment_pin_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/frontend/environments/environment_pin_spec.js b/spec/frontend/environments/environment_pin_spec.js index 5cdd52294b6..a9a58071e12 100644 --- a/spec/frontend/environments/environment_pin_spec.js +++ b/spec/frontend/environments/environment_pin_spec.js @@ -1,4 +1,4 @@ -import { GlButton, GlIcon } from '@gitlab/ui'; +import { GlDropdownItem } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import PinComponent from '~/environments/components/environment_pin.vue'; import eventHub from '~/environments/event_hub'; @@ -30,15 +30,15 @@ describe('Pin Component', () => { wrapper.destroy(); }); - it('should render the component with thumbtack icon', () => { - expect(wrapper.find(GlIcon).props('name')).toBe('thumbtack'); + it('should render the component with descriptive text', () => { + expect(wrapper.text()).toBe('Prevent auto-stopping'); }); it('should emit onPinClick when clicked', () => { const eventHubSpy = jest.spyOn(eventHub, '$emit'); - const button = wrapper.find(GlButton); + const item = wrapper.find(GlDropdownItem); - button.vm.$emit('click'); + item.vm.$emit('click'); expect(eventHubSpy).toHaveBeenCalledWith('cancelAutoStop', autoStopUrl); }); |