summaryrefslogtreecommitdiff
path: root/spec/frontend/static_site_editor/mock_data.js
blob: 0f2456cd9eaad3e751bb4644493d94968987f661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
export const sourceContentHeaderYAML = `---
layout: handbook-page-toc
title: Handbook
twitter_image: /images/tweets/handbook-gitlab.png
---`;
export const sourceContentHeaderObjYAML = {
  layout: 'handbook-page-toc',
  title: 'Handbook',
  twitter_image: '/images/tweets/handbook-gitlab.png',
};
export const sourceContentSpacing = `\n`;
export const sourceContentBody = `## On this page
{:.no_toc .hidden-md .hidden-lg}

- TOC
{:toc .hidden-md .hidden-lg}

![image](path/to/image1.png)`;
export const sourceContentYAML = `${sourceContentHeaderYAML}${sourceContentSpacing}${sourceContentBody}`;
export const sourceContentTitle = 'Handbook';

export const username = 'gitlabuser';
export const projectId = '123456';
export const returnUrl = 'https://www.gitlab.com';
export const sourcePath = 'foobar.md.html';
export const mergeRequestMeta = {
  title: `Update ${sourcePath} file`,
  description: 'Copy update',
};
export const savedContentMeta = {
  branch: {
    label: 'foobar',
    url: 'foobar/-/tree/foobar',
  },
  commit: {
    label: 'c1461b08',
    url: 'foobar/-/c1461b08',
  },
  mergeRequest: {
    label: '123',
    url: 'foobar/-/merge_requests/123',
  },
};

export const submitChangesError = 'Could not save changes';
export const commitBranchResponse = {
  web_url: '/tree/root-master-patch-88195',
};
export const commitMultipleResponse = {
  short_id: 'ed899a2f4b5',
  web_url: '/commit/ed899a2f4b5',
};
export const createMergeRequestResponse = {
  iid: '123',
  web_url: '/merge_requests/123',
};

export const trackingCategory = 'projects:static_site_editor:show';

export const images = new Map([
  ['path/to/image1.png', 'image1-content'],
  ['path/to/image2.png', 'image2-content'],
]);