mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add "location" param to open()
This commit is contained in:
@@ -126,22 +126,21 @@ describe('Workspace', () => {
|
||||
})
|
||||
|
||||
it('constructs the view with the same panes', () => {
|
||||
const getRightDockActivePane = () => atom.workspace.getRightDock().getActivePane()
|
||||
const pane1 = atom.workspace.getRightDock().getActivePane()
|
||||
const pane2 = pane1.splitRight({copyActiveItem: true})
|
||||
const pane3 = pane2.splitRight({copyActiveItem: true})
|
||||
let pane4 = null
|
||||
|
||||
waitsForPromise(() =>
|
||||
atom.workspace.open(null, {pane: getRightDockActivePane()}).then(editor => editor.setText('An untitled editor.'))
|
||||
atom.workspace.open(null, {location: 'right'}).then(editor => editor.setText('An untitled editor.'))
|
||||
)
|
||||
|
||||
waitsForPromise(() =>
|
||||
atom.workspace.open('b', {pane: getRightDockActivePane()}).then(editor => pane2.activateItem(editor.copy()))
|
||||
atom.workspace.open('b', {location: 'right'}).then(editor => pane2.activateItem(editor.copy()))
|
||||
)
|
||||
|
||||
waitsForPromise(() =>
|
||||
atom.workspace.open('../sample.js', {pane: getRightDockActivePane()}).then(editor => pane3.activateItem(editor))
|
||||
atom.workspace.open('../sample.js', {location: 'right'}).then(editor => pane3.activateItem(editor))
|
||||
)
|
||||
|
||||
runs(() => {
|
||||
@@ -150,7 +149,7 @@ describe('Workspace', () => {
|
||||
})
|
||||
|
||||
waitsForPromise(() =>
|
||||
atom.workspace.open('../sample.txt', {pane: getRightDockActivePane()}).then(editor => pane4.activateItem(editor))
|
||||
atom.workspace.open('../sample.txt', {location: 'right'}).then(editor => pane4.activateItem(editor))
|
||||
)
|
||||
|
||||
runs(() => {
|
||||
|
||||
Reference in New Issue
Block a user