From 17c0526bc34098176b613ef29ddbcbbec60f8ee4 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 31 May 2012 10:12:59 -0700 Subject: [PATCH] Add test for gutter rendering of fold lines --- spec/app/editor-spec.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index a4295f2af..6693b5141 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -732,6 +732,14 @@ describe "Editor", -> expect(editor.gutter.find('.line-number:eq(3)').text()).toBe '4' expect(editor.gutter.find('.line-number:eq(4)').text()).toBe '6' + it "redraws gutter numbers when lines are unfolded", -> + setEditorHeightInLines(editor, 20) + fold = editor.createFold(2, 12) + expect(editor.gutter.find('.line-number').length).toBe 3 + + fold.destroy() + expect(editor.gutter.find('.line-number').length).toBe 13 + describe "when the scrollView is scrolled to the right", -> it "adds a drop shadow to the gutter", -> editor.attachToDom()