mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Put it with its friends.
This commit is contained in:
@@ -125,6 +125,24 @@ describe "Starting Atom", ->
|
||||
.treeViewRootDirectories()
|
||||
.then ({value}) -> expect(value).toEqual([otherTempDirPath])
|
||||
|
||||
it "opens the new window offset from the other window", ->
|
||||
runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: atomHome}, (client) ->
|
||||
win0Position = null
|
||||
win1Position = null
|
||||
client
|
||||
.waitForWindowCount(1, 10000)
|
||||
.execute -> atom.getPosition()
|
||||
.then ({value}) -> win0Position = value
|
||||
.waitForNewWindow(->
|
||||
@startAnotherAtom([path.join(temp.mkdirSync("a-third-dir"), "a-file")], ATOM_HOME: atomHome)
|
||||
, 5000)
|
||||
.waitForWindowCount(2, 10000)
|
||||
.execute -> atom.getPosition()
|
||||
.then ({value}) -> win1Position = value
|
||||
.then ->
|
||||
expect(win0Position.x).toEqual(win1Position.x + 22)
|
||||
expect(win0Position.y).toEqual(win1Position.y + 22)
|
||||
|
||||
describe "reopening a directory that was previously opened", ->
|
||||
it "remembers the state of the window", ->
|
||||
runAtom [tempDirPath], {ATOM_HOME: atomHome}, (client) ->
|
||||
@@ -181,25 +199,6 @@ describe "Starting Atom", ->
|
||||
, 5000)
|
||||
.waitForPaneItemCount(1, 5000)
|
||||
|
||||
it "opens a new window offset from the other window", ->
|
||||
runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: atomHome}, (client) ->
|
||||
win0Position = null
|
||||
win1Position = null
|
||||
client
|
||||
.waitForWindowCount(1, 10000)
|
||||
.getWindowPosition()
|
||||
.then ({value}) -> win0Position = value
|
||||
.waitForNewWindow(->
|
||||
@startAnotherAtom([path.join(temp.mkdirSync("a-third-dir"), "a-file")], ATOM_HOME: atomHome)
|
||||
, 5000)
|
||||
.waitForWindowCount(2, 10000)
|
||||
.getWindowPosition()
|
||||
.then ({value}) -> win1Position = value
|
||||
.then ->
|
||||
offset = atom.getWindowOffsetForCurrentPlatform()
|
||||
expect(win0Position.x).toEqual(win1Position.x + offset)
|
||||
expect(win0Position.y).toEqual(win1Position.y + offset)
|
||||
|
||||
it "doesn't open a new window if openEmptyEditorOnStart is disabled", ->
|
||||
configPath = path.join(atomHome, 'config.cson')
|
||||
config = CSON.readFileSync(configPath)
|
||||
|
||||
Reference in New Issue
Block a user