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/snippets/components/snippet_blob_view_spec.js')
-rw-r--r--spec/frontend/snippets/components/snippet_blob_view_spec.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/frontend/snippets/components/snippet_blob_view_spec.js b/spec/frontend/snippets/components/snippet_blob_view_spec.js
index d06489cffa9..e4d8ee9b7df 100644
--- a/spec/frontend/snippets/components/snippet_blob_view_spec.js
+++ b/spec/frontend/snippets/components/snippet_blob_view_spec.js
@@ -3,7 +3,11 @@ import SnippetBlobView from '~/snippets/components/snippet_blob_view.vue';
import BlobHeader from '~/blob/components/blob_header.vue';
import BlobEmbeddable from '~/blob/components/blob_embeddable.vue';
import BlobContent from '~/blob/components/blob_content.vue';
-import { BLOB_RENDER_EVENT_LOAD, BLOB_RENDER_EVENT_SHOW_SOURCE } from '~/blob/components/constants';
+import {
+ BLOB_RENDER_EVENT_LOAD,
+ BLOB_RENDER_EVENT_SHOW_SOURCE,
+ BLOB_RENDER_ERRORS,
+} from '~/blob/components/constants';
import { RichViewer, SimpleViewer } from '~/vue_shared/components/blob_viewers';
import {
SNIPPET_VISIBILITY_PRIVATE,
@@ -109,6 +113,20 @@ describe('Blob Embeddable', () => {
});
});
+ it('passes information about render error down to blob header', () => {
+ createComponent({
+ blob: {
+ ...BlobMock,
+ simpleViewer: {
+ ...SimpleViewerMock,
+ renderError: BLOB_RENDER_ERRORS.REASONS.COLLAPSED.id,
+ },
+ },
+ });
+
+ expect(wrapper.find(BlobHeader).props('hasRenderError')).toBe(true);
+ });
+
describe('URLS with hash', () => {
beforeEach(() => {
window.location.hash = '#LC2';