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

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

96 lines
1.8 KiB
JavaScript
Raw Normal View History

2021-09-30 23:02:18 +05:30
export const enabledJobTokenScope = {
data: {
project: {
2022-01-26 12:08:38 +05:30
id: '1',
2021-09-30 23:02:18 +05:30
ciCdSettings: {
jobTokenScopeEnabled: true,
__typename: 'ProjectCiCdSetting',
},
__typename: 'Project',
},
},
};
export const disabledJobTokenScope = {
data: {
project: {
2022-01-26 12:08:38 +05:30
id: '1',
2021-09-30 23:02:18 +05:30
ciCdSettings: {
jobTokenScopeEnabled: false,
__typename: 'ProjectCiCdSetting',
},
__typename: 'Project',
},
},
};
export const updateJobTokenScope = {
data: {
ciCdSettingsUpdate: {
ciCdSettings: {
jobTokenScopeEnabled: true,
__typename: 'ProjectCiCdSetting',
},
errors: [],
__typename: 'CiCdSettingsUpdatePayload',
},
},
};
export const projectsWithScope = {
data: {
project: {
__typename: 'Project',
2022-01-26 12:08:38 +05:30
id: '1',
2021-09-30 23:02:18 +05:30
ciJobTokenScope: {
__typename: 'CiJobTokenScopeType',
projects: {
__typename: 'ProjectConnection',
nodes: [
{
2022-01-26 12:08:38 +05:30
id: '2',
2021-09-30 23:02:18 +05:30
fullPath: 'root/332268-test',
name: 'root/332268-test',
},
],
},
},
},
},
};
export const addProjectSuccess = {
data: {
ciJobTokenScopeAddProject: {
errors: [],
__typename: 'CiJobTokenScopeAddProjectPayload',
},
},
};
export const removeProjectSuccess = {
data: {
ciJobTokenScopeRemoveProject: {
errors: [],
__typename: 'CiJobTokenScopeRemoveProjectPayload',
},
},
};
export const mockProjects = [
{
2022-01-26 12:08:38 +05:30
id: '1',
2021-09-30 23:02:18 +05:30
name: 'merge-train-stuff',
fullPath: 'root/merge-train-stuff',
isLocked: false,
__typename: 'Project',
},
2022-01-26 12:08:38 +05:30
{
id: '2',
name: 'ci-project',
fullPath: 'root/ci-project',
isLocked: true,
__typename: 'Project',
},
2021-09-30 23:02:18 +05:30
];