Commit Graph

44 Commits

Author SHA1 Message Date
Damien Guard
438168e62c Do not use the chromedriver wrapper as it spews to stdout 2016-12-13 12:13:47 -08:00
Damien Guard
f25a718c02 Switch electron-chromedriver from GitHub download to npm install 2016-12-12 16:31:38 -08:00
Damien Guard
3fd1dbdce3 Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
Antonio Scandurra
0f6eadcfce Wait for windows' state to be saved before closing the app or any window
Previously, we used to save the window's state in the renderer process
`beforeunload` event handler: because of the synchronous nature of event
handlers and the asynchronous design of IndexedDB, this could
potentially not save anything if windows close fast enough to prevent
IndexedDB from committing the pending transaction containing the state.
(Ref.: https://mzl.la/2bXCXDn)

With this commit, we will intercept the `before-quit` events on
`electron.app` and the `close` event on `BrowserWindow` (which will fire
respectively before quitting the application and before closing a
window), and prevent them from performing the default action. We will
then ask each renderer process to save its state and, finally, close the
window and/or the app.
2016-09-07 13:03:33 +02:00
Antonio Scandurra
6bd9d1e4be Install webdriver io in script/package.json
So that we can control chromedriver without including that dependency in the final bundle.
2016-08-11 13:09:24 +02:00
Antonio Scandurra
ad166db6c4 Don't use temp for integration tests socket creation 2016-05-17 13:56:57 +02:00
Max Brunsfeld
4bc969d1df Merge branch 'master' into wl-electron-35 2016-02-16 13:16:13 -08:00
Katrina Uychaco
7cfe0b659e Revert "Wait for tab to open in webdriverio waitForPaneItemCount command"
This reverts commit 8e33f8bf5b.
2016-02-11 14:50:51 -08:00
Katrina Uychaco
8e33f8bf5b Wait for tab to open in webdriverio waitForPaneItemCount command 2016-02-11 11:50:44 -08:00
Max Brunsfeld
0f02663f6b Add --user-data-dir flag, to control indexedDB directory
This way, we can still use indexedDB in the integration tests

Signed-off-by: Katrina Uychaco <kuychaco@github.com>
2016-02-09 14:30:58 -08:00
Wliu
3f471cd94f Merge remote-tracking branch 'refs/remotes/origin/master' into wl-electron-35 2016-01-25 16:33:50 -05:00
case
8c5c795b35 Remove Duplicate Require Statements and Unify Syntax on ' 2016-01-15 14:35:28 -06:00
Wliu
f4f5e47aab One more remote update 2015-12-14 17:35:50 -05:00
Nathan Sobo
52946db179 Ensure windows/workspace present before proceeding in integration specs
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-15 12:54:33 -06:00
Max Brunsfeld
467c89bfb3 In integration tests, handle executable path with spaces in it 2015-10-05 16:49:35 -07:00
Max Brunsfeld
2dbd556c50 Fix chromedriver location in integration specs 2015-09-09 12:34:28 -07:00
Max Brunsfeld
75289ee3dd Fix some integration test flakiness 2015-05-06 10:32:56 -07:00
Antonio Scandurra
f3a1aebb8a Merge branch 'master' into as-public-ci 2015-04-16 08:31:21 +02:00
Max Brunsfeld
ce7d0c161d Always quit Atom realistically in integration specs 2015-04-14 14:16:39 -07:00
Antonio Scandurra
f9f5213cdf Handle http.on('error') for webdriver polling 2015-04-08 08:57:26 +02:00
Antonio Scandurra
dee626ab69 Investigate timeouts issues (again) 2015-04-08 08:36:46 +02:00
Antonio Scandurra
73fb36590d Use a 15s timeout for webdriver startup 2015-04-07 19:28:10 +02:00
Antonio Scandurra
d494966759 Relax polling to check only every 100ms 2015-04-07 17:53:05 +02:00
Antonio Scandurra
1c7b473243 Wait for chromedriver to initialize
Via a polling mechanism inspired by
https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/DriverService.cs#L173-205
2015-04-07 17:46:46 +02:00
Antonio Scandurra
efa2a34fd6 Use a large value in waits
...to confirm that it is the culprit of Travis build errors.
2015-04-07 15:36:58 +02:00
Antonio Scandurra
127253bea3 Revert "Reduce chromedriver waiting time to 500ms"
This reverts commit 722705bb4c.
2015-04-07 15:01:46 +02:00
Antonio Scandurra
722705bb4c Reduce chromedriver waiting time to 500ms 2015-04-07 14:40:36 +02:00
Antonio Scandurra
32ae7945ff Fine tune waiting time 2015-04-07 13:48:50 +02:00
Antonio Scandurra
a090a81767 Bump chromedriver wait timeout 2015-04-07 11:46:42 +02:00
Kevin Sawicki
eb63556b27 Use - in socket file name 2015-03-17 16:51:52 -07:00
Bjoernsen
d6338b0a2c Update start-atom.coffee 2015-03-16 08:38:01 +01:00
Max Brunsfeld
cd9a1ccb9f 🎨 organize integration spec 2015-02-24 11:40:29 -08:00
Max Brunsfeld
8c3988a790 Fix race when starting atom twice in spec 2015-02-18 13:37:06 -08:00
Max Brunsfeld
30bd85d8cc Add some waiting in integration test
* Give chromedriver a few millis to start up
* Wait for atom-workspace element to appear before querying
  active panes.
2015-02-12 21:18:20 -08:00
Max Brunsfeld
8cc0372432 Avoid unhandled promise rejection warning 2015-02-12 21:18:20 -08:00
Max Brunsfeld
a5b28b2833 Rename test helper method 2015-02-12 21:18:20 -08:00
Max Brunsfeld
476876e479 Restore behavior of reusing focused window for opened files 2015-02-12 21:18:20 -08:00
Max Brunsfeld
81d07e2804 Improve error-handling in integration spec 2015-02-12 21:18:17 -08:00
Max Brunsfeld
ba789800b7 Fix handling of args and env in atom-launcher script
Signed-off-by: Jessica Lord <jlord@github.com>
2015-02-12 21:18:16 -08:00
Kevin Sawicki
a372c892f0 Set chromedriver path in integration spec helper 2015-02-12 15:04:33 -08:00
Max Brunsfeld
26b5c2712a Put socket in new temp dir on every test run 2015-02-08 11:55:45 -08:00
Max Brunsfeld
6bfe3bf3b4 Specify ATOM_HOME when starting Atom in integration test
Otherwise, tests may fail because the Welcome pane may appear,
depending on the content of `~/.atom/config.cson`
2015-02-08 11:55:45 -08:00
Max Brunsfeld
56a4e6b7bf Use webdriverio, not selenium-webdriver 2015-02-06 20:38:26 -08:00
Max Brunsfeld
c19d99e9e2 Add integration test for starting atom w/ different arguments 2015-02-04 12:59:26 -08:00