Update remaining selected class names to fold-selected

This commit is contained in:
Kevin Sawicki 2013-11-06 09:55:53 -08:00
parent 383a724144
commit 9f5e913804

View File

@ -2110,23 +2110,23 @@ describe "Editor", ->
expect(editor.getCursorBufferPosition()).toEqual [3, 0]
describe "when a selection starts/stops intersecting a fold", ->
it "adds/removes the 'selected' class to the fold's line element and hides the cursor if it is on the fold line", ->
it "adds/removes the 'fold-selected' class to the fold's line element and hides the cursor if it is on the fold line", ->
editor.createFold(2, 4)
editor.setSelectedBufferRange([[1, 0], [2, 0]], preserveFolds: true, isReversed: true)
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.fold-selected')
editor.setSelectedBufferRange([[1, 0], [1, 1]], preserveFolds: true)
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.selected')
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.fold-selected')
editor.setSelectedBufferRange([[1, 0], [5, 0]], preserveFolds: true)
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.fold-selected')
editor.setCursorScreenPosition([3,0])
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.selected')
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.fold-selected')
editor.setCursorScreenPosition([2,0])
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.fold-selected')
expect(editor.find('.cursor')).toBeHidden()
editor.setCursorScreenPosition([3,0])