mirror of
https://github.com/atom/atom.git
synced 2026-01-15 01:48:15 -05:00
Fix atom-application tests
When closing a window with a file that does not exist, Atom opens a dialog asking the users if they want to save the changes. This dialog prevented the tests from finishing correctly.
This commit is contained in:
@@ -663,6 +663,10 @@ describe('AtomApplication', function () {
|
||||
parseCommandLine([path.join(makeTempDir('a'), 'file-a')])
|
||||
)
|
||||
await focusWindow(window)
|
||||
|
||||
// Choosing "Don't save"
|
||||
mockElectronShowMessageBox({ response: 2 })
|
||||
|
||||
window.close()
|
||||
await window.closedPromise
|
||||
await atomApplication.lastBeforeQuitPromise
|
||||
@@ -675,6 +679,10 @@ describe('AtomApplication', function () {
|
||||
parseCommandLine([path.join(makeTempDir('a'), 'file-a')])
|
||||
)
|
||||
await focusWindow(window)
|
||||
|
||||
// Choosing "Don't save"
|
||||
mockElectronShowMessageBox({ response: 2 })
|
||||
|
||||
window.close()
|
||||
await window.closedPromise
|
||||
await timeoutPromise(1000)
|
||||
|
||||
Reference in New Issue
Block a user