diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-08 15:08:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-08 15:08:01 +0000 |
commit | a7df1d8717d39424ced032d9fe063f08f97e19d6 (patch) | |
tree | f887841557b509e950475176baa4d405bfd411f4 /spec/frontend/vue_mr_widget/components | |
parent | e3e300557f5def9bf2271735c8a620e6820dfada (diff) | |
download | gitlab-ce-a7df1d8717d39424ced032d9fe063f08f97e19d6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_mr_widget/components')
7 files changed, 13 insertions, 28 deletions
diff --git a/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js b/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js index f979d173eff..adada264865 100644 --- a/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js +++ b/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js @@ -29,7 +29,7 @@ describe('Merge Requests Artifacts list app', () => { }); const createComponent = () => { - wrapper = mount(localVue.extend(ArtifactsListApp), { + wrapper = mount(ArtifactsListApp, { propsData: { endpoint: TEST_HOST, }, diff --git a/spec/frontend/vue_mr_widget/components/artifacts_list_spec.js b/spec/frontend/vue_mr_widget/components/artifacts_list_spec.js index 8c805faf574..ab701775a7c 100644 --- a/spec/frontend/vue_mr_widget/components/artifacts_list_spec.js +++ b/spec/frontend/vue_mr_widget/components/artifacts_list_spec.js @@ -1,23 +1,21 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; import { GlLink } from '@gitlab/ui'; import ArtifactsList from '~/vue_merge_request_widget/components/artifacts_list.vue'; import { artifactsList } from './mock_data'; describe('Artifacts List', () => { let wrapper; - const localVue = createLocalVue(); const data = { artifacts: artifactsList, }; const mountComponent = props => { - wrapper = shallowMount(localVue.extend(ArtifactsList), { + wrapper = shallowMount(ArtifactsList, { propsData: { ...props, }, sync: false, - localVue, }); }; diff --git a/spec/frontend/vue_mr_widget/components/mr_widget_container_spec.js b/spec/frontend/vue_mr_widget/components/mr_widget_container_spec.js index 16c8c939a6f..60f970e0018 100644 --- a/spec/frontend/vue_mr_widget/components/mr_widget_container_spec.js +++ b/spec/frontend/vue_mr_widget/components/mr_widget_container_spec.js @@ -1,4 +1,4 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; import MrWidgetContainer from '~/vue_merge_request_widget/components/mr_widget_container.vue'; const BODY_HTML = '<div class="test-body">Hello World</div>'; @@ -8,10 +8,7 @@ describe('MrWidgetContainer', () => { let wrapper; const factory = (options = {}) => { - const localVue = createLocalVue(); - - wrapper = shallowMount(localVue.extend(MrWidgetContainer), { - localVue, + wrapper = shallowMount(MrWidgetContainer, { ...options, }); }; diff --git a/spec/frontend/vue_mr_widget/components/mr_widget_icon_spec.js b/spec/frontend/vue_mr_widget/components/mr_widget_icon_spec.js index f7c2376eebf..662b1160b0c 100644 --- a/spec/frontend/vue_mr_widget/components/mr_widget_icon_spec.js +++ b/spec/frontend/vue_mr_widget/components/mr_widget_icon_spec.js @@ -1,4 +1,4 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; import MrWidgetIcon from '~/vue_merge_request_widget/components/mr_widget_icon.vue'; import Icon from '~/vue_shared/components/icon.vue'; @@ -8,14 +8,11 @@ describe('MrWidgetIcon', () => { let wrapper; beforeEach(() => { - const localVue = createLocalVue(); - - wrapper = shallowMount(localVue.extend(MrWidgetIcon), { + wrapper = shallowMount(MrWidgetIcon, { propsData: { name: TEST_ICON, }, sync: false, - localVue, }); }); diff --git a/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js b/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js index 6483fec4121..9ee497036c7 100644 --- a/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js +++ b/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js @@ -1,7 +1,6 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; import CommitEdit from '~/vue_merge_request_widget/components/states/commit_edit.vue'; -const localVue = createLocalVue(); const testCommitMessage = 'Test commit message'; const testLabel = 'Test label'; const testInputId = 'test-input-id'; @@ -10,8 +9,7 @@ describe('Commits edit component', () => { let wrapper; const createComponent = (slots = {}) => { - wrapper = shallowMount(localVue.extend(CommitEdit), { - localVue, + wrapper = shallowMount(CommitEdit, { sync: false, propsData: { value: testCommitMessage, diff --git a/spec/frontend/vue_mr_widget/components/states/mr_widget_commit_message_dropdown_spec.js b/spec/frontend/vue_mr_widget/components/states/mr_widget_commit_message_dropdown_spec.js index d1310515856..1096d5b3fa7 100644 --- a/spec/frontend/vue_mr_widget/components/states/mr_widget_commit_message_dropdown_spec.js +++ b/spec/frontend/vue_mr_widget/components/states/mr_widget_commit_message_dropdown_spec.js @@ -1,8 +1,7 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; import { GlDropdownItem } from '@gitlab/ui'; import CommitMessageDropdown from '~/vue_merge_request_widget/components/states/commit_message_dropdown.vue'; -const localVue = createLocalVue(); const commits = [ { title: 'Commit 1', @@ -25,8 +24,7 @@ describe('Commits message dropdown component', () => { let wrapper; const createComponent = () => { - wrapper = shallowMount(localVue.extend(CommitMessageDropdown), { - localVue, + wrapper = shallowMount(CommitMessageDropdown, { sync: false, propsData: { commits, diff --git a/spec/frontend/vue_mr_widget/components/states/mr_widget_commits_header_spec.js b/spec/frontend/vue_mr_widget/components/states/mr_widget_commits_header_spec.js index 3176a288d49..bc646d6dcd5 100644 --- a/spec/frontend/vue_mr_widget/components/states/mr_widget_commits_header_spec.js +++ b/spec/frontend/vue_mr_widget/components/states/mr_widget_commits_header_spec.js @@ -1,15 +1,12 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; import CommitsHeader from '~/vue_merge_request_widget/components/states/commits_header.vue'; import Icon from '~/vue_shared/components/icon.vue'; -const localVue = createLocalVue(); - describe('Commits header component', () => { let wrapper; const createComponent = props => { - wrapper = shallowMount(localVue.extend(CommitsHeader), { - localVue, + wrapper = shallowMount(CommitsHeader, { sync: false, propsData: { isSquashEnabled: false, |