From 7cefaea876da9e25a1c3ea870f4e4b070a196905 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Tue, 15 Nov 2016 14:08:06 +0000 Subject: explicitly disable eslint inline --- spec/javascripts/notes_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/javascripts/notes_spec.js') diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index 2e3a4b66e2d..51f2ae8bcbd 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable space-before-function-paren, no-unused-expressions, no-undef, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */ /*= require notes */ /*= require autosize */ /*= require gl_form */ -- cgit v1.2.1 From c4244ba4c25e51b8d05009597e98ba8379f9cb9e Mon Sep 17 00:00:00 2001 From: winniehell Date: Tue, 22 Nov 2016 23:46:58 +0100 Subject: Replace static fixture for notes_spec (!7683) --- spec/javascripts/notes_spec.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'spec/javascripts/notes_spec.js') diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index 51f2ae8bcbd..2db182d702b 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -6,17 +6,21 @@ (function() { window.gon || (window.gon = {}); - - window.disableButtonIfEmptyField = function() { - return null; - }; + window.gl = window.gl || {}; + gl.utils = gl.utils || {}; describe('Notes', function() { - describe('task lists', function() { - fixture.preload('issue_note.html'); + var commentsTemplate = 'issues/issue_with_comment.raw'; + fixture.preload(commentsTemplate); + beforeEach(function () { + fixture.load(commentsTemplate); + gl.utils.disableButtonIfEmptyField = _.noop; + window.project_uploads_path = 'http://test.host/uploads'; + }); + + describe('task lists', function() { beforeEach(function() { - fixture.load('issue_note.html'); $('form').on('submit', function(e) { e.preventDefault(); }); @@ -41,12 +45,9 @@ }); describe('comments', function() { - var commentsTemplate = 'comments.html'; var textarea = '.js-note-text'; - fixture.preload(commentsTemplate); beforeEach(function() { - fixture.load(commentsTemplate); this.notes = new Notes(); this.autoSizeSpy = spyOnEvent($(textarea), 'autosize:update'); -- cgit v1.2.1 From 8e0e902b133f33b38ffaa743ac3f3297b4bceb2d Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 13 Dec 2016 23:26:26 -0600 Subject: resolve all instances of no-undef eslint rule violations --- spec/javascripts/notes_spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/javascripts/notes_spec.js') diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index 2db182d702b..d3bfa7730fa 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -1,4 +1,6 @@ -/* eslint-disable space-before-function-paren, no-unused-expressions, no-undef, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */ +/* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */ +/* global Notes */ + /*= require notes */ /*= require autosize */ /*= require gl_form */ -- cgit v1.2.1