mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Move another integration test
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user