diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/frontend/releases/mock_data.js | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/frontend/releases/mock_data.js')
-rw-r--r-- | spec/frontend/releases/mock_data.js | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/spec/frontend/releases/mock_data.js b/spec/frontend/releases/mock_data.js index bd5fc86275e..b97385154bd 100644 --- a/spec/frontend/releases/mock_data.js +++ b/spec/frontend/releases/mock_data.js @@ -1,3 +1,5 @@ +import { ASSET_LINK_TYPE } from '~/releases/constants'; + export const milestones = [ { id: 50, @@ -131,3 +133,92 @@ export const release = { edit_url: 'http://0.0.0.0:3001/root/release-test/-/releases/v0.3/edit', }, }; + +export const pageInfoHeadersWithoutPagination = { + 'X-NEXT-PAGE': '', + 'X-PAGE': '1', + 'X-PER-PAGE': '20', + 'X-PREV-PAGE': '', + 'X-TOTAL': '19', + 'X-TOTAL-PAGES': '1', +}; + +export const pageInfoHeadersWithPagination = { + 'X-NEXT-PAGE': '2', + 'X-PAGE': '1', + 'X-PER-PAGE': '20', + 'X-PREV-PAGE': '', + 'X-TOTAL': '21', + 'X-TOTAL-PAGES': '2', +}; + +export const assets = { + count: 5, + sources: [ + { + format: 'zip', + url: 'https://example.gitlab.com/path/to/zip', + }, + ], + links: [ + { + linkType: ASSET_LINK_TYPE.IMAGE, + url: 'https://example.gitlab.com/path/to/image', + directAssetUrl: 'https://example.gitlab.com/path/to/image', + name: 'Example image link', + }, + { + linkType: ASSET_LINK_TYPE.PACKAGE, + url: 'https://example.gitlab.com/path/to/package', + directAssetUrl: 'https://example.gitlab.com/path/to/package', + name: 'Example package link', + }, + { + linkType: ASSET_LINK_TYPE.RUNBOOK, + url: 'https://example.gitlab.com/path/to/runbook', + directAssetUrl: 'https://example.gitlab.com/path/to/runbook', + name: 'Example runbook link', + }, + { + linkType: ASSET_LINK_TYPE.OTHER, + url: 'https://example.gitlab.com/path/to/link', + directAssetUrl: 'https://example.gitlab.com/path/to/link', + name: 'Example link', + }, + ], +}; + +export const release2 = { + name: 'Bionic Beaver', + tag_name: '18.04', + description: '## changelog\n\n* line 1\n* line2', + description_html: '<div><h2>changelog</h2><ul><li>line1</li<li>line 2</li></ul></div>', + author_name: 'Release bot', + author_email: 'release-bot@example.com', + created_at: '2012-05-28T05:00:00-07:00', + commit: { + id: '2695effb5807a22ff3d138d593fd856244e155e7', + short_id: '2695effb', + title: 'Initial commit', + created_at: '2017-07-26T11:08:53.000+02:00', + parent_ids: ['2a4b78934375d7f53875269ffd4f45fd83a84ebe'], + message: 'Initial commit', + author: { + avatar_url: 'uploads/-/system/user/avatar/johndoe/avatar.png', + id: 482476, + name: 'John Doe', + path: '/johndoe', + state: 'active', + status_tooltip_html: null, + username: 'johndoe', + web_url: 'https://gitlab.com/johndoe', + }, + authored_date: '2012-05-28T04:42:42-07:00', + committer_name: 'Jack Smith', + committer_email: 'jack@example.com', + committed_date: '2012-05-28T04:42:42-07:00', + }, + assets, +}; + +export const releases = [release, release2]; |