Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-09 12:07:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-09 12:07:51 +0300
commit5afd8575506372dd64c238203bd05b4826f3ae2e (patch)
treee167192fdc7d73fcc1aa5bd33b535b813120ec37 /spec/frontend/vue_shared/components
parent8bda404e2919234c299f088b7d8d04f8449125de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components')
-rw-r--r--spec/frontend/vue_shared/components/callout_spec.js7
-rw-r--r--spec/frontend/vue_shared/components/expand_button_spec.js7
-rw-r--r--spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js7
-rw-r--r--spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js7
-rw-r--r--spec/frontend/vue_shared/components/notes/system_note_spec.js5
-rw-r--r--spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js5
-rw-r--r--spec/frontend/vue_shared/components/pagination_links_spec.js5
-rw-r--r--spec/frontend/vue_shared/components/time_ago_tooltip_spec.js3
8 files changed, 12 insertions, 34 deletions
diff --git a/spec/frontend/vue_shared/components/callout_spec.js b/spec/frontend/vue_shared/components/callout_spec.js
index 91208dfb31a..7c9bb6b4650 100644
--- a/spec/frontend/vue_shared/components/callout_spec.js
+++ b/spec/frontend/vue_shared/components/callout_spec.js
@@ -1,17 +1,14 @@
-import { createLocalVue, shallowMount } from '@vue/test-utils';
+import { shallowMount } from '@vue/test-utils';
import Callout from '~/vue_shared/components/callout.vue';
const TEST_MESSAGE = 'This is a callout message!';
const TEST_SLOT = '<button>This is a callout slot!</button>';
-const localVue = createLocalVue();
-
describe('Callout Component', () => {
let wrapper;
const factory = options => {
- wrapper = shallowMount(localVue.extend(Callout), {
- localVue,
+ wrapper = shallowMount(Callout, {
...options,
});
};
diff --git a/spec/frontend/vue_shared/components/expand_button_spec.js b/spec/frontend/vue_shared/components/expand_button_spec.js
index e0893d02843..3b1c8f6219c 100644
--- a/spec/frontend/vue_shared/components/expand_button_spec.js
+++ b/spec/frontend/vue_shared/components/expand_button_spec.js
@@ -1,5 +1,5 @@
import Vue from 'vue';
-import { mount, createLocalVue } from '@vue/test-utils';
+import { mount } from '@vue/test-utils';
import ExpandButton from '~/vue_shared/components/expand_button.vue';
const text = {
@@ -14,10 +14,7 @@ describe('Expand button', () => {
const expanderAppendEl = () => wrapper.find('.js-text-expander-append');
const factory = (options = {}) => {
- const localVue = createLocalVue();
-
- wrapper = mount(localVue.extend(ExpandButton), {
- localVue,
+ wrapper = mount(ExpandButton, {
...options,
});
};
diff --git a/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js b/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
index 21d05471d51..85cd90d2f8c 100644
--- a/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
+++ b/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
@@ -1,5 +1,5 @@
import Vue from 'vue';
-import { mount, createLocalVue } from '@vue/test-utils';
+import { mount } from '@vue/test-utils';
import { formatDate } from '~/lib/utils/datetime_utility';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import {
@@ -29,10 +29,7 @@ describe('RelatedIssuableItem', () => {
};
beforeEach(() => {
- const localVue = createLocalVue();
-
- wrapper = mount(localVue.extend(RelatedIssuableItem), {
- localVue,
+ wrapper = mount(RelatedIssuableItem, {
slots,
sync: false,
attachToDocument: true,
diff --git a/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js b/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
index 71f9b5e3244..3d42c02ebb6 100644
--- a/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
+++ b/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
@@ -1,9 +1,7 @@
import { GlLoadingIcon } from '@gitlab/ui';
-import { shallowMount, createLocalVue } from '@vue/test-utils';
+import { shallowMount } from '@vue/test-utils';
import SuggestionDiffHeader from '~/vue_shared/components/markdown/suggestion_diff_header.vue';
-const localVue = createLocalVue();
-
const DEFAULT_PROPS = {
canApply: true,
isApplied: false,
@@ -14,12 +12,11 @@ describe('Suggestion Diff component', () => {
let wrapper;
const createComponent = props => {
- wrapper = shallowMount(localVue.extend(SuggestionDiffHeader), {
+ wrapper = shallowMount(SuggestionDiffHeader, {
propsData: {
...DEFAULT_PROPS,
...props,
},
- localVue,
sync: false,
attachToDocument: true,
});
diff --git a/spec/frontend/vue_shared/components/notes/system_note_spec.js b/spec/frontend/vue_shared/components/notes/system_note_spec.js
index 603c37c6c49..080dd778e29 100644
--- a/spec/frontend/vue_shared/components/notes/system_note_spec.js
+++ b/spec/frontend/vue_shared/components/notes/system_note_spec.js
@@ -1,12 +1,10 @@
-import { createLocalVue, mount } from '@vue/test-utils';
+import { mount } from '@vue/test-utils';
import IssueSystemNote from '~/vue_shared/components/notes/system_note.vue';
import createStore from '~/notes/stores';
import initMRPopovers from '~/mr_popover/index';
jest.mock('~/mr_popover/index', () => jest.fn());
-const localVue = createLocalVue();
-
describe('system note component', () => {
let vm;
let props;
@@ -34,7 +32,6 @@ describe('system note component', () => {
vm = mount(IssueSystemNote, {
store,
- localVue,
propsData: props,
attachToDocument: true,
sync: false,
diff --git a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
index be6c58f0683..f73d3edec5d 100644
--- a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
+++ b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
@@ -1,14 +1,11 @@
-import { shallowMount, createLocalVue } from '@vue/test-utils';
+import { shallowMount } from '@vue/test-utils';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
describe(`TimelineEntryItem`, () => {
let wrapper;
const factory = (options = {}) => {
- const localVue = createLocalVue();
-
wrapper = shallowMount(TimelineEntryItem, {
- localVue,
...options,
});
};
diff --git a/spec/frontend/vue_shared/components/pagination_links_spec.js b/spec/frontend/vue_shared/components/pagination_links_spec.js
index efa5825d92f..3c53cda45f5 100644
--- a/spec/frontend/vue_shared/components/pagination_links_spec.js
+++ b/spec/frontend/vue_shared/components/pagination_links_spec.js
@@ -1,4 +1,4 @@
-import { mount, createLocalVue } from '@vue/test-utils';
+import { mount } from '@vue/test-utils';
import { GlPagination } from '@gitlab/ui';
import PaginationLinks from '~/vue_shared/components/pagination_links.vue';
import {
@@ -10,8 +10,6 @@ import {
LABEL_LAST_PAGE,
} from '~/vue_shared/components/pagination/constants';
-const localVue = createLocalVue();
-
describe('Pagination links component', () => {
const pageInfo = {
page: 3,
@@ -38,7 +36,6 @@ describe('Pagination links component', () => {
change: changeMock,
pageInfo,
},
- localVue,
sync: false,
});
};
diff --git a/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js b/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js
index ebba0cc4ad4..49591c3ce1c 100644
--- a/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js
+++ b/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js
@@ -1,4 +1,4 @@
-import { shallowMount, createLocalVue } from '@vue/test-utils';
+import { shallowMount } from '@vue/test-utils';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import { formatDate, getTimeago } from '~/lib/utils/datetime_utility';
@@ -10,7 +10,6 @@ describe('Time ago with tooltip component', () => {
attachToDocument: true,
sync: false,
propsData,
- localVue: createLocalVue(),
});
};
const timestamp = '2017-05-08T14:57:39.781Z';