Update smoke test to match new open behavior

This commit is contained in:
Ash Wilson 2019-01-04 13:25:42 -05:00
parent bac378654e
commit ae57abe70a
No known key found for this signature in database
GPG Key ID: 81B1DDB704F69D2A

View File

@ -23,10 +23,14 @@ describe "Smoke Test", ->
it "can open a file in Atom and perform basic operations on it", ->
tempDirPath = temp.mkdirSync("empty-dir")
runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: atomHome}, (client) ->
filePath = path.join(tempDirPath, "new-file")
fs.writeFileSync filePath, "", {encoding: "utf8"}
runAtom [filePath], {ATOM_HOME: atomHome}, (client) ->
client
.treeViewRootDirectories()
.then ({value}) -> expect(value).toEqual([tempDirPath])
.then ({value}) -> expect(value).toEqual([])
.waitForExist("atom-text-editor", 5000)
.then (exists) -> expect(exists).toBe true
.waitForPaneItemCount(1, 1000)