diff options
author | Chris Toynbee <ctoynbee@gmail.com> | 2019-07-23 22:13:36 +0000 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-07-23 22:13:36 +0000 |
commit | 64a32d6cf0d8b67e1b495169054cc172f79cfadd (patch) | |
tree | 8405e27b9831eed54c29754ec1305d907f8f4d65 /spec/javascripts/ide/components/repo_editor_spec.js | |
parent | 43626526aa2ae8e5bcfd30825e12566b7cbeee67 (diff) | |
download | gitlab-ce-64a32d6cf0d8b67e1b495169054cc172f79cfadd.tar.gz |
Encapsulate file view modes with constants
Diffstat (limited to 'spec/javascripts/ide/components/repo_editor_spec.js')
-rw-r--r-- | spec/javascripts/ide/components/repo_editor_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/javascripts/ide/components/repo_editor_spec.js b/spec/javascripts/ide/components/repo_editor_spec.js index 7dc5cb24981..0701b773e17 100644 --- a/spec/javascripts/ide/components/repo_editor_spec.js +++ b/spec/javascripts/ide/components/repo_editor_spec.js @@ -5,7 +5,7 @@ import axios from '~/lib/utils/axios_utils'; import store from '~/ide/stores'; import repoEditor from '~/ide/components/repo_editor.vue'; import Editor from '~/ide/lib/editor'; -import { activityBarViews } from '~/ide/constants'; +import { activityBarViews, FILE_VIEW_MODE_EDITOR, FILE_VIEW_MODE_PREVIEW } from '~/ide/constants'; import { createComponentWithStore } from '../../helpers/vue_mount_component_helper'; import setTimeoutPromise from '../../helpers/set_timeout_promise_helper'; import { file, resetStore } from '../helpers'; @@ -16,7 +16,7 @@ describe('RepoEditor', () => { beforeEach(done => { const f = { ...file(), - viewMode: 'editor', + viewMode: FILE_VIEW_MODE_EDITOR, }; const RepoEditor = Vue.extend(repoEditor); @@ -370,7 +370,7 @@ describe('RepoEditor', () => { describe('when files view mode is preview', () => { beforeEach(done => { spyOn(vm.editor, 'updateDimensions'); - vm.file.viewMode = 'preview'; + vm.file.viewMode = FILE_VIEW_MODE_PREVIEW; vm.$nextTick(done); }); @@ -392,7 +392,7 @@ describe('RepoEditor', () => { describe('when file view mode changes to editor', () => { beforeEach(done => { - vm.file.viewMode = 'editor'; + vm.file.viewMode = FILE_VIEW_MODE_EDITOR; // one tick to trigger watch vm.$nextTick() |