debian-mirror-gitlab/spec/frontend/jira_import/mock_data.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

133 lines
3.1 KiB
JavaScript
Raw Normal View History

2020-06-23 00:09:42 +05:30
import getJiraImportDetailsQuery from '~/jira_import/queries/get_jira_import_details.query.graphql';
2020-10-24 23:57:45 +05:30
import { userMappingsPageSize } from '~/jira_import/utils/constants';
2021-03-11 19:13:27 +05:30
import { IMPORT_STATE } from '~/jira_import/utils/jira_import_utils';
2020-06-23 00:09:42 +05:30
export const fullPath = 'gitlab-org/gitlab-test';
2020-10-24 23:57:45 +05:30
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-23 00:09:42 +05:30
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-28 23:09:34 +05:30
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-10-24 23:57:45 +05:30
export const jiraUsersResponse = new Array(userMappingsPageSize);
2020-07-28 23:09:34 +05:30
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,
},
];