mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
✅ Add test for getVisiblePaneContainers()
This commit is contained in:
@@ -2624,6 +2624,29 @@ i = /test/; #FIXME\
|
||||
})
|
||||
})
|
||||
|
||||
describe('::getVisiblePaneContainers', () => {
|
||||
it('returns all visible pane containers', () => {
|
||||
const center = workspace.getCenter()
|
||||
const leftDock = workspace.getLeftDock()
|
||||
const rightDock = workspace.getRightDock()
|
||||
const bottomDock = workspace.getBottomDock()
|
||||
|
||||
leftDock.hide()
|
||||
rightDock.hide()
|
||||
bottomDock.hide()
|
||||
expect(workspace.getVisiblePaneContainers()).toEqual([center])
|
||||
|
||||
leftDock.show()
|
||||
expect(workspace.getVisiblePaneContainers().sort()).toEqual([center, leftDock])
|
||||
|
||||
rightDock.show()
|
||||
expect(workspace.getVisiblePaneContainers().sort()).toEqual([center, leftDock, rightDock])
|
||||
|
||||
bottomDock.show()
|
||||
expect(workspace.getVisiblePaneContainers().sort()).toEqual([center, leftDock, rightDock, bottomDock])
|
||||
})
|
||||
})
|
||||
|
||||
describe('when the core.allowPendingPaneItems option is falsey', () => {
|
||||
it('does not open item with `pending: true` option as pending', () => {
|
||||
let pane = null
|
||||
|
||||
Reference in New Issue
Block a user