Commit 878e6929 authored by Paul Slaughter's avatar Paul Slaughter

Rename vue_component_helper to text_helper

**Why?**
This file only contains a few text based helper functions.
It has nothing to do with Vue or Vue components.
parent 9afe8d3b
import Vue from 'vue'; import Vue from 'vue';
import { TEST_HOST } from 'spec/test_constants'; import { TEST_HOST } from 'spec/test_constants';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
import { getTimeago } from '~/lib/utils/datetime_utility'; import { getTimeago } from '~/lib/utils/datetime_utility';
import CommitItem from '~/diffs/components/commit_item.vue'; import CommitItem from '~/diffs/components/commit_item.vue';
import getDiffWithCommit from '../mock_data/diff_with_commit'; import getDiffWithCommit from '../mock_data/diff_with_commit';
......
...@@ -3,7 +3,7 @@ import MockAdapter from 'axios-mock-adapter'; ...@@ -3,7 +3,7 @@ import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import environmentsFolderViewComponent from '~/environments/folder/environments_folder_view.vue'; import environmentsFolderViewComponent from '~/environments/folder/environments_folder_view.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { removeBreakLine, removeWhitespace } from 'spec/helpers/vue_component_helper'; import { removeBreakLine, removeWhitespace } from 'spec/helpers/text_helper';
import { environmentsList } from '../mock_data'; import { environmentsList } from '../mock_data';
describe('Environments Folder View', () => { describe('Environments Folder View', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import frequentItemsListItemComponent from '~/frequent_items/components/frequent_items_list_item.vue'; import frequentItemsListItemComponent from '~/frequent_items/components/frequent_items_list_item.vue';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
import { mockProject } from '../mock_data'; // can also use 'mockGroup', but not useful to test here import { mockProject } from '../mock_data'; // can also use 'mockGroup', but not useful to test here
const createComponent = () => { const createComponent = () => {
......
...@@ -3,7 +3,7 @@ import store from '~/ide/stores'; ...@@ -3,7 +3,7 @@ import store from '~/ide/stores';
import listCollapsed from '~/ide/components/commit_sidebar/list_collapsed.vue'; import listCollapsed from '~/ide/components/commit_sidebar/list_collapsed.vue';
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import { file } from '../../helpers'; import { file } from '../../helpers';
import { removeWhitespace } from '../../../helpers/vue_component_helper'; import { removeWhitespace } from '../../../helpers/text_helper';
describe('Multi-file editor commit sidebar list collapsed', () => { describe('Multi-file editor commit sidebar list collapsed', () => {
let vm; let vm;
......
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import IdeReview from '~/ide/components/ide_review.vue'; import IdeReview from '~/ide/components/ide_review.vue';
import store from '~/ide/stores'; import store from '~/ide/stores';
import { createComponentWithStore } from '../../helpers/vue_mount_component_helper'; import { createComponentWithStore } from '../../helpers/vue_mount_component_helper';
import { trimText } from '../../helpers/vue_component_helper'; import { trimText } from '../../helpers/text_helper';
import { resetStore, file } from '../helpers'; import { resetStore, file } from '../helpers';
import { projectData } from '../mock_data'; import { projectData } from '../mock_data';
......
import Vue from 'vue'; import Vue from 'vue';
import NavDropdownButton from '~/ide/components/nav_dropdown_button.vue'; import NavDropdownButton from '~/ide/components/nav_dropdown_button.vue';
import store from '~/ide/stores'; import store from '~/ide/stores';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import { resetStore } from '../helpers'; import { resetStore } from '../helpers';
......
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import { getTimeago } from '~/lib/utils/datetime_utility'; import { getTimeago } from '~/lib/utils/datetime_utility';
import component from '~/jobs/components/artifacts_block.vue'; import component from '~/jobs/components/artifacts_block.vue';
import mountComponent from '../../helpers/vue_mount_component_helper'; import mountComponent from '../../helpers/vue_mount_component_helper';
import { trimText } from '../../helpers/vue_component_helper'; import { trimText } from '../../helpers/text_helper';
describe('Artifacts block', () => { describe('Artifacts block', () => {
const Component = Vue.extend(component); const Component = Vue.extend(component);
......
...@@ -3,7 +3,7 @@ import sidebarDetailsBlock from '~/jobs/components/sidebar.vue'; ...@@ -3,7 +3,7 @@ import sidebarDetailsBlock from '~/jobs/components/sidebar.vue';
import createStore from '~/jobs/store'; import createStore from '~/jobs/store';
import job, { stages, jobsInStage } from '../mock_data'; import job, { stages, jobsInStage } from '../mock_data';
import { mountComponentWithStore } from '../../helpers/vue_mount_component_helper'; import { mountComponentWithStore } from '../../helpers/vue_mount_component_helper';
import { trimText } from '../../helpers/vue_component_helper'; import { trimText } from '../../helpers/text_helper';
describe('Sidebar details block', () => { describe('Sidebar details block', () => {
const SidebarComponent = Vue.extend(sidebarDetailsBlock); const SidebarComponent = Vue.extend(sidebarDetailsBlock);
......
import Vue from 'vue'; import Vue from 'vue';
import component from '~/jobs/components/stages_dropdown.vue'; import component from '~/jobs/components/stages_dropdown.vue';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
import mountComponent from '../../helpers/vue_mount_component_helper'; import mountComponent from '../../helpers/vue_mount_component_helper';
describe('Stages Dropdown', () => { describe('Stages Dropdown', () => {
......
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import component from '~/reports/components/modal.vue'; import component from '~/reports/components/modal.vue';
import state from '~/reports/store/state'; import state from '~/reports/store/state';
import mountComponent from '../../helpers/vue_mount_component_helper'; import mountComponent from '../../helpers/vue_mount_component_helper';
import { trimText } from '../../helpers/vue_component_helper'; import { trimText } from '../../helpers/text_helper';
describe('Grouped Test Reports Modal', () => { describe('Grouped Test Reports Modal', () => {
const Component = Vue.extend(component); const Component = Vue.extend(component);
......
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import component from '~/reports/components/test_issue_body.vue'; import component from '~/reports/components/test_issue_body.vue';
import createStore from '~/reports/store'; import createStore from '~/reports/store';
import { mountComponentWithStore } from '../../helpers/vue_mount_component_helper'; import { mountComponentWithStore } from '../../helpers/vue_mount_component_helper';
import { trimText } from '../../helpers/vue_component_helper'; import { trimText } from '../../helpers/text_helper';
import { issue } from '../mock_data/mock_data'; import { issue } from '../mock_data/mock_data';
describe('Test Issue body', () => { describe('Test Issue body', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import pipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue'; import pipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
import mockData from '../mock_data'; import mockData from '../mock_data';
describe('MRWidgetPipeline', () => { describe('MRWidgetPipeline', () => {
......
import $ from 'jquery'; import $ from 'jquery';
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createLocalVue, shallowMount } from '@vue/test-utils';
import ConflictsComponent from '~/vue_merge_request_widget/components/states/mr_widget_conflicts.vue'; import ConflictsComponent from '~/vue_merge_request_widget/components/states/mr_widget_conflicts.vue';
import { removeBreakLine } from 'spec/helpers/vue_component_helper'; import { removeBreakLine } from 'spec/helpers/text_helper';
describe('MRWidgetConflicts', () => { describe('MRWidgetConflicts', () => {
let vm; let vm;
......
import Vue from 'vue'; import Vue from 'vue';
import pipelineBlockedComponent from '~/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue'; import pipelineBlockedComponent from '~/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { removeBreakLine } from 'spec/helpers/vue_component_helper'; import { removeBreakLine } from 'spec/helpers/text_helper';
describe('MRWidgetPipelineBlocked', () => { describe('MRWidgetPipelineBlocked', () => {
let vm; let vm;
......
import Vue from 'vue'; import Vue from 'vue';
import PipelineFailed from '~/vue_merge_request_widget/components/states/pipeline_failed.vue'; import PipelineFailed from '~/vue_merge_request_widget/components/states/pipeline_failed.vue';
import { removeBreakLine } from 'spec/helpers/vue_component_helper'; import { removeBreakLine } from 'spec/helpers/text_helper';
describe('PipelineFailed', () => { describe('PipelineFailed', () => {
describe('template', () => { describe('template', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import ShaMismatch from '~/vue_merge_request_widget/components/states/sha_mismatch.vue'; import ShaMismatch from '~/vue_merge_request_widget/components/states/sha_mismatch.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { removeBreakLine } from 'spec/helpers/vue_component_helper'; import { removeBreakLine } from 'spec/helpers/text_helper';
describe('ShaMismatch', () => { describe('ShaMismatch', () => {
let vm; let vm;
......
import ProjectListItem from '~/vue_shared/components/project_selector/project_list_item.vue'; import ProjectListItem from '~/vue_shared/components/project_selector/project_list_item.vue';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
const localVue = createLocalVue(); const localVue = createLocalVue();
......
...@@ -3,7 +3,7 @@ import _ from 'underscore'; ...@@ -3,7 +3,7 @@ import _ from 'underscore';
import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue'; import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue';
import ProjectListItem from '~/vue_shared/components/project_selector/project_list_item.vue'; import ProjectListItem from '~/vue_shared/components/project_selector/project_list_item.vue';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
describe('ProjectSelector component', () => { describe('ProjectSelector component', () => {
let wrapper; let wrapper;
......
...@@ -3,7 +3,7 @@ import Jed from 'jed'; ...@@ -3,7 +3,7 @@ import Jed from 'jed';
import locale from '~/locale'; import locale from '~/locale';
import Translate from '~/vue_shared/translate'; import Translate from '~/vue_shared/translate';
import { trimText } from 'spec/helpers/vue_component_helper'; import { trimText } from 'spec/helpers/text_helper';
describe('Vue translate filter', () => { describe('Vue translate filter', () => {
let el; let el;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment