diff options
author | Denys Mishunov <dmishunov@gitlab.com> | 2019-04-17 23:41:07 +0300 |
---|---|---|
committer | Denys Mishunov <dmishunov@gitlab.com> | 2019-04-18 00:57:29 +0300 |
commit | 5e2d50aa18be186112e066c7b856d58979eb9097 (patch) | |
tree | 2cee55ad21b9fcc34b78df8f453778a0a0116471 /spec/javascripts | |
parent | a6a1afe070ffe4fa66b5ace9d35ca8c6ee481986 (diff) |
Passes file type down to ContentViewer
Instead of ContentViewer attempts to compute file type and render
appropriate viewer type, compute it on the parent RepoEditor having all
file-related information at its disposal and pass it down to
ContentViewer as a prop
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js b/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js index 4da8c6196b1..bdf802052b9 100644 --- a/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js +++ b/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js @@ -4,6 +4,7 @@ import axios from '~/lib/utils/axios_utils'; import contentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { GREEN_BOX_IMAGE_URL } from 'spec/test_constants'; +import '~/behaviors/markdown/render_gfm'; describe('ContentViewer', () => { let vm; @@ -29,6 +30,7 @@ describe('ContentViewer', () => { path: 'test.md', content: '* Test', projectPath: 'testproject', + type: 'markdown', }); const previewContainer = vm.$el.querySelector('.md-previewer'); @@ -44,6 +46,7 @@ describe('ContentViewer', () => { createComponent({ path: GREEN_BOX_IMAGE_URL, fileSize: 1024, + type: 'image', }); setTimeout(() => { |