mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Update remaining selected class names to fold-selected
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user