diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-17 21:11:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-17 21:11:29 +0300 |
commit | f1503ea64b21497db21094355ac574248dc243c4 (patch) | |
tree | 55e580a3494031039a9e65711d27b176dec6d342 /spec/frontend/jobs | |
parent | 5ff5438a0674c1e8217f78d2000c61c9d550c503 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/jobs')
-rw-r--r-- | spec/frontend/jobs/components/job_log_controllers_spec.js | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/spec/frontend/jobs/components/job_log_controllers_spec.js b/spec/frontend/jobs/components/job_log_controllers_spec.js index 4075abd24d5..aa85253a177 100644 --- a/spec/frontend/jobs/components/job_log_controllers_spec.js +++ b/spec/frontend/jobs/components/job_log_controllers_spec.js @@ -34,7 +34,7 @@ describe('Job log controllers', () => { jobLog: mockJobLog, }; - const createWrapper = (props, { jobLogSearch = false, jobLogJumpToFailures = false } = {}) => { + const createWrapper = (props, { jobLogJumpToFailures = false } = {}) => { wrapper = mount(JobLogControllers, { propsData: { ...defaultProps, @@ -42,7 +42,6 @@ describe('Job log controllers', () => { }, provide: { glFeatures: { - jobLogSearch, jobLogJumpToFailures, }, }, @@ -290,38 +289,27 @@ describe('Job log controllers', () => { }); describe('Job log search', () => { - describe('with feature flag off', () => { - it('does not display job log search', () => { - createWrapper(); - - expect(findJobLogSearch().exists()).toBe(false); - expect(findSearchHelp().exists()).toBe(false); - }); + beforeEach(() => { + createWrapper(); }); - describe('with feature flag on', () => { - beforeEach(() => { - createWrapper({}, { jobLogSearch: true }); - }); - - it('displays job log search', () => { - expect(findJobLogSearch().exists()).toBe(true); - expect(findSearchHelp().exists()).toBe(true); - }); + it('displays job log search', () => { + expect(findJobLogSearch().exists()).toBe(true); + expect(findSearchHelp().exists()).toBe(true); + }); - it('emits search results', () => { - const expectedSearchResults = [[[mockJobLog[6].lines[1], mockJobLog[6].lines[2]]]]; + it('emits search results', () => { + const expectedSearchResults = [[[mockJobLog[6].lines[1], mockJobLog[6].lines[2]]]]; - findJobLogSearch().vm.$emit('submit'); + findJobLogSearch().vm.$emit('submit'); - expect(wrapper.emitted('searchResults')).toEqual(expectedSearchResults); - }); + expect(wrapper.emitted('searchResults')).toEqual(expectedSearchResults); + }); - it('clears search results', () => { - findJobLogSearch().vm.$emit('clear'); + it('clears search results', () => { + findJobLogSearch().vm.$emit('clear'); - expect(wrapper.emitted('searchResults')).toEqual([[[]]]); - }); + expect(wrapper.emitted('searchResults')).toEqual([[[]]]); }); }); }); |