2020-06-05 18:08:19 +00:00
|
|
|
import getJiraImportDetailsQuery from '~/jira_import/queries/get_jira_import_details.query.graphql';
|
2020-08-27 15:10:21 +00:00
|
|
|
import { userMappingsPageSize } from '~/jira_import/utils/constants';
|
2021-02-14 18:09:20 +00:00
|
|
|
import { IMPORT_STATE } from '~/jira_import/utils/jira_import_utils';
|
2020-06-05 18:08:19 +00:00
|
|
|
|
|
|
|
export const fullPath = 'gitlab-org/gitlab-test';
|
|
|
|
|
2020-08-17 15:10:09 +00:00
|
|
|
export const issuesPath = 'gitlab-org/gitlab-test/-/issues';
|
|
|
|
|
|
|
|
export const illustration = 'illustration.svg';
|
|
|
|
|
|
|
|
export const jiraIntegrationPath = 'gitlab-org/gitlab-test/-/services/jira/edit';
|
|
|
|
|
|
|
|
export const projectId = '5';
|
|
|
|
|
|
|
|
export const projectPath = 'gitlab-org/gitlab-test';
|
|
|
|
|
2020-06-05 18:08:19 +00:00
|
|
|
export const queryDetails = {
|
|
|
|
query: getJiraImportDetailsQuery,
|
|
|
|
variables: {
|
|
|
|
fullPath,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const jiraImportDetailsQueryResponse = {
|
|
|
|
project: {
|
|
|
|
jiraImportStatus: IMPORT_STATE.NONE,
|
|
|
|
jiraImports: {
|
|
|
|
nodes: [
|
|
|
|
{
|
|
|
|
jiraProjectKey: 'MJP',
|
|
|
|
scheduledAt: '2020-01-01T12:34:56Z',
|
|
|
|
scheduledBy: {
|
|
|
|
name: 'Jane Doe',
|
|
|
|
__typename: 'User',
|
|
|
|
},
|
|
|
|
__typename: 'JiraImport',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
__typename: 'JiraImportConnection',
|
|
|
|
},
|
|
|
|
services: {
|
|
|
|
nodes: [
|
|
|
|
{
|
|
|
|
projects: {
|
|
|
|
nodes: [
|
|
|
|
{
|
|
|
|
key: 'MJP',
|
|
|
|
name: 'My Jira Project',
|
|
|
|
__typename: 'JiraProject',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'MTG',
|
|
|
|
name: 'Migrate To GitLab',
|
|
|
|
__typename: 'JiraProject',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
__typename: 'JiraProjectConnection',
|
|
|
|
},
|
|
|
|
__typename: 'JiraService',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
__typename: 'ServiceConnection',
|
|
|
|
},
|
|
|
|
__typename: 'Project',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const jiraImportMutationResponse = {
|
|
|
|
jiraImportStart: {
|
|
|
|
clientMutationId: null,
|
|
|
|
jiraImport: {
|
|
|
|
jiraProjectKey: 'MTG',
|
|
|
|
scheduledAt: '2020-02-02T20:20:20Z',
|
|
|
|
scheduledBy: {
|
|
|
|
name: 'John Doe',
|
|
|
|
__typename: 'User',
|
|
|
|
},
|
|
|
|
__typename: 'JiraImport',
|
|
|
|
},
|
|
|
|
errors: [],
|
|
|
|
__typename: 'JiraImportStartPayload',
|
|
|
|
},
|
|
|
|
};
|
2020-07-15 15:09:21 +00:00
|
|
|
|
|
|
|
export const jiraProjects = [
|
|
|
|
{ text: 'My Jira Project (MJP)', value: 'MJP' },
|
|
|
|
{ text: 'My Second Jira Project (MSJP)', value: 'MSJP' },
|
|
|
|
{ text: 'Migrate to GitLab (MTG)', value: 'MTG' },
|
|
|
|
];
|
|
|
|
|
2020-08-27 15:10:21 +00:00
|
|
|
export const jiraUsersResponse = new Array(userMappingsPageSize);
|
|
|
|
|
2020-07-15 15:09:21 +00:00
|
|
|
export const imports = [
|
|
|
|
{
|
|
|
|
jiraProjectKey: 'MTG',
|
|
|
|
scheduledAt: '2020-04-08T10:11:12+00:00',
|
|
|
|
scheduledBy: {
|
|
|
|
name: 'John Doe',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jiraProjectKey: 'MSJP',
|
|
|
|
scheduledAt: '2020-04-09T13:14:15+00:00',
|
|
|
|
scheduledBy: {
|
|
|
|
name: 'Jimmy Doe',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jiraProjectKey: 'MTG',
|
|
|
|
scheduledAt: '2020-04-09T16:17:18+00:00',
|
|
|
|
scheduledBy: {
|
|
|
|
name: 'Jane Doe',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const userMappings = [
|
|
|
|
{
|
|
|
|
jiraAccountId: 'aei23f98f-q23fj98qfj',
|
|
|
|
jiraDisplayName: 'Jane Doe',
|
|
|
|
jiraEmail: 'janedoe@example.com',
|
|
|
|
gitlabId: 15,
|
|
|
|
gitlabUsername: 'janedoe',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jiraAccountId: 'fu39y8t34w-rq3u289t3h4i',
|
|
|
|
jiraDisplayName: 'Fred Chopin',
|
|
|
|
jiraEmail: 'fredchopin@example.com',
|
|
|
|
gitlabId: undefined,
|
|
|
|
gitlabUsername: undefined,
|
|
|
|
},
|
|
|
|
];
|