mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Move tests of adding/removing pane active class to pane-element-spec
This commit is contained in:
parent
fec21165d0
commit
b053e95aa7
@ -8,6 +8,17 @@ describe "PaneElement", ->
|
||||
pane = container.getRoot()
|
||||
paneElement = atom.views.getView(pane)
|
||||
|
||||
describe "when the pane's active status changes", ->
|
||||
it "adds or removes the .active class as appropriate", ->
|
||||
pane2 = pane.splitRight()
|
||||
expect(pane2.isActive()).toBe true
|
||||
|
||||
expect(paneElement.className).not.toMatch /active/
|
||||
pane.activate()
|
||||
expect(paneElement.className).toMatch /active/
|
||||
pane2.activate()
|
||||
expect(paneElement.className).not.toMatch /active/
|
||||
|
||||
describe "when the active item changes", ->
|
||||
it "hides all item elements except the active one", ->
|
||||
item1 = document.createElement('div')
|
||||
|
@ -46,21 +46,6 @@ describe "PaneView", ->
|
||||
deserializerDisposable.dispose()
|
||||
jasmine.restoreDeprecationsSnapshot()
|
||||
|
||||
describe "when the pane's active status changes", ->
|
||||
[pane2, pane2Model] = []
|
||||
|
||||
beforeEach ->
|
||||
pane2Model = paneModel.splitRight(items: [pane.copyActiveItem()])
|
||||
pane2 = atom.views.getView(pane2Model).__spacePenView
|
||||
expect(pane2Model.isActive()).toBe true
|
||||
|
||||
it "adds or removes the .active class as appropriate", ->
|
||||
expect(pane).not.toHaveClass('active')
|
||||
paneModel.activate()
|
||||
expect(pane).toHaveClass('active')
|
||||
pane2Model.activate()
|
||||
expect(pane).not.toHaveClass('active')
|
||||
|
||||
describe "when the pane is focused", ->
|
||||
beforeEach ->
|
||||
container.attachToDom()
|
||||
|
Loading…
Reference in New Issue
Block a user