Commit d46b4a0d authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '263670-consider-moving-members-to-main-javascripts-directory' into 'master'

Move members JS from `vue_shared` to main JS directory [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!46995
parents 26b1c5d1 19a751e7
<script>
import { mapState, mapMutations } from 'vuex';
import { GlAlert } from '@gitlab/ui';
import MembersTable from '~/vue_shared/components/members/table/members_table.vue';
import MembersTable from '~/members/components/table/members_table.vue';
import { scrollToElement } from '~/lib/utils/common_utils';
import { HIDE_ERROR } from '~/vuex_shared/modules/members/mutation_types';
import { HIDE_ERROR } from '~/members/store/mutation_types';
export default {
name: 'GroupMembersApp',
......
......@@ -3,7 +3,7 @@ import Vuex from 'vuex';
import { GlToast } from '@gitlab/ui';
import { parseDataAttributes } from 'ee_else_ce/groups/members/utils';
import App from './components/app.vue';
import membersModule from '~/vuex_shared/modules/members';
import membersStore from '~/members/store';
export const initGroupMembersApp = (el, tableFields, tableAttrs, requestFormatter) => {
if (!el) {
......@@ -13,15 +13,15 @@ export const initGroupMembersApp = (el, tableFields, tableAttrs, requestFormatte
Vue.use(Vuex);
Vue.use(GlToast);
const store = new Vuex.Store({
...membersModule({
const store = new Vuex.Store(
membersStore({
...parseDataAttributes(el),
currentUserId: gon.current_user_id || null,
tableFields,
tableAttrs,
requestFormatter,
}),
});
);
return new Vue({
el,
......
......@@ -2,7 +2,7 @@
import { GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';
import LeaveModal from '../modals/leave_modal.vue';
import { LEAVE_MODAL_ID } from '../constants';
import { LEAVE_MODAL_ID } from '../../constants';
export default {
name: 'LeaveButton',
......
......@@ -11,7 +11,7 @@ export default {
RemoveMemberButton,
LeaveButton,
LdapOverrideButton: () =>
import('ee_component/vue_shared/components/members/ldap/ldap_override_button.vue'),
import('ee_component/members/components/ldap/ldap_override_button.vue'),
},
props: {
member: {
......
<script>
import { GlAvatarLink, GlAvatarLabeled } from '@gitlab/ui';
import { AVATAR_SIZE } from '../constants';
import { AVATAR_SIZE } from '../../constants';
export default {
name: 'GroupAvatar',
......
<script>
import { GlAvatarLabeled } from '@gitlab/ui';
import { AVATAR_SIZE } from '../constants';
import { AVATAR_SIZE } from '../../constants';
export default {
name: 'InviteAvatar',
......
......@@ -5,9 +5,9 @@ import {
GlBadge,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import { generateBadges } from 'ee_else_ce/vue_shared/components/members/utils';
import { generateBadges } from 'ee_else_ce/members/utils';
import { __ } from '~/locale';
import { AVATAR_SIZE } from '../constants';
import { AVATAR_SIZE } from '../../constants';
import { glEmojiTag } from '~/emoji';
export default {
......
......@@ -3,7 +3,7 @@ import { mapState } from 'vuex';
import { GlModal, GlForm, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import csrf from '~/lib/utils/csrf';
import { __, s__, sprintf } from '~/locale';
import { LEAVE_MODAL_ID } from '../constants';
import { LEAVE_MODAL_ID } from '../../constants';
export default {
name: 'LeaveModal',
......
......@@ -3,7 +3,7 @@ import { mapState, mapActions } from 'vuex';
import { GlModal, GlSprintf, GlForm } from '@gitlab/ui';
import csrf from '~/lib/utils/csrf';
import { __, s__, sprintf } from '~/locale';
import { REMOVE_GROUP_LINK_MODAL_ID } from '../constants';
import { REMOVE_GROUP_LINK_MODAL_ID } from '../../constants';
export default {
name: 'RemoveGroupLinkModal',
......
......@@ -6,7 +6,7 @@ import {
formatDate,
getDayDifference,
} from '~/lib/utils/datetime_utility';
import { DAYS_TO_EXPIRE_SOON } from '../constants';
import { DAYS_TO_EXPIRE_SOON } from '../../constants';
export default {
name: 'ExpiresAt',
......
......@@ -3,7 +3,7 @@ import UserActionButtons from '../action_buttons/user_action_buttons.vue';
import GroupActionButtons from '../action_buttons/group_action_buttons.vue';
import InviteActionButtons from '../action_buttons/invite_action_buttons.vue';
import AccessRequestActionButtons from '../action_buttons/access_request_action_buttons.vue';
import { MEMBER_TYPES } from '../constants';
import { MEMBER_TYPES } from '../../constants';
export default {
name: 'MemberActionButtons',
......
<script>
import { mapState } from 'vuex';
import { GlTable, GlBadge } from '@gitlab/ui';
import MembersTableCell from 'ee_else_ce/vue_shared/components/members/table/members_table_cell.vue';
import {
canOverride,
canRemove,
canResend,
canUpdate,
} from 'ee_else_ce/vue_shared/components/members/utils';
import { FIELDS } from '../constants';
import MembersTableCell from 'ee_else_ce/members/components/table/members_table_cell.vue';
import { canOverride, canRemove, canResend, canUpdate } from 'ee_else_ce/members/utils';
import { FIELDS } from '../../constants';
import initUserPopovers from '~/user_popovers';
import MemberAvatar from './member_avatar.vue';
import MemberSource from './member_source.vue';
......@@ -34,9 +29,7 @@ export default {
RemoveGroupLinkModal,
ExpirationDatepicker,
LdapOverrideConfirmationModal: () =>
import(
'ee_component/vue_shared/components/members/ldap/ldap_override_confirmation_modal.vue'
),
import('ee_component/members/components/ldap/ldap_override_confirmation_modal.vue'),
},
computed: {
...mapState(['members', 'tableFields', 'tableAttrs', 'currentUserId', 'sourceId']),
......
<script>
import { mapState } from 'vuex';
import { MEMBER_TYPES } from '../constants';
import { isGroup, isDirectMember, isCurrentUser, canRemove, canResend, canUpdate } from '../utils';
import { MEMBER_TYPES } from '../../constants';
import {
isGroup,
isDirectMember,
isCurrentUser,
canRemove,
canResend,
canUpdate,
} from '../../utils';
export default {
name: 'MembersTableCell',
......
......@@ -9,8 +9,7 @@ export default {
components: {
GlDropdown,
GlDropdownItem,
LdapDropdownItem: () =>
import('ee_component/vue_shared/components/members/ldap/ldap_dropdown_item.vue'),
LdapDropdownItem: () => import('ee_component/members/components/ldap/ldap_dropdown_item.vue'),
},
props: {
member: {
......
import createState from 'ee_else_ce/members/store/state';
import mutations from 'ee_else_ce/members/store/mutations';
import * as actions from 'ee_else_ce/members/store/actions';
export default initialState => ({
state: createState(initialState),
actions,
mutations,
});
import createState from 'ee_else_ce/vuex_shared/modules/members/state';
import mutations from 'ee_else_ce/vuex_shared/modules/members/mutations';
import * as actions from 'ee_else_ce/vuex_shared/modules/members/actions';
export default initialState => ({
namespaced: true,
state: createState(initialState),
actions,
mutations,
});
......@@ -2,7 +2,7 @@
import { mapState, mapActions } from 'vuex';
import { GlModal, GlSprintf } from '@gitlab/ui';
import { __, s__ } from '~/locale';
import { LDAP_OVERRIDE_CONFIRMATION_MODAL_ID } from '../constants';
import { LDAP_OVERRIDE_CONFIRMATION_MODAL_ID } from '../../constants';
export default {
name: 'LdapOverrideConfirmationModal',
......
<script>
import CEMembersTableCell from '~/vue_shared/components/members/table/members_table_cell.vue';
import { canOverride } from '../utils';
import CEMembersTableCell from '~/members/components/table/members_table_cell.vue';
import { canOverride } from '../../utils';
export default {
name: 'MembersTableCell',
......
import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils';
export * from '~/vuex_shared/modules/members/actions';
export * from '~/members/store/actions';
export const updateLdapOverride = async ({ state, commit }, { memberId, override }) => {
try {
......
import Vue from 'vue';
import * as types from './mutation_types';
import CEMutations from '~/vuex_shared/modules/members/mutations';
import CEMutations from '~/members/store/mutations';
import { s__ } from '~/locale';
import { findMember } from '~/vuex_shared/modules/members/utils';
import { findMember } from '~/members/store/utils';
export default {
...CEMutations,
......
import createState from '~/vuex_shared/modules/members/state';
import createState from '~/members/store/state';
export default initialState => {
const { ldapOverridePath } = initialState;
......
import { __ } from '~/locale';
import { generateBadges as CEGenerateBadges } from '~/vue_shared/components/members/utils';
import { generateBadges as CEGenerateBadges } from '~/members/utils';
export {
isGroup,
......@@ -8,7 +8,7 @@ export {
canRemove,
canResend,
canUpdate,
} from '~/vue_shared/components/members/utils';
} from '~/members/utils';
export const generateBadges = (member, isCurrentUser) => [
...CEGenerateBadges(member, isCurrentUser),
......
import { shallowMount } from '@vue/test-utils';
import LdapOverrideButton from 'ee/vue_shared/components/members/ldap/ldap_override_button.vue';
import waitForPromises from 'helpers/wait_for_promises';
import { member } from 'jest/vue_shared/components/members/mock_data';
import UserActionButtons from '~/vue_shared/components/members/action_buttons/user_action_buttons.vue';
import { member } from 'jest/members/mock_data';
import LdapOverrideButton from 'ee/members/components/ldap/ldap_override_button.vue';
import UserActionButtons from '~/members/components/action_buttons/user_action_buttons.vue';
describe('UserActionButtons', () => {
let wrapper;
......
import { GlBadge } from '@gitlab/ui';
import { mount } from '@vue/test-utils';
import { member as memberMock } from 'jest/vue_shared/components/members/mock_data';
import UserAvatar from '~/vue_shared/components/members/avatars/user_avatar.vue';
import { member as memberMock } from 'jest/members/mock_data';
import UserAvatar from '~/members/components/avatars/user_avatar.vue';
describe('UserAvatar', () => {
let wrapper;
......
import { GlDropdownItem } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import LdapDropdownItem from 'ee/vue_shared/components/members/ldap/ldap_dropdown_item.vue';
import waitForPromises from 'helpers/wait_for_promises';
import LdapDropdownItem from 'ee/members/components/ldap/ldap_dropdown_item.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { GlButton } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import LdapOverrideButton from 'ee/vue_shared/components/members/ldap/ldap_override_button.vue';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { member } from 'jest/vue_shared/components/members/mock_data';
import { member } from 'jest/members/mock_data';
import LdapOverrideButton from 'ee/members/components/ldap/ldap_override_button.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
......
......@@ -3,10 +3,10 @@ import { within } from '@testing-library/dom';
import { mount, createLocalVue, createWrapper } from '@vue/test-utils';
import { nextTick } from 'vue';
import Vuex from 'vuex';
import { LDAP_OVERRIDE_CONFIRMATION_MODAL_ID } from 'ee/vue_shared/components/members/constants';
import LdapOverrideConfirmationModal from 'ee/vue_shared/components/members/ldap/ldap_override_confirmation_modal.vue';
import waitForPromises from 'helpers/wait_for_promises';
import { member } from 'jest/vue_shared/components/members/mock_data';
import { member } from 'jest/members/mock_data';
import { LDAP_OVERRIDE_CONFIRMATION_MODAL_ID } from 'ee/members/constants';
import LdapOverrideConfirmationModal from 'ee/members/components/ldap/ldap_override_confirmation_modal.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { GlDatepicker } from '@gitlab/ui';
import { mount } from '@vue/test-utils';
import { member } from 'jest/vue_shared/components/members/mock_data';
import ExpirationDatepicker from '~/vue_shared/components/members/table/expiration_datepicker.vue';
import { member } from 'jest/members/mock_data';
import ExpirationDatepicker from '~/members/components/table/expiration_datepicker.vue';
describe('ExpirationDatepicker', () => {
let wrapper;
......
import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import MembersTableCell from 'ee/vue_shared/components/members/table/members_table_cell.vue';
import { member as memberMock } from 'jest/vue_shared/components/members/mock_data';
import { member as memberMock } from 'jest/members/mock_data';
import MembersTableCell from 'ee/members/components/table/members_table_cell.vue';
describe('MemberTableCell', () => {
const WrappedComponent = {
......
import { within } from '@testing-library/dom';
import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { member as memberMock, members } from 'jest/vue_shared/components/members/mock_data';
import MembersTable from '~/vue_shared/components/members/table/members_table.vue';
import { member as memberMock, members } from 'jest/members/mock_data';
import MembersTable from '~/members/components/table/members_table.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { GlDropdown } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import LdapDropdownItem from 'ee/vue_shared/components/members/ldap/ldap_dropdown_item.vue';
import waitForPromises from 'helpers/wait_for_promises';
import { member } from 'jest/vue_shared/components/members/mock_data';
import RoleDropdown from '~/vue_shared/components/members/table/role_dropdown.vue';
import { member } from 'jest/members/mock_data';
import LdapDropdownItem from 'ee/members/components/ldap/ldap_dropdown_item.vue';
import RoleDropdown from '~/members/components/table/role_dropdown.vue';
describe('RoleDropdown', () => {
let wrapper;
......
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import { noop } from 'lodash';
import { members, member } from 'jest/members/mock_data';
import testAction from 'helpers/vuex_action_helper';
import * as types from 'ee/members/store/mutation_types';
import {
updateLdapOverride,
showLdapOverrideConfirmationModal,
hideLdapOverrideConfirmationModal,
} from 'ee/vuex_shared/modules/members/actions';
import * as types from 'ee/vuex_shared/modules/members/mutation_types';
import testAction from 'helpers/vuex_action_helper';
import { members, member } from 'jest/vue_shared/components/members/mock_data';
} from 'ee/members/store/actions';
import httpStatusCodes from '~/lib/utils/http_status';
describe('Vuex members actions', () => {
......
import * as types from 'ee/vuex_shared/modules/members/mutation_types';
import mutations from 'ee/vuex_shared/modules/members/mutations';
import { members, member } from 'jest/vue_shared/components/members/mock_data';
import { members, member } from 'jest/members/mock_data';
import mutations from 'ee/members/store/mutations';
import * as types from 'ee/members/store/mutation_types';
describe('Vuex members mutations', () => {
describe(types.RECEIVE_LDAP_OVERRIDE_SUCCESS, () => {
......
import { generateBadges, canOverride } from 'ee/vue_shared/components/members/utils';
import { member as memberMock } from 'jest/vue_shared/components/members/mock_data';
import { member as memberMock } from 'jest/members/mock_data';
import { generateBadges, canOverride } from 'ee/members/utils';
describe('Members Utils', () => {
describe('generateBadges', () => {
......
......@@ -22,12 +22,12 @@ module QA
element :group_row
end
view 'app/assets/javascripts/vue_shared/components/members/table/role_dropdown.vue' do
view 'app/assets/javascripts/members/components/table/role_dropdown.vue' do
element :access_level_dropdown
element :access_level_link
end
view 'app/assets/javascripts/vue_shared/components/members/action_buttons/remove_member_button.vue' do
view 'app/assets/javascripts/members/components/action_buttons/remove_member_button.vue' do
element :delete_member_button
end
......
......@@ -4,11 +4,8 @@ import Vuex from 'vuex';
import { GlAlert } from '@gitlab/ui';
import App from '~/groups/members/components/app.vue';
import * as commonUtils from '~/lib/utils/common_utils';
import {
RECEIVE_MEMBER_ROLE_ERROR,
HIDE_ERROR,
} from '~/vuex_shared/modules/members/mutation_types';
import mutations from '~/vuex_shared/modules/members/mutations';
import { RECEIVE_MEMBER_ROLE_ERROR, HIDE_ERROR } from '~/members/store/mutation_types';
import mutations from '~/members/store/mutations';
describe('GroupMembersApp', () => {
const localVue = createLocalVue();
......
import { shallowMount } from '@vue/test-utils';
import AccessRequestActionButtons from '~/vue_shared/components/members/action_buttons/access_request_action_buttons.vue';
import RemoveMemberButton from '~/vue_shared/components/members/action_buttons/remove_member_button.vue';
import ApproveAccessRequestButton from '~/vue_shared/components/members/action_buttons/approve_access_request_button.vue';
import { accessRequest as member } from '../mock_data';
import AccessRequestActionButtons from '~/members/components/action_buttons/access_request_action_buttons.vue';
import RemoveMemberButton from '~/members/components/action_buttons/remove_member_button.vue';
import ApproveAccessRequestButton from '~/members/components/action_buttons/approve_access_request_button.vue';
import { accessRequest as member } from '../../mock_data';
describe('AccessRequestActionButtons', () => {
let wrapper;
......
......@@ -2,7 +2,7 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { GlButton, GlForm } from '@gitlab/ui';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import ApproveAccessRequestButton from '~/vue_shared/components/members/action_buttons/approve_access_request_button.vue';
import ApproveAccessRequestButton from '~/members/components/action_buttons/approve_access_request_button.vue';
jest.mock('~/lib/utils/csrf', () => ({ token: 'mock-csrf-token' }));
......
import { shallowMount } from '@vue/test-utils';
import InviteActionButtons from '~/vue_shared/components/members/action_buttons/invite_action_buttons.vue';
import RemoveMemberButton from '~/vue_shared/components/members/action_buttons/remove_member_button.vue';
import ResendInviteButton from '~/vue_shared/components/members/action_buttons/resend_invite_button.vue';
import { invite as member } from '../mock_data';
import InviteActionButtons from '~/members/components/action_buttons/invite_action_buttons.vue';
import RemoveMemberButton from '~/members/components/action_buttons/remove_member_button.vue';
import ResendInviteButton from '~/members/components/action_buttons/resend_invite_button.vue';
import { invite as member } from '../../mock_data';
describe('InviteActionButtons', () => {
let wrapper;
......
import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import LeaveButton from '~/vue_shared/components/members/action_buttons/leave_button.vue';
import LeaveModal from '~/vue_shared/components/members/modals/leave_modal.vue';
import { LEAVE_MODAL_ID } from '~/vue_shared/components/members/constants';
import { member } from '../mock_data';
import LeaveButton from '~/members/components/action_buttons/leave_button.vue';
import LeaveModal from '~/members/components/modals/leave_modal.vue';
import { LEAVE_MODAL_ID } from '~/members/constants';
import { member } from '../../mock_data';
describe('LeaveButton', () => {
let wrapper;
......
......@@ -2,8 +2,8 @@ import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { GlButton } from '@gitlab/ui';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import RemoveGroupLinkButton from '~/vue_shared/components/members/action_buttons/remove_group_link_button.vue';
import { group } from '../mock_data';
import RemoveGroupLinkButton from '~/members/components/action_buttons/remove_group_link_button.vue';
import { group } from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import RemoveMemberButton from '~/vue_shared/components/members/action_buttons/remove_member_button.vue';
import RemoveMemberButton from '~/members/components/action_buttons/remove_member_button.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
......
......@@ -2,7 +2,7 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { GlButton } from '@gitlab/ui';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import ResendInviteButton from '~/vue_shared/components/members/action_buttons/resend_invite_button.vue';
import ResendInviteButton from '~/members/components/action_buttons/resend_invite_button.vue';
jest.mock('~/lib/utils/csrf', () => ({ token: 'mock-csrf-token' }));
......
import { shallowMount } from '@vue/test-utils';
import UserActionButtons from '~/vue_shared/components/members/action_buttons/user_action_buttons.vue';
import RemoveMemberButton from '~/vue_shared/components/members/action_buttons/remove_member_button.vue';
import LeaveButton from '~/vue_shared/components/members/action_buttons/leave_button.vue';
import { member, orphanedMember } from '../mock_data';
import UserActionButtons from '~/members/components/action_buttons/user_action_buttons.vue';
import RemoveMemberButton from '~/members/components/action_buttons/remove_member_button.vue';
import LeaveButton from '~/members/components/action_buttons/leave_button.vue';
import { member, orphanedMember } from '../../mock_data';
describe('UserActionButtons', () => {
let wrapper;
......
import { mount, createWrapper } from '@vue/test-utils';
import { getByText as getByTextHelper } from '@testing-library/dom';
import { GlAvatarLink } from '@gitlab/ui';
import { group as member } from '../mock_data';
import GroupAvatar from '~/vue_shared/components/members/avatars/group_avatar.vue';
import { group as member } from '../../mock_data';
import GroupAvatar from '~/members/components/avatars/group_avatar.vue';
describe('MemberList', () => {
let wrapper;
......
import { mount, createWrapper } from '@vue/test-utils';
import { getByText as getByTextHelper } from '@testing-library/dom';
import { invite as member } from '../mock_data';
import InviteAvatar from '~/vue_shared/components/members/avatars/invite_avatar.vue';
import { invite as member } from '../../mock_data';
import InviteAvatar from '~/members/components/avatars/invite_avatar.vue';
describe('MemberList', () => {
let wrapper;
......
import { mount, createWrapper } from '@vue/test-utils';
import { within } from '@testing-library/dom';
import { GlAvatarLink, GlBadge } from '@gitlab/ui';
import { member as memberMock, orphanedMember } from '../mock_data';
import UserAvatar from '~/vue_shared/components/members/avatars/user_avatar.vue';
import { member as memberMock, orphanedMember } from '../../mock_data';
import UserAvatar from '~/members/components/avatars/user_avatar.vue';
describe('UserAvatar', () => {
let wrapper;
......
......@@ -3,9 +3,9 @@ import { GlModal, GlForm } from '@gitlab/ui';
import { nextTick } from 'vue';
import { within } from '@testing-library/dom';
import Vuex from 'vuex';
import LeaveModal from '~/vue_shared/components/members/modals/leave_modal.vue';
import { LEAVE_MODAL_ID } from '~/vue_shared/components/members/constants';
import { member } from '../mock_data';
import LeaveModal from '~/members/components/modals/leave_modal.vue';
import { LEAVE_MODAL_ID } from '~/members/constants';
import { member } from '../../mock_data';
jest.mock('~/lib/utils/csrf', () => ({ token: 'mock-csrf-token' }));
......
......@@ -3,9 +3,9 @@ import { GlModal, GlForm } from '@gitlab/ui';
import { nextTick } from 'vue';
import { within } from '@testing-library/dom';
import Vuex from 'vuex';
import RemoveGroupLinkModal from '~/vue_shared/components/members/modals/remove_group_link_modal.vue';
import { REMOVE_GROUP_LINK_MODAL_ID } from '~/vue_shared/components/members/constants';
import { group } from '../mock_data';
import RemoveGroupLinkModal from '~/members/components/modals/remove_group_link_modal.vue';
import { REMOVE_GROUP_LINK_MODAL_ID } from '~/members/constants';
import { group } from '../../mock_data';
jest.mock('~/lib/utils/csrf', () => ({ token: 'mock-csrf-token' }));
......
import { mount, createWrapper } from '@vue/test-utils';
import { within } from '@testing-library/dom';
import { useFakeDate } from 'helpers/fake_date';
import CreatedAt from '~/vue_shared/components/members/table/created_at.vue';
import CreatedAt from '~/members/components/table/created_at.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
describe('CreatedAt', () => {
......
......@@ -4,8 +4,8 @@ import { nextTick } from 'vue';
import { GlDatepicker } from '@gitlab/ui';
import { useFakeDate } from 'helpers/fake_date';
import waitForPromises from 'helpers/wait_for_promises';
import ExpirationDatepicker from '~/vue_shared/components/members/table/expiration_datepicker.vue';
import { member } from '../mock_data';
import ExpirationDatepicker from '~/members/components/table/expiration_datepicker.vue';
import { member } from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
......
......@@ -2,7 +2,7 @@ import { mount, createWrapper } from '@vue/test-utils';
import { within } from '@testing-library/dom';
import { useFakeDate } from 'helpers/fake_date';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import ExpiresAt from '~/vue_shared/components/members/table/expires_at.vue';
import ExpiresAt from '~/members/components/table/expires_at.vue';
describe('ExpiresAt', () => {
// March 15th, 2020
......
import { shallowMount } from '@vue/test-utils';
import { MEMBER_TYPES } from '~/vue_shared/components/members/constants';
import { member as memberMock, group, invite, accessRequest } from '../mock_data';
import MemberActionButtons from '~/vue_shared/components/members/table/member_action_buttons.vue';
import UserActionButtons from '~/vue_shared/components/members/action_buttons/user_action_buttons.vue';
import GroupActionButtons from '~/vue_shared/components/members/action_buttons/group_action_buttons.vue';
import InviteActionButtons from '~/vue_shared/components/members/action_buttons/invite_action_buttons.vue';
import AccessRequestActionButtons from '~/vue_shared/components/members/action_buttons/access_request_action_buttons.vue';
import { MEMBER_TYPES } from '~/members/constants';
import { member as memberMock, group, invite, accessRequest } from '../../mock_data';
import MemberActionButtons from '~/members/components/table/member_action_buttons.vue';
import UserActionButtons from '~/members/components/action_buttons/user_action_buttons.vue';
import GroupActionButtons from '~/members/components/action_buttons/group_action_buttons.vue';
import InviteActionButtons from '~/members/components/action_buttons/invite_action_buttons.vue';
import AccessRequestActionButtons from '~/members/components/action_buttons/access_request_action_buttons.vue';
describe('MemberActionButtons', () => {
let wrapper;
......
import { shallowMount } from '@vue/test-utils';
import { MEMBER_TYPES } from '~/vue_shared/components/members/constants';
import { member as memberMock, group, invite, accessRequest } from '../mock_data';
import MemberAvatar from '~/vue_shared/components/members/table/member_avatar.vue';
import UserAvatar from '~/vue_shared/components/members/avatars/user_avatar.vue';
import GroupAvatar from '~/vue_shared/components/members/avatars/group_avatar.vue';
import InviteAvatar from '~/vue_shared/components/members/avatars/invite_avatar.vue';
import { MEMBER_TYPES } from '~/members/constants';
import { member as memberMock, group, invite, accessRequest } from '../../mock_data';
import MemberAvatar from '~/members/components/table/member_avatar.vue';
import UserAvatar from '~/members/components/avatars/user_avatar.vue';
import GroupAvatar from '~/members/components/avatars/group_avatar.vue';
import InviteAvatar from '~/members/components/avatars/invite_avatar.vue';
describe('MemberList', () => {
let wrapper;
......
import { mount, createWrapper } from '@vue/test-utils';
import { getByText as getByTextHelper } from '@testing-library/dom';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import MemberSource from '~/vue_shared/components/members/table/member_source.vue';
import MemberSource from '~/members/components/table/member_source.vue';
describe('MemberSource', () => {
let wrapper;
......
import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { MEMBER_TYPES } from '~/vue_shared/components/members/constants';
import { member as memberMock, group, invite, accessRequest } from '../mock_data';
import MembersTableCell from '~/vue_shared/components/members/table/members_table_cell.vue';
import { MEMBER_TYPES } from '~/members/constants';
import { member as memberMock, group, invite, accessRequest } from '../../mock_data';
import MembersTableCell from '~/members/components/table/members_table_cell.vue';
describe('MemberList', () => {
describe('MembersTableCell', () => {
const WrappedComponent = {
props: {
memberType: {
......
......@@ -6,21 +6,21 @@ import {
within,
} from '@testing-library/dom';
import { GlBadge, GlTable } from '@gitlab/ui';
import MembersTable from '~/vue_shared/components/members/table/members_table.vue';
import MemberAvatar from '~/vue_shared/components/members/table/member_avatar.vue';
import MemberSource from '~/vue_shared/components/members/table/member_source.vue';
import ExpiresAt from '~/vue_shared/components/members/table/expires_at.vue';
import CreatedAt from '~/vue_shared/components/members/table/created_at.vue';
import RoleDropdown from '~/vue_shared/components/members/table/role_dropdown.vue';
import ExpirationDatepicker from '~/vue_shared/components/members/table/expiration_datepicker.vue';
import MemberActionButtons from '~/vue_shared/components/members/table/member_action_buttons.vue';
import MembersTable from '~/members/components/table/members_table.vue';
import MemberAvatar from '~/members/components/table/member_avatar.vue';
import MemberSource from '~/members/components/table/member_source.vue';
import ExpiresAt from '~/members/components/table/expires_at.vue';
import CreatedAt from '~/members/components/table/created_at.vue';
import RoleDropdown from '~/members/components/table/role_dropdown.vue';
import ExpirationDatepicker from '~/members/components/table/expiration_datepicker.vue';
import MemberActionButtons from '~/members/components/table/member_action_buttons.vue';
import * as initUserPopovers from '~/user_popovers';
import { member as memberMock, invite, accessRequest } from '../mock_data';
import { member as memberMock, invite, accessRequest } from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
describe('MemberList', () => {
describe('MembersTable', () => {
let wrapper;
const createStore = (state = {}) => {
......
......@@ -5,8 +5,8 @@ import { within } from '@testing-library/dom';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import waitForPromises from 'helpers/wait_for_promises';
import RoleDropdown from '~/vue_shared/components/members/table/role_dropdown.vue';
import { member } from '../mock_data';
import RoleDropdown from '~/members/components/table/role_dropdown.vue';
import { member } from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { noop } from 'lodash';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import { members, group } from 'jest/vue_shared/components/members/mock_data';
import { members, group } from 'jest/members/mock_data';
import testAction from 'helpers/vuex_action_helper';
import { useFakeDate } from 'helpers/fake_date';
import httpStatusCodes from '~/lib/utils/http_status';
import * as types from '~/vuex_shared/modules/members/mutation_types';
import * as types from '~/members/store/mutation_types';
import {
updateMemberRole,
showRemoveGroupLinkModal,
hideRemoveGroupLinkModal,
updateMemberExpiration,
} from '~/vuex_shared/modules/members/actions';
} from '~/members/store/actions';
describe('Vuex members actions', () => {
describe('update member actions', () => {
......
import { members, group } from 'jest/vue_shared/components/members/mock_data';
import mutations from '~/vuex_shared/modules/members/mutations';
import * as types from '~/vuex_shared/modules/members/mutation_types';
import { members, group } from 'jest/members/mock_data';
import mutations from '~/members/store/mutations';
import * as types from '~/members/store/mutation_types';
describe('Vuex members mutations', () => {
describe('update member mutations', () => {
......
import { members } from 'jest/vue_shared/components/members/mock_data';
import { findMember } from '~/vuex_shared/modules/members/utils';
import { members } from 'jest/members/mock_data';
import { findMember } from '~/members/store/utils';
describe('Members Vuex utils', () => {
describe('findMember', () => {
......
......@@ -7,7 +7,7 @@ import {
canResend,
canUpdate,
canOverride,
} from '~/vue_shared/components/members/utils';
} from '~/members/utils';
import { member as memberMock, group, invite } from './mock_data';
const DIRECT_MEMBER_ID = 178;
......
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