Commit Graph

36383 Commits

Author SHA1 Message Date
Ash Wilson
b9268c703c URL pathnames use /, not path.sep 2019-04-19 12:53:30 -04:00
Ash Wilson
c4f3b519d3 Replace the AtomApplication test suite 2019-04-19 12:07:21 -04:00
Ash Wilson
3645cef518 More marking stuff covered 2019-04-19 12:06:09 -04:00
Ash Wilson
a3a44006be Tests for URL handling, no-window actions on macOS, and app re-use 2019-04-19 12:06:01 -04:00
Ash Wilson
37e471b315 Omit missing windows from the shorthand assertion summary 2019-04-19 12:05:16 -04:00
Ash Wilson
91dce7faba Track created windows in the createWindow stub 2019-04-19 12:04:51 -04:00
Ash Wilson
af28d3c248 Pass atom:// URL arguments through directly 2019-04-19 12:04:17 -04:00
Ash Wilson
1ba571becd Create and restore ATOM_HOME for the socket stuff 2019-04-19 12:03:58 -04:00
Ash Wilson
ad2b431c5c Stub trivial isSpecWindow method 2019-04-19 12:03:22 -04:00
Ash Wilson
18ec08735e Don't require locationsToOpen in load settings 2019-04-19 12:03:04 -04:00
Ash Wilson
a303e31c1b Consistently return an AtomWindow from openPackageUriHandler 2019-04-19 12:02:36 -04:00
Ash Wilson
a1e3598648 Default devMode, safeMode, and window to predictable false values 2019-04-19 12:02:11 -04:00
Ash Wilson
9d8ae2aa82 Return a Promise that resolves once the server has started listening 2019-04-19 12:01:51 -04:00
Ash Wilson
8b1827bea7 Return an all-Promise for windows opened by urlsToOpen 2019-04-19 12:01:22 -04:00
Ash Wilson
ca2f8db022 Inject an application creation function to AtomApplication::open
This lets me call open() and create properly stubbed-out AtomApplication 
instances.
2019-04-19 12:01:03 -04:00
Ash Wilson
e0b495c36a Marking off the test cases I've covered in the new suite 2019-04-18 22:58:17 -04:00
Ash Wilson
6f888484f0 Left in a console 👀 2019-04-18 22:58:00 -04:00
Ash Wilson
3f942f83de Port over a bunch of AtomApplication tests 2019-04-18 22:57:27 -04:00
Ash Wilson
ab1bc2e173 Save window options when opening a window 2019-04-18 22:56:57 -04:00
Ash Wilson
40c2f5b073 'did-change-paths' is never broadcast
This event is handled by AtomWindow::setProjectRoots() now.
2019-04-18 22:56:46 -04:00
Ash Wilson
b903dc2506 Save .projectRoots, not .initialProjectRoots which is undefined 2019-04-18 22:56:12 -04:00
Ash Wilson
525d8b710c Touch up core.openEmptyEditorOnStart tests 2019-04-18 21:23:10 -04:00
Ash Wilson
b0f4477986 Test behavior for collapsing new paths into restored ones 2019-04-18 21:13:56 -04:00
Ash Wilson
b1d6e42aa9 Add preserveFocus flag to keep main process tests from stealing focus 2019-04-18 21:10:41 -04:00
Ash Wilson
e782cea2bf Test for window restoration on launch, not open 2019-04-18 17:13:03 -04:00
Ash Wilson
c6652e1b29 Don't restore state when --new-window is passed and other paths 2019-04-18 17:09:55 -04:00
Ash Wilson
c0a39e04e2 Tests for restoration of previous window state 2019-04-18 17:06:42 -04:00
Ash Wilson
2914b1c58e Don't append launch options to the deserialized ones?? 2019-04-18 17:06:20 -04:00
Ash Wilson
80f8d92565 Don't require urlsToOpen 2019-04-18 17:05:56 -04:00
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
9eb259ce20 Guarantee the window opening order 2019-04-18 17:03:43 -04:00
Ash Wilson
097906c23f AtomWindow tests 2019-04-18 16:20:26 -04:00
Ash Wilson
6d4ba52454 Update AtomEnvironment specs with new location keys 2019-04-18 16:20:08 -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
2abbabdafe Respect "headless" on non-spec windows 2019-04-18 16:18:49 -04:00
Ash Wilson
0b0d3485ae Injectable BrowserWindow constructor in AtomWindow 2019-04-18 16:18:32 -04:00
Ash Wilson
45770f1fe6 Use isDirectory instead of mustBeDirectory 2019-04-18 16:18:09 -04:00
Ash Wilson
631743f5f4 Rename setRepresentedDirectoryPaths() to setProjectRoots()
Let's keep the naming consistent the whole way up the call chain.
2019-04-18 16:17:53 -04:00
Ash Wilson
495f493c44 Rename hasProjectPath to hasProjectPaths
Likely a relic of the days when there was only one project.
2019-04-18 16:17:07 -04:00
Ash Wilson
a0be3e735f Use containsLocations() for AtomApplication window location 2019-04-18 16:16:17 -04:00
Ash Wilson
2a2ef17d85 Use containsLocation() for URL handler processing 2019-04-18 16:15:45 -04:00
Ash Wilson
952c42c0de Rename initialPaths and representedDirectoryPaths
They're now called initialProjectRoots and projectRoots, which is closer 
to what they actually are.
2019-04-18 16:15:07 -04:00
Ash Wilson
b095482071 Replace containsPath(s) with containsLocation(s)
This lets us use existing stat data.
2019-04-18 16:12:51 -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
41eacf7af7 Move AtomWindow creation into a dedicated, stubbable method 2019-04-18 10:51:02 -04:00