debian-mirror-gitlab/spec/frontend/token_access/mock_data.js
2023-01-12 18:35:48 +00:00

94 lines
1.7 KiB
JavaScript

export const enabledJobTokenScope = {
data: {
project: {
id: '1',
ciCdSettings: {
jobTokenScopeEnabled: true,
__typename: 'ProjectCiCdSetting',
},
__typename: 'Project',
},
},
};
export const disabledJobTokenScope = {
data: {
project: {
id: '1',
ciCdSettings: {
jobTokenScopeEnabled: false,
__typename: 'ProjectCiCdSetting',
},
__typename: 'Project',
},
},
};
export const projectsWithScope = {
data: {
project: {
__typename: 'Project',
id: '1',
ciJobTokenScope: {
__typename: 'CiJobTokenScopeType',
projects: {
__typename: 'ProjectConnection',
nodes: [
{
id: '2',
fullPath: 'root/332268-test',
name: 'root/332268-test',
namespace: {
id: '1234',
fullPath: 'root',
},
},
],
},
},
},
},
};
export const addProjectSuccess = {
data: {
ciJobTokenScopeAddProject: {
errors: [],
__typename: 'CiJobTokenScopeAddProjectPayload',
},
},
};
export const removeProjectSuccess = {
data: {
ciJobTokenScopeRemoveProject: {
errors: [],
__typename: 'CiJobTokenScopeRemoveProjectPayload',
},
},
};
export const mockProjects = [
{
id: '1',
name: 'merge-train-stuff',
namespace: {
id: '1235',
fullPath: 'root',
},
fullPath: 'root/merge-train-stuff',
isLocked: false,
__typename: 'Project',
},
{
id: '2',
name: 'ci-project',
namespace: {
id: '1236',
fullPath: 'root',
},
fullPath: 'root/ci-project',
isLocked: true,
__typename: 'Project',
},
];