Merge branch 'master' into dh-async-repo

This commit is contained in:
joshaber
2016-01-05 15:50:43 -05:00
2 changed files with 40 additions and 1 deletions

View File

@@ -125,6 +125,27 @@ 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(win1Position.x).toBeGreaterThan(win0Position.x)
# Ideally we'd test the y coordinate too, but if the window's
# already as tall as it can be, then OS X won't move it down outside
# the screen.
# expect(win1Position.y).toBeGreaterThan(win0Position.y)
describe "reopening a directory that was previously opened", ->
it "remembers the state of the window", ->
runAtom [tempDirPath], {ATOM_HOME: atomHome}, (client) ->