diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 09:18:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 09:18:27 +0300 |
commit | c192f26df39e9a2ab122c2d097b86e461599bde8 (patch) | |
tree | 405f7ce164bcf33ce178699048b137a8712990a0 /spec/frontend/packages_and_registries/package_registry/mock_data.js | |
parent | 361def36660a93176d8cb32fb47412dbb1100c2b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/packages_and_registries/package_registry/mock_data.js')
-rw-r--r-- | spec/frontend/packages_and_registries/package_registry/mock_data.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/frontend/packages_and_registries/package_registry/mock_data.js b/spec/frontend/packages_and_registries/package_registry/mock_data.js index d568cfe6221..9054e4998bb 100644 --- a/spec/frontend/packages_and_registries/package_registry/mock_data.js +++ b/spec/frontend/packages_and_registries/package_registry/mock_data.js @@ -103,6 +103,13 @@ export const linksData = { }, }; +export const defaultPackageGroupSettings = { + mavenPackageRequestsForwarding: true, + npmPackageRequestsForwarding: true, + pypiPackageRequestsForwarding: true, + __typename: 'PackageSettings', +}; + export const packageVersions = () => [ { createdAt: '2021-08-10T09:33:54Z', @@ -381,7 +388,12 @@ export const packageDestroyFilesMutationError = () => ({ ], }); -export const packagesListQuery = ({ type = 'group', extend = {}, extendPagination = {} } = {}) => ({ +export const packagesListQuery = ({ + type = 'group', + extend = {}, + extendPagination = {}, + packageSettings = defaultPackageGroupSettings, +} = {}) => ({ data: { [type]: { id: '1', @@ -408,6 +420,14 @@ export const packagesListQuery = ({ type = 'group', extend = {}, extendPaginatio pageInfo: pagination(extendPagination), __typename: 'PackageConnection', }, + ...(type === 'group' && { packageSettings }), + ...(type === 'project' && { + group: { + id: '1', + packageSettings, + __typename: 'Group', + }, + }), ...extend, __typename: capitalize(type), }, |