Move another integration test

This commit is contained in:
Nathan Sobo
2016-08-11 16:33:25 -06:00
parent 29cf1025f1
commit b89c0cb415
2 changed files with 11 additions and 12 deletions

View File

@@ -56,18 +56,6 @@ describe "Starting Atom", ->
.waitForWindowCount(1, 5000)
describe "launching with no path", ->
it "opens a new window with a single untitled buffer", ->
runAtom [], {ATOM_HOME: atomHome}, (client) ->
client
.waitForPaneItemCount(1, 5000)
# Opening with no file paths always creates a new window, even if
# existing windows have no project paths.
.waitForNewWindow(->
@startAnotherAtom([], ATOM_HOME: atomHome)
, 5000)
.waitForPaneItemCount(1, 5000)
it "doesn't open a new window if openEmptyEditorOnStart is disabled", ->
configPath = path.join(atomHome, 'config.cson')
config = CSON.readFileSync(configPath)

View File

@@ -224,6 +224,17 @@ describe('AtomApplication', function () {
})
assert.deepEqual(treeViewPaths, [dirAPath, dirBPath])
})
it('reuses windows with no project paths to open directories', async function () {
const tempDirPath = makeTempDir()
const atomApplication = buildAtomApplication()
const window1 = atomApplication.openWithOptions(parseCommandLine([]))
await window1.loadedPromise
const reusedWindow = atomApplication.openWithOptions(parseCommandLine([tempDirPath]))
assert.equal(reusedWindow, window1)
assert.deepEqual(await getTreeViewRootDirectories(window1), [tempDirPath])
})
})
function buildAtomApplication () {