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

95 lines
1.7 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 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',
2023-01-13 00:05:48 +05:30
namespace: {
id: '1234',
fullPath: 'root',
},
2021-09-30 23:02:18 +05:30
},
],
},
},
},
},
};
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',
2023-01-13 00:05:48 +05:30
namespace: {
id: '1235',
fullPath: 'root',
},
2021-09-30 23:02:18 +05:30
fullPath: 'root/merge-train-stuff',
isLocked: false,
__typename: 'Project',
},
2022-01-26 12:08:38 +05:30
{
id: '2',
name: 'ci-project',
2023-01-13 00:05:48 +05:30
namespace: {
id: '1236',
fullPath: 'root',
},
2022-01-26 12:08:38 +05:30
fullPath: 'root/ci-project',
isLocked: true,
__typename: 'Project',
},
2021-09-30 23:02:18 +05:30
];