Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/blob/components/mock_data.js')
-rw-r--r--spec/frontend/blob/components/mock_data.js46
1 files changed, 30 insertions, 16 deletions
diff --git a/spec/frontend/blob/components/mock_data.js b/spec/frontend/blob/components/mock_data.js
index 4f7b297aba0..bfcca14324f 100644
--- a/spec/frontend/blob/components/mock_data.js
+++ b/spec/frontend/blob/components/mock_data.js
@@ -1,29 +1,43 @@
+import { SIMPLE_BLOB_VIEWER, RICH_BLOB_VIEWER } from '~/blob/components/constants';
+
+export const SimpleViewerMock = {
+ collapsed: false,
+ loadingPartialName: 'loading',
+ renderError: null,
+ tooLarge: false,
+ type: SIMPLE_BLOB_VIEWER,
+ fileType: 'text',
+};
+
+export const RichViewerMock = {
+ collapsed: false,
+ loadingPartialName: 'loading',
+ renderError: null,
+ tooLarge: false,
+ type: RICH_BLOB_VIEWER,
+ fileType: 'markdown',
+};
+
export const Blob = {
binary: false,
- highlightedData:
- '<h1 data-sourcepos="1:1-1:19" dir="auto">\n<a id="user-content-this-one-is-dummy" class="anchor" href="#this-one-is-dummy" aria-hidden="true"></a>This one is dummy</h1>\n<h2 data-sourcepos="3:1-3:21" dir="auto">\n<a id="user-content-and-has-sub-header" class="anchor" href="#and-has-sub-header" aria-hidden="true"></a>And has sub-header</h2>\n<p data-sourcepos="5:1-5:27" dir="auto">Even some stupid text here</p>',
name: 'dummy.md',
path: 'dummy.md',
rawPath: '/flightjs/flight/snippets/51/raw',
size: 75,
simpleViewer: {
- collapsed: false,
- fileType: 'text',
- loadAsync: true,
- loadingPartialName: 'loading',
- renderError: null,
- tooLarge: false,
- type: 'simple',
+ ...SimpleViewerMock,
},
richViewer: {
- collapsed: false,
- fileType: 'markup',
- loadAsync: true,
- loadingPartialName: 'loading',
- renderError: null,
- tooLarge: false,
- type: 'rich',
+ ...RichViewerMock,
},
};
+export const RichBlobContentMock = {
+ richData: '<h1>Rich</h1>',
+};
+
+export const SimpleBlobContentMock = {
+ plainData: 'Plain',
+};
+
export default {};