debian-mirror-gitlab/spec/frontend/blob/components/mock_data.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-03-13 15:44:24 +05:30
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,
name: 'dummy.md',
2020-05-24 23:13:21 +05:30
path: 'foo/bar/dummy.md',
2022-05-07 20:08:51 +05:30
rawPath: 'https://testing.com/flightjs/flight/snippets/51/raw',
2020-03-13 15:44:24 +05:30
size: 75,
simpleViewer: {
...SimpleViewerMock,
},
richViewer: {
...RichViewerMock,
},
};
2020-07-28 23:09:34 +05:30
export const BinaryBlob = {
binary: true,
name: 'dummy.png',
path: 'foo/bar/dummy.png',
rawPath: '/flightjs/flight/snippets/51/raw',
size: 75,
simpleViewer: {
...SimpleViewerMock,
},
richViewer: {
...RichViewerMock,
},
};
2020-03-13 15:44:24 +05:30
export const RichBlobContentMock = {
2020-10-24 23:57:45 +05:30
path: 'foo.md',
2020-03-13 15:44:24 +05:30
richData: '<h1>Rich</h1>',
};
export const SimpleBlobContentMock = {
2020-10-24 23:57:45 +05:30
path: 'foo.js',
2020-03-13 15:44:24 +05:30
plainData: 'Plain',
};
2022-04-04 11:22:00 +05:30
export const mockEnvironmentName = 'my.testing.environment';
export const mockEnvironmentPath = 'https://my.testing.environment';