mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Ensure we don't reuse the same window when testing the offset distance
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
6e44ce4432
commit
04d8b9bb86
@@ -90,13 +90,14 @@ describe('AtomApplication', function () {
|
||||
it('positions new windows at an offset distance from the previous window', async function () {
|
||||
const atomApplication = buildAtomApplication()
|
||||
|
||||
const window1 = atomApplication.launch(parseCommandLine([]))
|
||||
const window1 = atomApplication.launch(parseCommandLine([makeTempDir()]))
|
||||
await window1.loadedPromise
|
||||
window1.browserWindow.setBounds({width: 400, height: 400, x: 0, y: 0})
|
||||
|
||||
const window2 = atomApplication.launch(parseCommandLine([]))
|
||||
const window2 = atomApplication.launch(parseCommandLine([makeTempDir()]))
|
||||
await window2.loadedPromise
|
||||
|
||||
assert.notEqual(window1, window2)
|
||||
window1Dimensions = window1.getDimensions()
|
||||
window2Dimensions = window2.getDimensions()
|
||||
assert.isAbove(window2Dimensions.x, window1Dimensions.x)
|
||||
|
||||
Reference in New Issue
Block a user