mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Fix Workspace.open test for activating existing items in docks
This commit is contained in:
parent
d1e8e359ce
commit
e40ef03008
@ -379,7 +379,7 @@ describe('Workspace', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('activates the dock with the matching item', () => {
|
||||
it('activates the pane in the dock with the matching item', () => {
|
||||
const dock = atom.workspace.getRightDock()
|
||||
const ITEM_URI = 'atom://test'
|
||||
const item = {
|
||||
@ -388,11 +388,9 @@ describe('Workspace', () => {
|
||||
getElement: () => document.createElement('div')
|
||||
}
|
||||
dock.getActivePane().addItem(item)
|
||||
spyOn(dock, 'activate')
|
||||
spyOn(dock.paneForItem(item), 'activate')
|
||||
waitsForPromise(() => atom.workspace.open(ITEM_URI, {searchAllPanes: true}))
|
||||
runs(() => {
|
||||
expect(dock.activate).toHaveBeenCalled()
|
||||
})
|
||||
runs(() => expect(dock.paneForItem(item).activate).toHaveBeenCalled())
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user