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/right_sidebar_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/javascripts/right_sidebar_spec.js') diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js index ef03d1147de..83ebbd63f3a 100644 --- a/spec/javascripts/right_sidebar_spec.js +++ b/spec/javascripts/right_sidebar_spec.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-undef, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */ /*= require right_sidebar */ /*= require jquery */ -- cgit v1.2.1 From bc1b305dcfff3c4818e6e3d1315234db9a555d61 Mon Sep 17 00:00:00 2001 From: winniehell Date: Wed, 23 Nov 2016 01:48:14 +0100 Subject: Replace static fixture for right_sidebar_spec (!7687) --- spec/javascripts/right_sidebar_spec.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'spec/javascripts/right_sidebar_spec.js') diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js index 83ebbd63f3a..0a9bc546144 100644 --- a/spec/javascripts/right_sidebar_spec.js +++ b/spec/javascripts/right_sidebar_spec.js @@ -34,9 +34,10 @@ }; describe('RightSidebar', function() { - fixture.preload('right_sidebar.html'); + var fixtureName = 'issues/open-issue.html.raw'; + fixture.preload(fixtureName); beforeEach(function() { - fixture.load('right_sidebar.html'); + fixture.load(fixtureName); this.sidebar = new Sidebar; $aside = $('.right-sidebar'); $page = $('.page-with-sidebar'); @@ -44,15 +45,12 @@ $toggle = $aside.find('.js-sidebar-toggle'); return $labelsIcon = $aside.find('.sidebar-collapsed-icon'); }); - it('should expand the sidebar when arrow is clicked', function() { + it('should expand/collapse the sidebar when arrow is clicked', function() { + assertSidebarState('expanded'); $toggle.click(); - return assertSidebarState('expanded'); - }); - it('should collapse the sidebar when arrow is clicked', function() { + assertSidebarState('collapsed'); $toggle.click(); assertSidebarState('expanded'); - $toggle.click(); - return assertSidebarState('collapsed'); }); it('should float over the page and when sidebar icons clicked', function() { $labelsIcon.click(); -- 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/right_sidebar_spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec/javascripts/right_sidebar_spec.js') diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js index 0a9bc546144..a083dbf033a 100644 --- a/spec/javascripts/right_sidebar_spec.js +++ b/spec/javascripts/right_sidebar_spec.js @@ -1,4 +1,5 @@ -/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-undef, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */ +/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */ +/* global Sidebar */ /*= require right_sidebar */ /*= require jquery */ -- cgit v1.2.1