summaryrefslogtreecommitdiff
path: root/spec/javascripts/repo
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-10-19 11:55:27 +0100
committerPhil Hughes <me@iamphill.com>2017-10-23 10:45:44 +0100
commit10dcaea1c3e9061d8f65d3ec15becbd17c7b2716 (patch)
treec3aa596eab1298ca834a25350f7dce0943a2d474 /spec/javascripts/repo
parent389c852d1210f07d34f2235423235a8ac1cff27b (diff)
downloadgitlab-ce-10dcaea1c3e9061d8f65d3ec15becbd17c7b2716.tar.gz
failing spec fixes
Diffstat (limited to 'spec/javascripts/repo')
-rw-r--r--spec/javascripts/repo/components/repo_file_buttons_spec.js28
1 files changed, 11 insertions, 17 deletions
diff --git a/spec/javascripts/repo/components/repo_file_buttons_spec.js b/spec/javascripts/repo/components/repo_file_buttons_spec.js
index 701c260224f..bc5cb5b8f38 100644
--- a/spec/javascripts/repo/components/repo_file_buttons_spec.js
+++ b/spec/javascripts/repo/components/repo_file_buttons_spec.js
@@ -2,7 +2,16 @@ import Vue from 'vue';
import repoFileButtons from '~/repo/components/repo_file_buttons.vue';
import RepoStore from '~/repo/stores/repo_store';
-describe('RepoFileButtons', () => {
+fdescribe('RepoFileButtons', () => {
+ const activeFile = {
+ extension: 'md',
+ url: 'url',
+ raw_path: 'raw_path',
+ blame_path: 'blame_path',
+ commits_path: 'commits_path',
+ permalink: 'permalink',
+ };
+
function createComponent() {
const RepoFileButtons = Vue.extend(repoFileButtons);
@@ -14,14 +23,6 @@ describe('RepoFileButtons', () => {
});
it('renders Raw, Blame, History, Permalink and Preview toggle', () => {
- const activeFile = {
- extension: 'md',
- url: 'url',
- raw_path: 'raw_path',
- blame_path: 'blame_path',
- commits_path: 'commits_path',
- permalink: 'permalink',
- };
const activeFileLabel = 'activeFileLabel';
RepoStore.openedFiles = new Array(1);
RepoStore.activeFile = activeFile;
@@ -46,10 +47,6 @@ describe('RepoFileButtons', () => {
});
it('triggers rawPreviewToggle on preview click', () => {
- const activeFile = {
- extension: 'md',
- url: 'url',
- };
RepoStore.openedFiles = new Array(1);
RepoStore.activeFile = activeFile;
RepoStore.editMode = true;
@@ -65,10 +62,7 @@ describe('RepoFileButtons', () => {
});
it('does not render preview toggle if not canPreview', () => {
- const activeFile = {
- extension: 'abcd',
- url: 'url',
- };
+ activeFile.extension = 'js';
RepoStore.openedFiles = new Array(1);
RepoStore.activeFile = activeFile;