From 242df788e652f7ba61014a4e279efb2ec4b9385c Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 23 Jul 2014 16:25:24 -0700 Subject: [PATCH] Remove unnecessary scrollbar specs --- spec/editor-component-spec.coffee | 50 ------------------------------- 1 file changed, 50 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index d8efa8150..58d061505 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -1566,58 +1566,8 @@ describe "EditorComponent", -> runSetImmediateCallbacks() expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - - it "updates the position and width of the horizontal scrollbar when editor.showLineNumbers is toggled", -> - componentNode.style.width = 10 * charWidth + 'px' - component.measureHeightAndWidth() - runSetImmediateCallbacks() - - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' - - atom.config.set("editor.showLineNumbers", false) - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() expect(horizontalScrollbarNode.style.left).toBe '0px' - atom.config.set("editor.showLineNumbers", true) - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' - - describe "when the editor is hidden", -> - hideEditorView = -> - wrapperNode.style.display = 'none' - expect(component.isVisible()).toBe false - - showEditorView = -> - wrapperNode.style.display = 'block' - expect(component.isVisible()).toBe true - - it "updates the position of the horizontal scrollbar only when the editor is visible", -> - # toggling gutter off - hideEditorView() - atom.config.set("editor.showLineNumbers", false) - - showEditorView() - component.forceUpdate() - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.style.left).toBe '0px' - - # toggling gutter back on - hideEditorView() - atom.config.set("editor.showLineNumbers", true) - - showEditorView() - component.forceUpdate() - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' - describe "mousewheel events", -> beforeEach -> atom.config.set('editor.scrollSensitivity', 100)