Commit 307ebe6d authored by Phil Hughes's avatar Phil Hughes

Merge branch 'design-management-ee-to-cc-fe-files' into 'master'

Design Management FE to FOSS Part 1/3: Move Design Management JS from EE to CE

See merge request gitlab-org/gitlab!31058
parents 6440be5d 0a6262bd
......@@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', () => {
initRelatedIssues();
if (document.getElementById('js-design-management')) {
import(/* webpackChunkName: 'design_management' */ 'ee/design_management')
import(/* webpackChunkName: 'design_management' */ '~/design_management')
.then(module => module.default())
.catch(() => {});
}
......
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlModal, GlModalDirective } from '@gitlab/ui';
import BatchDeleteButton from 'ee/design_management/components/delete_button.vue';
import BatchDeleteButton from '~/design_management/components/delete_button.vue';
describe('Batch delete button component', () => {
let wrapper;
......
import { shallowMount } from '@vue/test-utils';
import DesignNotePin from 'ee/design_management/components/design_note_pin.vue';
import DesignNotePin from '~/design_management/components/design_note_pin.vue';
describe('Design discussions component', () => {
let wrapper;
......
import { shallowMount } from '@vue/test-utils';
import { ApolloMutation } from 'vue-apollo';
import DesignDiscussion from 'ee/design_management/components/design_notes/design_discussion.vue';
import DesignNote from 'ee/design_management/components/design_notes/design_note.vue';
import DesignReplyForm from 'ee/design_management/components/design_notes/design_reply_form.vue';
import createNoteMutation from 'ee/design_management/graphql/mutations/createNote.mutation.graphql';
import DesignDiscussion from '~/design_management/components/design_notes/design_discussion.vue';
import DesignNote from '~/design_management/components/design_notes/design_note.vue';
import DesignReplyForm from '~/design_management/components/design_notes/design_reply_form.vue';
import createNoteMutation from '~/design_management/graphql/mutations/createNote.mutation.graphql';
import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue';
describe('Design discussions component', () => {
......
import { shallowMount } from '@vue/test-utils';
import DesignNote from 'ee/design_management/components/design_notes/design_note.vue';
import DesignNote from '~/design_management/components/design_notes/design_note.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
......
import { mount } from '@vue/test-utils';
import DesignReplyForm from 'ee/design_management/components/design_notes/design_reply_form.vue';
import DesignReplyForm from '~/design_management/components/design_notes/design_reply_form.vue';
describe('Design reply form component', () => {
let wrapper;
......
import { mount } from '@vue/test-utils';
import DesignOverlay from 'ee/design_management/components/design_overlay.vue';
import DesignOverlay from '~/design_management/components/design_overlay.vue';
import notes from '../mock_data/notes';
describe('Design overlay component', () => {
......
import { shallowMount } from '@vue/test-utils';
import DesignPresentation from 'ee/design_management/components/design_presentation.vue';
import DesignOverlay from 'ee/design_management/components/design_overlay.vue';
import DesignPresentation from '~/design_management/components/design_presentation.vue';
import DesignOverlay from '~/design_management/components/design_overlay.vue';
const mockOverlayData = {
overlayDimensions: {
......
import { shallowMount } from '@vue/test-utils';
import DesignScaler from 'ee/design_management/components/design_scaler.vue';
import DesignScaler from '~/design_management/components/design_scaler.vue';
describe('Design management design scaler component', () => {
let wrapper;
......
import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import DesignImage from 'ee/design_management/components/image.vue';
import DesignImage from '~/design_management/components/image.vue';
describe('Design management large image component', () => {
let wrapper;
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlIcon, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui';
import VueRouter from 'vue-router';
import Item from 'ee/design_management/components/list/item.vue';
import Item from '~/design_management/components/list/item.vue';
const localVue = createLocalVue();
localVue.use(VueRouter);
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import VueRouter from 'vue-router';
import Toolbar from 'ee/design_management/components/toolbar/index.vue';
import DeleteButton from 'ee/design_management/components/delete_button.vue';
import { DESIGNS_ROUTE_NAME } from 'ee/design_management/router/constants';
import Toolbar from '~/design_management/components/toolbar/index.vue';
import DeleteButton from '~/design_management/components/delete_button.vue';
import { DESIGNS_ROUTE_NAME } from '~/design_management/router/constants';
import { GlDeprecatedButton } from '@gitlab/ui';
const localVue = createLocalVue();
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import VueRouter from 'vue-router';
import PaginationButton from 'ee/design_management/components/toolbar/pagination_button.vue';
import { DESIGN_ROUTE_NAME } from 'ee/design_management/router/constants';
import PaginationButton from '~/design_management/components/toolbar/pagination_button.vue';
import { DESIGN_ROUTE_NAME } from '~/design_management/router/constants';
const localVue = createLocalVue();
localVue.use(VueRouter);
......
/* global Mousetrap */
import 'mousetrap';
import { shallowMount } from '@vue/test-utils';
import Pagination from 'ee/design_management/components/toolbar/pagination.vue';
import { DESIGN_ROUTE_NAME } from 'ee/design_management/router/constants';
import Pagination from '~/design_management/components/toolbar/pagination.vue';
import { DESIGN_ROUTE_NAME } from '~/design_management/router/constants';
const push = jest.fn();
const $router = {
......
import { shallowMount } from '@vue/test-utils';
import UploadButton from 'ee/design_management/components/upload/button.vue';
import UploadButton from '~/design_management/components/upload/button.vue';
describe('Design management upload button component', () => {
let wrapper;
......
import { shallowMount } from '@vue/test-utils';
import DesignDropzone from 'ee/design_management/components/upload/design_dropzone.vue';
import DesignDropzone from '~/design_management/components/upload/design_dropzone.vue';
import createFlash from '~/flash';
jest.mock('~/flash');
......
import { shallowMount } from '@vue/test-utils';
import DesignVersionDropdown from 'ee/design_management/components/upload/design_version_dropdown.vue';
import DesignVersionDropdown from '~/design_management/components/upload/design_version_dropdown.vue';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import mockAllVersions from './mock_data/all_versions';
......
......@@ -2,11 +2,11 @@ import { shallowMount } from '@vue/test-utils';
import { GlAlert } from '@gitlab/ui';
import { ApolloMutation } from 'vue-apollo';
import createFlash from '~/flash';
import DesignIndex from 'ee/design_management/pages/design/index.vue';
import DesignDiscussion from 'ee/design_management/components/design_notes/design_discussion.vue';
import DesignReplyForm from 'ee/design_management/components/design_notes/design_reply_form.vue';
import DesignIndex from '~/design_management/pages/design/index.vue';
import DesignDiscussion from '~/design_management/components/design_notes/design_discussion.vue';
import DesignReplyForm from '~/design_management/components/design_notes/design_reply_form.vue';
import Participants from '~/sidebar/components/participants/participants.vue';
import createImageDiffNoteMutation from 'ee/design_management/graphql/mutations/createImageDiffNote.mutation.graphql';
import createImageDiffNoteMutation from '~/design_management/graphql/mutations/createImageDiffNote.mutation.graphql';
import design from '../../mock_data/design';
import mockResponseWithDesigns from '../../mock_data/designs';
import mockResponseNoDesigns from '../../mock_data/no_designs';
......@@ -14,8 +14,8 @@ import mockAllVersions from '../../mock_data/all_versions';
import {
DESIGN_NOT_FOUND_ERROR,
DESIGN_VERSION_NOT_EXIST_ERROR,
} from 'ee/design_management/utils/error_messages';
import { DESIGNS_ROUTE_NAME } from 'ee/design_management/router/constants';
} from '~/design_management/utils/error_messages';
import { DESIGNS_ROUTE_NAME } from '~/design_management/router/constants';
jest.mock('~/flash');
jest.mock('mousetrap', () => ({
......
......@@ -3,16 +3,16 @@ import { ApolloMutation } from 'vue-apollo';
import VueRouter from 'vue-router';
import { GlEmptyState } from '@gitlab/ui';
import Index from 'ee/design_management/pages/index.vue';
import uploadDesignQuery from 'ee/design_management/graphql/mutations/uploadDesign.mutation.graphql';
import DesignDestroyer from 'ee/design_management/components/design_destroyer.vue';
import DesignDropzone from 'ee/design_management/components/upload/design_dropzone.vue';
import DeleteButton from 'ee/design_management/components/delete_button.vue';
import { DESIGNS_ROUTE_NAME } from 'ee/design_management/router/constants';
import Index from '~/design_management/pages/index.vue';
import uploadDesignQuery from '~/design_management/graphql/mutations/uploadDesign.mutation.graphql';
import DesignDestroyer from '~/design_management/components/design_destroyer.vue';
import DesignDropzone from '~/design_management/components/upload/design_dropzone.vue';
import DeleteButton from '~/design_management/components/delete_button.vue';
import { DESIGNS_ROUTE_NAME } from '~/design_management/router/constants';
import {
EXISTING_DESIGN_DROP_MANY_FILES_MESSAGE,
EXISTING_DESIGN_DROP_INVALID_FILENAME_MESSAGE,
} from 'ee/design_management/utils/error_messages';
} from '~/design_management/utils/error_messages';
import createFlash from '~/flash';
const localVue = createLocalVue();
......
import { mount, createLocalVue } from '@vue/test-utils';
import VueRouter from 'vue-router';
import App from 'ee/design_management/components/app.vue';
import Designs from 'ee/design_management/pages/index.vue';
import DesignDetail from 'ee/design_management/pages/design/index.vue';
import createRouter from 'ee/design_management/router';
import App from '~/design_management/components/app.vue';
import Designs from '~/design_management/pages/index.vue';
import DesignDetail from '~/design_management/pages/design/index.vue';
import createRouter from '~/design_management/router';
import {
ROOT_ROUTE_NAME,
DESIGNS_ROUTE_NAME,
DESIGN_ROUTE_NAME,
} from 'ee/design_management/router/constants';
} from '~/design_management/router/constants';
import '~/commons/bootstrap';
jest.mock('mousetrap', () => ({
......
......@@ -5,13 +5,13 @@ import {
updateStoreAfterAddImageDiffNote,
updateStoreAfterUploadDesign,
updateStoreAfterUpdateImageDiffNote,
} from 'ee/design_management/utils/cache_update';
} from '~/design_management/utils/cache_update';
import {
designDeletionError,
ADD_DISCUSSION_COMMENT_ERROR,
ADD_IMAGE_DIFF_NOTE_ERROR,
UPDATE_IMAGE_DIFF_NOTE_ERROR,
} from 'ee/design_management/utils/error_messages';
} from '~/design_management/utils/error_messages';
import design from '../mock_data/design';
import createFlash from '~/flash';
......
......@@ -6,7 +6,7 @@ import {
updateImageDiffNoteOptimisticResponse,
isValidDesignFile,
extractDesign,
} from 'ee/design_management/utils/design_management_utils';
} from '~/design_management/utils/design_management_utils';
import mockResponseNoDesigns from '../mock_data/no_designs';
import mockResponseWithDesigns from '../mock_data/designs';
import mockDesign from '../mock_data/design';
......
import {
designDeletionError,
designUploadSkippedWarning,
} from 'ee/design_management/utils/error_messages';
} from '~/design_management/utils/error_messages';
const mockFilenames = n =>
Array(n)
......
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