diff options
author | Phil Hughes <me@iamphill.com> | 2019-05-01 08:10:15 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-05-01 08:10:15 +0000 |
commit | da443ff064bd74a84b40a3af31ca00385bb39008 (patch) | |
tree | b7b29b3b05247808f686770b23c8a6e9ce57a3d5 | |
parent | e7c4ca86d971cd99786cf695f631e9b60c098d87 (diff) | |
parent | d89b19476d80612e97a2853249fabc63a5ff3f42 (diff) | |
download | gitlab-ce-da443ff064bd74a84b40a3af31ca00385bb39008.tar.gz |
Merge branch 'winh-binary-fixture-path' into 'master'
Use FIXTURES_PATH constant for binary fixtures in frontend tests
See merge request gitlab-org/gitlab-ce!27891
-rw-r--r-- | config/karma.config.js | 2 | ||||
-rw-r--r-- | spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/blob/pdf/index_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/pdf/index_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/pdf/page_spec.js | 4 |
5 files changed, 13 insertions, 5 deletions
diff --git a/config/karma.config.js b/config/karma.config.js index 7e1e89f3c10..dfcb5c4646e 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -110,7 +110,7 @@ module.exports = function(config) { frameworks: ['jasmine'], files: [ { pattern: 'spec/javascripts/test_bundle.js', watched: false }, - { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.png)', included: false }, + { pattern: `spec/javascripts/fixtures/**/*@(.json|.html|.png|.bmpr|.pdf)`, included: false }, ], preprocessors: { 'spec/javascripts/**/*.js': ['webpack', 'sourcemap'], diff --git a/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js b/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js index 68b4f261617..33210794ba1 100644 --- a/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js +++ b/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js @@ -1,5 +1,7 @@ import BalsamiqViewer from '~/blob/balsamiq/balsamiq_viewer'; -import bmprPath from '../../fixtures/blob/balsamiq/test.bmpr'; +import { FIXTURES_PATH } from 'spec/test_constants'; + +const bmprPath = `${FIXTURES_PATH}/blob/balsamiq/test.bmpr`; describe('Balsamiq integration spec', () => { let container; diff --git a/spec/javascripts/blob/pdf/index_spec.js b/spec/javascripts/blob/pdf/index_spec.js index acf87580777..6fa3890483c 100644 --- a/spec/javascripts/blob/pdf/index_spec.js +++ b/spec/javascripts/blob/pdf/index_spec.js @@ -1,5 +1,7 @@ import renderPDF from '~/blob/pdf'; -import testPDF from '../../fixtures/blob/pdf/test.pdf'; +import { FIXTURES_PATH } from 'spec/test_constants'; + +const testPDF = `${FIXTURES_PATH}/blob/pdf/test.pdf`; describe('PDF renderer', () => { let viewer; diff --git a/spec/javascripts/pdf/index_spec.js b/spec/javascripts/pdf/index_spec.js index 6df4ded92f0..7191b65b4cd 100644 --- a/spec/javascripts/pdf/index_spec.js +++ b/spec/javascripts/pdf/index_spec.js @@ -3,7 +3,9 @@ import { GlobalWorkerOptions } from 'vendor/pdf'; import workerSrc from 'vendor/pdf.worker.min'; import PDFLab from '~/pdf/index.vue'; -import pdf from '../fixtures/blob/pdf/test.pdf'; +import { FIXTURES_PATH } from 'spec/test_constants'; + +const pdf = `${FIXTURES_PATH}/blob/pdf/test.pdf`; GlobalWorkerOptions.workerSrc = workerSrc; const Component = Vue.extend(PDFLab); diff --git a/spec/javascripts/pdf/page_spec.js b/spec/javascripts/pdf/page_spec.js index b2e9fa42a63..f899b5b3a0d 100644 --- a/spec/javascripts/pdf/page_spec.js +++ b/spec/javascripts/pdf/page_spec.js @@ -4,7 +4,9 @@ import workerSrc from 'vendor/pdf.worker.min'; import PageComponent from '~/pdf/page/index.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; -import testPDF from 'spec/fixtures/blob/pdf/test.pdf'; +import { FIXTURES_PATH } from 'spec/test_constants'; + +const testPDF = `${FIXTURES_PATH}/blob/pdf/test.pdf`; describe('Page component', () => { const Component = Vue.extend(PageComponent); |