summaryrefslogtreecommitdiff
path: root/spec/frontend/releases/mock_data.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/releases/mock_data.js')
-rw-r--r--spec/frontend/releases/mock_data.js91
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];