2021-07-02 15:07:36 +00:00
|
|
|
export const enabledJobTokenScope = {
|
|
|
|
data: {
|
|
|
|
project: {
|
2021-11-30 15:14:19 +00:00
|
|
|
id: '1',
|
2021-07-02 15:07:36 +00:00
|
|
|
ciCdSettings: {
|
|
|
|
jobTokenScopeEnabled: true,
|
|
|
|
__typename: 'ProjectCiCdSetting',
|
|
|
|
},
|
|
|
|
__typename: 'Project',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const disabledJobTokenScope = {
|
|
|
|
data: {
|
|
|
|
project: {
|
2021-11-30 15:14:19 +00:00
|
|
|
id: '1',
|
2021-07-02 15:07:36 +00:00
|
|
|
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',
|
2021-11-30 15:14:19 +00:00
|
|
|
id: '1',
|
2021-07-02 15:07:36 +00:00
|
|
|
ciJobTokenScope: {
|
|
|
|
__typename: 'CiJobTokenScopeType',
|
|
|
|
projects: {
|
|
|
|
__typename: 'ProjectConnection',
|
|
|
|
nodes: [
|
|
|
|
{
|
2021-11-30 15:14:19 +00:00
|
|
|
id: '2',
|
2021-07-02 15:07:36 +00:00
|
|
|
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 = [
|
|
|
|
{
|
2021-11-30 15:14:19 +00:00
|
|
|
id: '1',
|
2021-07-02 15:07:36 +00:00
|
|
|
name: 'merge-train-stuff',
|
|
|
|
fullPath: 'root/merge-train-stuff',
|
|
|
|
isLocked: false,
|
|
|
|
__typename: 'Project',
|
|
|
|
},
|
2021-11-30 15:14:19 +00:00
|
|
|
{
|
|
|
|
id: '2',
|
|
|
|
name: 'ci-project',
|
|
|
|
fullPath: 'root/ci-project',
|
|
|
|
isLocked: true,
|
|
|
|
__typename: 'Project',
|
|
|
|
},
|
2021-07-02 15:07:36 +00:00
|
|
|
];
|