Commit Graph

223 Commits

Author SHA1 Message Date
Ash Wilson
e35510e928
Stub the storage folder application.json read 2019-04-18 17:05:41 -04:00
Ash Wilson
1a48b987ca
Allow LaunchScenario::launch() to accept an existing app 2019-04-18 17:05:25 -04:00
Ash Wilson
b854a698f7
Dump a shorthand description of the actual windows on assert failure 2019-04-18 17:05:08 -04:00
Ash Wilson
109fb1116b
Make the stubbed openLocations() sync for simplicity 2019-04-18 17:04:37 -04:00
Ash Wilson
097906c23f
AtomWindow tests 2019-04-18 16:20:26 -04:00
Ash Wilson
8f4c24b4e5
initialPaths and representedDirectoryPaths renaming 2019-04-18 16:19:23 -04:00
Ash Wilson
db2f8302bf
Bring the stub AtomWindow up to date 2019-04-18 16:19:06 -04:00
Ash Wilson
efeb2cdb0a
stat locations in parsePathToOpen() 2019-04-18 16:11:02 -04:00
Ash Wilson
f66002e193
Create stubbed AtomWindows instead of real ones in app tests 2019-04-18 10:51:25 -04:00
Ash Wilson
87a4213b6a
Rewrite AtomApplication::openPaths() logic to find existing windows 2019-04-17 15:56:49 -04:00
Ash Wilson
9b40488652
Replace tests for scenarios I observed with tests for scenarios we want 2019-04-17 15:18:29 -04:00
Ash Wilson
1fc2f9b4ba
Increase beforeEach, afterEach, and emitterEventPromise timeouts
This is to temporarily work around spikes in the window launch time.
2019-04-17 15:09:44 -04:00
Ash Wilson
9af51897f0
Override and restore ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT 2019-04-17 14:09:43 -04:00
Ash Wilson
b3ab30dcf5
Abstract "wait for window to finish loading" logic 2019-04-17 14:09:19 -04:00
Ash Wilson
b591f83447
Avoid binding expectOpenEvent into the closure 2019-04-17 13:09:56 -04:00
Ash Wilson
4f8de4bb0a
Comment on launch scenarios that correspond to file manager launches 2019-04-17 13:09:29 -04:00
Ash Wilson
58c6292905
Tests for the remaining command-line cases 2019-04-17 10:24:03 -04:00
Ash Wilson
fc1af26e34
Show "incorrect window" banner for mismatched results 2019-04-17 10:23:22 -04:00
Ash Wilson
2f48ad097b
Boolean logic is hard okay 2019-04-17 10:23:07 -04:00
Ash Wilson
bc4a22f97a
Resolve root and editor paths during spec parsing for consistency 2019-04-17 10:22:51 -04:00
Ash Wilson
a53398daf7
Allow file references by basename or short path 2019-04-16 16:00:31 -04:00
Ash Wilson
f0dc842293
Distinguish between launch and open 2019-04-16 16:00:12 -04:00
Ash Wilson
58bd9bfa33
Don't open all precondition windows twice (oops) 2019-04-16 15:59:46 -04:00
Ash Wilson
2a50d87999
Use a single application to launch all precondition windows 2019-04-16 15:59:08 -04:00
Ash Wilson
08a29df12f
Omit untitled editors (at least for now) 2019-04-16 15:38:03 -04:00
Ash Wilson
8e15d9656a
Log missing roots instead of extra roots twice 2019-04-16 15:37:45 -04:00
Ash Wilson
d3b5ce0b4b
Use _ for an empty project root or editor path group
Co-Authored-By: Jason Rudolph <jason@jasonrudolph.com>
2019-04-16 15:37:01 -04:00
Ash Wilson
839544e0a9
Launch scenario test framework 2019-04-16 14:56:03 -04:00
Rafael Oleza
6b61f14c3b Wait until the editor is ready on application test 2019-04-09 16:00:47 +02:00
Rafael Oleza
dbe00f616a 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.
2019-04-09 13:18:02 +02:00
Rafael Oleza
3f11d71dc0 Make sure that Atom does not get autoupdated when running main process tests 2019-04-08 14:09:15 +02:00
Rafael Oleza
7ad8976a00 Do not check for order of windows in test
The order is not deterministic on Windows, since it depends on focus
state
2019-04-05 17:13:53 +02:00
Rafael Oleza
df54e900d5 Add test to ensure that the piping logic works as expected 2019-04-05 17:13:53 +02:00
Rafael Oleza
9f453e64fe Fix reopen project when there are no open windows 2019-03-26 17:01:38 +01:00
Rafael Oleza
cd302135f0 Fix undefined variables from specs 2019-02-28 19:30:03 +01:00
Rafael Oleza
c35ec012b4 Run prettier on spec/ folder 2019-02-28 19:30:03 +01:00
David Wilson
bf3502c4db Fix "Open Folder" menu item on Windows 2019-02-15 09:54:44 -08:00
David Wilson
37ae5dde5a Add a test for folder open behavior on after all windows have closed 2019-02-07 14:30:51 -08:00
Ash Wilson
f20aa038bd
Reorganize AtomApplication tests 2019-01-14 11:46:30 -05:00
Ash Wilson
bac378654e
Deflake test that depends on tree-view loading project folders 2019-01-04 11:07:56 -05:00
Ash Wilson
34167d426f
Adjust tests to use --add when necessary 2019-01-04 11:07:06 -05:00
Ash Wilson
efc55d71a3
👕 Make standard happy with the test source 2019-01-04 09:11:35 -05:00
Ash Wilson
15594dd8c2
AtomApplication launch behavior shuffle 2019-01-03 16:41:17 -05:00
Stepan Hruda
069d3ec91a
Merge pull request #17873 from atom/fb-sh-close-on-unload
During quit, close unloaded windows
2018-08-27 20:32:26 -04:00
Stepan Hruda
12c4e596b9 During quit, close unloaded windows
Released under CC0.
2018-08-27 19:06:36 -04:00
Max Brunsfeld
51044ce16e Avoid babel in test files that are run in the main process 2018-08-24 12:07:24 -07:00
David Wilson
9858800ec0 Mock fs.createWriteStream to fix FileRecoveryService test 2018-07-06 16:04:29 -07:00
David Wilson
ec2abbbc92 Possible fix for FileRecoveryService test on Linux 2018-06-30 11:25:14 -07:00
Max Brunsfeld
9f35de4413 Always return an array from AtomApplication.launch 2018-01-19 13:08:49 -08:00
Max Brunsfeld
f7aba5a132 Replace loadState with side-effect-free loadPreviousWindowOptions
Signed-off-by: Nathan Sobo <nathan@github.com>
2018-01-19 13:08:49 -08:00
Max Brunsfeld
61e53834e6 Make StorageFolder.load, AtomApplication.launch async
Signed-off-by: Nathan Sobo <nathan@github.com>
2018-01-19 11:52:25 -08:00
Max Brunsfeld
0390548e2c Make FileRecoveryService async 2018-01-18 11:27:27 -08:00
Wliu
5c3d6abb12
Merge branch 'master' into wl-async-confirm 2018-01-07 21:08:32 -05:00
Max Brunsfeld
386b786d93 Let 'atom --wait -a folder' exit due to removing the project folder 2018-01-05 17:50:11 -08:00
Max Brunsfeld
1f4ccf3024 Allow existing windows to be reused when running --wait 2018-01-05 17:50:11 -08:00
Max Brunsfeld
7f76320387 Backfill a test for existing --wait functionality 2018-01-05 17:50:11 -08:00
Max Brunsfeld
b645852142 Don't rely on promise resolution timing in main process spec 2018-01-05 13:01:33 -08:00
Max Brunsfeld
1de37810f0 Rename hasQuitted -> didQuit 2018-01-05 12:11:10 -08:00
Max Brunsfeld
9b917dd8c8 Don't use babel for atom-application test 2018-01-05 12:11:10 -08:00
Wliu
f4bdbe87a0
Update message box mocking 2017-11-19 01:01:45 +01:00
Ash Wilson
9a0ad46739
Ensure app windows launch in the order we assert they do 2017-11-13 09:51:23 -05:00
Michelle Tilley
0267829211
Change the way we test this 2017-11-02 16:45:52 -07:00
Michelle Tilley
99bef8e7d1
More debugging 2017-11-02 16:09:57 -07:00
Michelle Tilley
444597c845
Let's add some debugging 2017-11-02 15:49:06 -07:00
Michelle Tilley
178756b62a
update test 2017-11-02 15:27:59 -07:00
Michelle Tilley
ada75ed1dd
Fix bug in test 2017-11-02 14:45:14 -07:00
Michelle Tilley
668397c1d0
Fix flaky test 2017-11-02 14:11:52 -07:00
Michelle Tilley
db0fd527ce
Add test for core URI handler window-selection logic 2017-11-02 13:35:29 -07:00
Michelle Tilley
158622ce48
Convert array of windows in AtomApplication to a WindowStack 2017-10-19 14:19:24 -07:00
Michelle Tilley
5e43084cd3
url -> URI 2017-10-17 15:23:10 -07:00
Michelle Tilley
eecd524788
Differenter 2017-09-21 14:57:33 -07:00
Michelle Tilley
c52d517d13
Limit argument parsing when --url-handler is set 2017-09-21 14:50:41 -07:00
Antonio Scandurra
e50a73b033 Fix tests 2017-08-14 12:28:19 +02:00
Antonio Scandurra
91b7c14281 Prompt user only once when quitting/restarting and canceling save dialog
I think this slipped through during the refactoring performed in
dc32018. With this commit we are fixing the regression and adding a new
main process regression test to exercise this behavior.
2017-08-14 12:21:19 +02:00
Ash Wilson
dc9fe25255
Wrap temp.cleanupSync() calls in try-catch blocks 2017-08-04 14:18:43 -04:00
Ash Wilson
97ffe46247
Consistently use require('temp').track() 2017-08-04 14:08:29 -04:00
Ash Wilson
e90441303d
🔥 console.logs 2017-08-02 19:34:44 -04:00
Ash Wilson
41cb5ce076
Configure Mocha to use the JUnit XML reporter 2017-08-01 11:27:16 -04:00
Damien Guard
45037c950a
Disable flakey main process test on Windows 2017-06-09 10:48:17 -07:00
Max Brunsfeld
dc320181fc Fix handling of .save and .saveAs rejections
* Make Pane.close, Pane.saveActiveItem, and Pane.saveActiveItemAs async.
* Refactor the logic for prompting to save on window unload
2017-05-31 17:46:04 -07:00
hansonw
e8cd4bf431 Fix the atom:// URL handler for real (with tests this time) 2017-05-16 11:51:54 -07:00
Bryant Ung
f464bb3579 Merge pull request #13947 from anatoli26/master
Make an option to always restore the last session
2017-05-08 09:33:23 -07:00
Max Brunsfeld
14f9c68659 Use getTreeViewRootDirectories helper in main process test 2017-04-17 13:53:20 -07:00
Max Brunsfeld
cca47d785f Handle active pane items that aren't text editors in main process test
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-04-07 14:28:51 -07:00
Max Brunsfeld
6d1cbd389a Wait until tree-view is asynchronously opened in main process test
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-04-07 14:28:25 -07:00
Max Brunsfeld
89f1710cfe Wait for paths to open in main process test
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-04-07 13:20:44 -07:00
Michelle Tilley
42fb2cc55f Convert more tests to use emitterEventPromise 2017-03-24 00:32:15 -07:00
Michelle Tilley
ae64b35dca We need more time 2017-03-23 23:58:27 -07:00
Michelle Tilley
67a9e19bf9 Oh we can put this back now 2017-03-23 23:48:19 -07:00
Michelle Tilley
132f199fae Fix main process test race conditions 2017-03-23 23:37:18 -07:00
Michelle Tilley
3c47b775d2 Let's make that async pls 2017-03-23 21:28:12 -07:00
Michelle Tilley
0f6489e347 Use test-until for more flexible test timeout 2017-03-23 16:51:59 -07:00
Michelle Tilley
648055c5a9 Just to be sure, let's use a longer timeout 2017-03-23 16:29:01 -07:00
Michelle Tilley
ed2c399997 Fix main process tests 2017-03-23 16:19:11 -07:00
Antonio Scandurra
bade347e01 Revert "Upgrade to Babel 6 and apply fewer transformations when transpiling babel files" 2017-03-17 12:40:38 +01:00
Anatoli
9e41a1b490 Make an option to *always* restore the last session, no matter how Atom is invoked (#9643), part2: new option in Settings is merged with the old one, the result is a 3-value combobox [no, yes, always] 2017-03-08 10:38:08 -03:00
Antonio Scandurra
85dde00e82 Merge branch 'master' into as-use-babel6 2017-02-16 12:59:05 +01:00
Max Brunsfeld
0c3b774c94 Avoid sending file path to renderer process in main process test
On windows, because the path contains backslashes, evaling a string containing
the path can interpret the backslashes as escape sequences
2017-02-15 13:53:08 -08:00
Max Brunsfeld
13055c8620 Wait on loadedPromise for workspace to deserialize in main process test 2017-02-15 11:05:21 -08:00
Antonio Scandurra
cf329d0f63 Use octal integer literal 2017-02-15 17:19:55 +01:00