diff options
Diffstat (limited to 'spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js')
-rw-r--r-- | spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js b/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js index bcd2c14f2fa..0b6a2e6ceb9 100644 --- a/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js +++ b/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js @@ -1,11 +1,12 @@ import { createMockDirective } from 'helpers/vue_mock_directive'; import { mount } from '@vue/test-utils'; +import { stubTransition } from 'helpers/stub_transition'; import TimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue'; describe('Issuable Time Tracker', () => { let wrapper; - const findByTestId = testId => wrapper.find(`[data-testid=${testId}]`); + const findByTestId = (testId) => wrapper.find(`[data-testid=${testId}]`); const findComparisonMeter = () => findByTestId('compareMeter').attributes('title'); const findCollapsedState = () => findByTestId('collapsedState'); const findTimeRemainingProgress = () => findByTestId('timeRemainingProgress'); @@ -22,6 +23,9 @@ describe('Issuable Time Tracker', () => { mount(TimeTracker, { propsData: { ...defaultProps, ...props }, directives: { GlTooltip: createMockDirective() }, + stubs: { + transition: stubTransition(), + }, }); afterEach(() => { @@ -213,14 +217,12 @@ describe('Issuable Time Tracker', () => { findHelpButton().trigger('click'); await wrapper.vm.$nextTick(); - expect(findByTestId('helpPane').classes('help-state-toggle-enter')).toBe(true); - expect(findByTestId('helpPane').classes('help-state-toggle-leave')).toBe(false); + expect(findByTestId('helpPane').exists()).toBe(true); findCloseHelpButton().trigger('click'); await wrapper.vm.$nextTick(); - expect(findByTestId('helpPane').classes('help-state-toggle-leave')).toBe(true); - expect(findByTestId('helpPane').classes('help-state-toggle-enter')).toBe(false); + expect(findByTestId('helpPane').exists()).toBe(false); }); }); }); |