Commit Graph

7395 Commits

Author SHA1 Message Date
Nathan Sobo
c861abc2a9 Fix timing issues in atom-application-test
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-12 11:46:12 -06:00
Antonio Scandurra
9847c4fc24 Wait until the window is focused before interacting with it in tests
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:46:13 +02:00
Antonio Scandurra
87d684132c Extract timeoutPromise into async-spec-helpers
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:46:12 +02:00
Antonio Scandurra
82f0003302 Extract conditionPromise into async-spec-helpers
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:46:11 +02:00
Antonio Scandurra
ab3d0ba412 Rewrite async-spec-helpers in javascript
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:46:09 +02:00
Antonio Scandurra
4bd644bea2 Bump timeout to 1 minute on AtomApplication tests
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:45:59 +02:00
Antonio Scandurra
336f6425da Discourage people from using temp directly
It's better if we fs.realpathSync the path returned by the temp module.

Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:45:56 +02:00
Antonio Scandurra
04d8b9bb86 Ensure we don't reuse the same window when testing the offset distance
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 17:45:50 +02:00
Antonio Scandurra
753db274fc Clear storage data after each AtomApplication test
This, along with using a temporary directory as the ATOM_HOME, will make
sure that tests won't share any state with one another, possibly
increasing the level of resiliency of the suite.
2016-08-12 15:20:58 +02:00
Antonio Scandurra
a817a354dc Use project paths instead of tree view directories to test remote paths 2016-08-12 14:35:40 +02:00
Antonio Scandurra
fe8aabd908 Use spec reporter to know which specs hang 2016-08-12 12:22:36 +02:00
Antonio Scandurra
428106bcaa Add smoke test to ensure Atom runs and basic operations can be performed 2016-08-12 11:46:48 +02:00
Antonio Scandurra
7fe0f6b455 Move another integration test 2016-08-12 11:29:34 +02:00
Antonio Scandurra
da7b951c07 Move another integration test 2016-08-12 11:22:32 +02:00
Antonio Scandurra
02bc4282d0 Move another integration test 2016-08-12 10:58:59 +02:00
Antonio Scandurra
fff2ecd162 Extract a AtomApplication.prototype.launch method
...so that we can exercise loading previously opened windows stored
state after the application is restarted. In addition, this resembles
more what we run in production, and therefore allows us to have a better
coverage of the code paths we run in the real application.
2016-08-12 10:44:09 +02:00
Antonio Scandurra
e8c7b27af4 Move another integration test 2016-08-12 10:10:20 +02:00
Max Brunsfeld
0a1834079f Rename getSoftWrapIndentLength -> getSoftWrapHangingIndentLength 2016-08-11 16:38:34 -07:00
Joe Fitzgerald
f529ebb237 🎨 Update Describe / It Descriptions 2016-08-11 17:08:28 -06:00
Joe Fitzgerald
485cb71be7 🎨 envShouldBePatched > shouldGetEnvFromShell 2016-08-11 17:07:21 -06:00
Joe Fitzgerald
9ec63a8ffc 🎨 Cleanup
* shellShouldBePatched > envShouldBePatched
2016-08-11 16:45:19 -06:00
Nathan Sobo
3d99cde9e1 Move another integration spec to the main process tests 2016-08-11 16:43:26 -06:00
Max Brunsfeld
684952458f Remove new TextEditor setters; just use update 2016-08-11 15:34:54 -07:00
Nathan Sobo
a29db76073 Move another integration test 2016-08-11 16:33:36 -06:00
Nathan Sobo
b89c0cb415 Move another integration test 2016-08-11 16:33:25 -06:00
Nathan Sobo
29cf1025f1 Assert about tree view root directories rather than project directories
Since these are integration tests, making sure the user sees these
directories in their tree view seems like a good idea.
2016-08-11 16:20:29 -06:00
Nathan Sobo
f953588f91 Move opening multiple directories integration spec to main process tests
It was testing something that didn’t actually work, that opening a
directory that was already open in an existing window would recycle the
window. We explicitly don’t behave that way and the old test was passing
spuriously.
2016-08-11 16:12:41 -06:00
Nathan Sobo
dbfd0cc605 Move integration test of window persistence to main process tests 2016-08-11 15:28:11 -06:00
Nathan Sobo
3a3921709f Restore env guard in integration test 2016-08-11 15:27:44 -06:00
Nathan Sobo
5f414f4ea7 Move integration specs for reusing windows to main process tests 2016-08-11 15:10:38 -06:00
Nathan Sobo
15bb92f35e Move whitespace trimming integration spec to main process tests 2016-08-11 14:43:23 -06:00
Nathan Sobo
f80c800347 Move test for opening w/ a line:column from Chromedriver to main process 2016-08-11 14:36:47 -06:00
Nathan Sobo
4d4a2530ff Move test for opening w/ a line number from Chromedriver to main process 2016-08-11 14:33:54 -06:00
Nathan Sobo
52ea92803d Use parseCommandLine in atom-application-test.js 2016-08-11 12:45:54 -06:00
Joe Fitzgerald
b7a48967fa Fix Regression In #12317 For zsh
In Atom 1.7 and 1.8, the environment would be patched for users of the zsh shell on OS X. A whitelist of shells was established in #12317, which is extended here.
2016-08-11 12:45:02 -06:00
Max Brunsfeld
11463ef00b Merge remote-tracking branch 'origin/as-introduce-editor-update' into ns-mb-detangle-editor 2016-08-11 11:36:48 -07:00
Nathan Sobo
502339b830 Replace chromedriver test of window offset with main process mocha test
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 10:33:12 -06:00
Nathan Sobo
5a8ab1a2b2 🎨
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 08:16:18 -06: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
6f9a8208db Download chromedriver and run integration tests 2016-08-11 12:40:40 +02:00
Max Brunsfeld
6d4e0f9b0a 🚱 Stop maintaining destroyed editors' grammar and config 2016-08-10 13:54:37 -07:00
Max Brunsfeld
38849474d0 Merge branch 'master' into ns-mb-detangle-editor 2016-08-10 13:23:32 -07:00
Antonio Scandurra
23f421154e Delete TokenizedBuffer.prototype.onDidChange
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-10 17:52:49 +02:00
Max Brunsfeld
5d24bcf19e Merge pull request #12237 from zertosh/cleanup-activation-hook-subscrtiptions
Cleanup activationHookSubscriptions when deactivating package
2016-08-09 17:08:49 -07:00
Max Brunsfeld
29096bde31 Don't update ATOM_HOME env var after launch
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-09 14:38:19 -07:00
Max Brunsfeld
d21c6f1482 Rename environment-helpers-spec -> update-process-env-spec 2016-08-09 14:26:51 -07:00
Nathan Sobo
e6514bf3d8 Merge pull request #12377 from atom/ns-stringify-temp-window-state
Stringify/parse temporary window state to avoid nulling out references
2016-08-09 15:20:30 -06:00
Nathan Sobo
dfc0910023 Stringify/parse temporary window state to avoid nulling out references
If the object passed via IPC contains any keys of the same reference,
all but one of these keys will be nulled out. Converting to/from a
string avoids this problem.
2016-08-09 14:43:38 -06:00
Max Brunsfeld
16a22b9f28 Merge branch 'master' into ns-mb-detangle-editor 2016-08-09 13:36:46 -07:00
Max Brunsfeld
52af31c511 Trigger grammar-used hooks no matter how text editors are created 2016-08-09 12:04:01 -07:00
Max Brunsfeld
6346d05505 Remove last use of atom.config in text editor spec 2016-08-09 10:20:49 -07:00
Max Brunsfeld
637e525807 Use fake document & window in atom environment serialization spec 2016-08-08 16:32:58 -07:00
Max Brunsfeld
5d83874725 Merge branch 'master' into ns-mb-detangle-editor 2016-08-08 15:39:24 -07:00
Max Brunsfeld
e8c834e483 Serialize & deserialize the TextEditorRegistry in AtomEnvironment 2016-08-08 15:38:17 -07:00
Max Brunsfeld
53574288ae Fix editor leaks in TextEditorRegistry 2016-08-08 15:02:01 -07:00
Max Brunsfeld
eb9d89f8c8 Observe grammar changes on editors in maintainConfig 2016-08-08 12:10:56 -07:00
Max Brunsfeld
ee2e18737e Fix maintenance of grammars for copied editors 2016-08-08 11:17:30 -07:00
Nathan Sobo
21de77b739 Merge pull request #12346 from atom/ns-fix-repository-status-updates
Avoid passing paths outside of repository to git status subprocesses
2016-08-06 08:30:46 -06:00
Nathan Sobo
cd8e4eb43e Avoid passing paths outside of repository to status subprocess 2016-08-06 07:00:24 -06:00
Nathan Sobo
6c6cb66e5b Rename git-spec to git-repository-spec to match class name 2016-08-06 06:34:38 -06:00
Max Brunsfeld
ddfb124cb8 Merge branch 'master' into ns-mb-detangle-editor 2016-08-05 09:39:43 -07:00
Yuya Tanaka
1ce2f6ce87 🐛 Fix window size is not updated on resize 2016-08-05 11:56:01 +09:00
Max Brunsfeld
6bbe60ab71 Add test for handling of null env load setting 2016-08-04 16:01:58 -07:00
Max Brunsfeld
0beb4bec42 Merge branch 'master' into ns-fix-decorated-layer-destruction 2016-08-04 13:30:59 -07:00
Max Brunsfeld
74f8890592 ⬆️ text-buffer for marker layer destruction fixes 2016-08-04 12:37:51 -07:00
Max Brunsfeld
4634091e9b Don't update the NODE_PATH when updating the environment on launch
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-03 15:50:21 -07:00
Max Brunsfeld
0a924a9e2f Hook TextEditorRegistry to editors created by splitting panes 2016-08-03 10:58:11 -07:00
Max Brunsfeld
368b677420 Merge pull request #12276 from pbiggar/master
Add ability to see passed specs via tooltips
2016-08-03 09:35:31 -07:00
Paul Biggar
0f8eb5c1ba Add ability to see passed specs via tooltips
It's not currently possible to see what specs pass. This adds the
description of the spec, as well as all it's parent suites, to a
tooltip so you can see what's passing and failing on mouseover.
2016-08-02 17:40:26 -07:00
Max Brunsfeld
a56db9a03e Merge pull request #12297 from atom/mb-pass-missing-softwrap-hanging-indent-param
Supply missing softWrapHangingIndent parameter to display layer
2016-08-02 17:02:59 -07:00
Max Brunsfeld
43f34f73da Supply missing softWrapHangingIndent parameter to display layer 2016-08-02 16:20:23 -07:00
Nathan Sobo
46b59906e0 Add on method to fake browser window in tests 2016-08-02 17:12:04 -06:00
Nathan Sobo
c029151322 Test that updateWindowSheetOffset can be called
Testing the wiring to themes isn't worth it, but this at least makes sure we don't break if Electron APIs change.
2016-08-02 16:16:27 -06:00
Nathan Sobo
1e81f0ca1c Test onDidChangeActivePaneItem observation in title-bar-spec 2016-08-02 16:08:25 -06:00
Nathan Sobo
0c83d9741f Don’t implement title bar via custom elements 2016-08-02 15:56:45 -06:00
Nathan Sobo
0240206d93 Merge branch 'master' into brumm-master 2016-08-02 15:39:57 -06:00
Max Brunsfeld
f3d486eb9c Merge branch 'master' into ns-mb-detangle-editor 2016-08-02 14:12:18 -07:00
Max Brunsfeld
c7b7eace22 Merge pull request #12292 from atom/mb-fix-incompatible-module-error
Fix exception when package requires an incompatible native module
2016-08-02 13:58:28 -07:00
Max Brunsfeld
9a72c7e65e Fix exception when package requires an incompatible native module 2016-08-02 12:14:00 -07:00
Max Brunsfeld
3e0334d88f In TextEditorElement spec, style scrollbar within shadow root 2016-08-02 11:26:09 -07:00
Nathan Sobo
2b5f1bda46 Always seek to specified position in TokenizedBufferIterator
Fixes #10350

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-02 12:19:45 -06:00
Max Brunsfeld
97d791f728 Deprecate grammar override API on GrammarRegistry 2016-07-29 13:42:09 -07:00
Max Brunsfeld
e2e245aca1 Make TextEditorRegistry.setGrammarOverride take a scope name
Also, clear the stored grammar score for that editor when setting an override.
2016-07-29 13:40:29 -07:00
Antonio Scandurra
6d4102a098 Delete random-editor-spec.coffee
We are already extensively testing the same specs on text-buffer.
2016-07-29 17:15:06 +02:00
Antonio Scandurra
fd94acc2e8 Delete RowMap and its specs
After transitioning to `DisplayLayer` we don't need this object anymore.
2016-07-29 17:12:44 +02:00
Nathan Sobo
43caead392 Avoid test failure due to timing
Signed-off-by: Antonio Scandurra <as-cii@github.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-07-28 17:34:57 -06:00
Max Brunsfeld
16c80f6eaf WIP - add local null grammar 2016-07-28 14:47:26 -07:00
Max Brunsfeld
f1a302a139 Merge branch 'master' into ns-mb-detangle-editor 2016-07-28 10:33:23 -07:00
Max Brunsfeld
738a2b90dc 🔥 useShadowDOM setting 2016-07-28 10:02:16 -07:00
Max Brunsfeld
e1f8a72995 Move ctrl-mousewheel handling out of TextEditorComponent
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-27 16:02:24 -07:00
Max Brunsfeld
ab30ecf994 Manage scroll sensitivity setting in TextEditorRegistry
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-27 15:39:03 -07:00
Max Brunsfeld
63a730253b Don't use config for scrollSensitivity in TextEditorComponent
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-27 15:35:56 -07:00
Max Brunsfeld
1c38dce3b2 Don't use font config settings in TextEditorComponent
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-27 15:23:59 -07:00
Max Brunsfeld
3f8b6138dc Don't use config in TextEditorPresenter
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-27 14:56:36 -07:00
Max Brunsfeld
3d796df401 Stop using GrammarRegistry in TextEditor 2016-07-27 14:09:17 -07:00
Max Brunsfeld
e6c83521c9 Move grammar serialization logic to TextEditorRegistry 2016-07-27 13:10:23 -07:00
Max Brunsfeld
e35c761246 Use setShowInvisibles in TextEditorPresenter spec 2016-07-27 11:23:39 -07:00
Max Brunsfeld
8bf60f9266 Don't call PackageManager::activate in workspace spec 2016-07-27 10:59:50 -07:00
Max Brunsfeld
1ab26c7e85 Pass TextEditorRegistry to Workspace constructor in spec 2016-07-27 10:39:59 -07:00
Max Brunsfeld
dfb48aa8da Get TextEditorComponent specs passing
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 16:04:09 -07:00
Max Brunsfeld
caab1dda63 Move grammar-used spec to workspace-spec
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 15:38:53 -07:00
Max Brunsfeld
d203610986 Set grammar manually in tokenized buffer specs
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 15:08:59 -07:00
Max Brunsfeld
a44d5833a8 Move grammar override logic into TextEditorRegistry
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 15:00:20 -07:00
Max Brunsfeld
455d3213ed Return token objects from tokensForScreenRow
Include the text of each token alongside its array of scopes.

Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 12:39:41 -07:00
Max Brunsfeld
20b54505f3 Move logic for assigning grammars to editors into TextEditorRegistry 2016-07-26 10:50:57 -07:00
Andres Suarez
d7378f0d6a Cleanup activationHookSubscriptions when deactivating package
Released under CC0.
2016-07-25 22:45:43 -07:00
Damien Guard
177c48dd11 Merge pull request #12123 from atom/windows-system-settings
Windows shell integration system settings
2016-07-19 17:23:02 -07:00
Damien Guard
23dfa392c9
Fix up Squirrel specs 2016-07-18 22:56:02 -07:00
Max Brunsfeld
4eb2f6631a 👕 Fix lint errors 2016-07-15 13:32:23 -07:00
Max Brunsfeld
4ad801b216 Merge branch 'master' into ns-mb-detangle-editor 2016-07-15 09:39:32 -07:00
Max Brunsfeld
58e7892492 Remove GitRepositoryAsync
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-13 14:03:29 -07:00
Max Brunsfeld
7b11c31e07 Remove synchronous GitRepository's dependency on GitRepositoryAsync
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-13 14:02:05 -07:00
Damien Guard
5a8ced324e
Fixup Squirrel installer spec tests 2016-07-12 18:11:59 -07:00
Max Brunsfeld
c0cbb59666 Don't use config in TokenizedBuffer 2016-07-12 14:31:05 -07:00
Max Brunsfeld
5adb087ab1 Move config handling out of LanguageMode 2016-07-12 14:19:35 -07:00
Max Brunsfeld
b1f5583c4e Remove stray usages of atom.config in text-editor-spec 2016-07-12 11:31:03 -07:00
Max Brunsfeld
58ec44f8ec Move handling of nonWordCharacters setting into TextEditorRegistry 2016-07-12 11:30:41 -07:00
Max Brunsfeld
5167dbca6f Move handling of undoGroupingInterval to TextEditorRegistry 2016-07-11 17:47:40 -07:00
Max Brunsfeld
9ab474a673 Move handling of scrollPastEnd setting to TextEditorRegistry 2016-07-11 17:41:06 -07:00
Max Brunsfeld
7a50aa9f9f Move handling of auto indent settings to TextEditorRegistry 2016-07-11 17:37:51 -07:00
Max Brunsfeld
6f764f86cf Move handling of backUpBeforeSaving to TextEditorRegistry 2016-07-11 17:16:41 -07:00
Max Brunsfeld
cdc9bdea61 Use setter methods instead of config settings in TextEditor test 2016-07-11 17:03:44 -07:00
Max Brunsfeld
66c56d2a72 TextEditorRegistry: test skipping comments when guessing soft tabs 2016-07-11 17:02:03 -07:00
Max Brunsfeld
25035d8fce Remove some config usages from text editor spec 2016-07-11 13:52:05 -07:00
Max Brunsfeld
f327a4f95d Test that maintainConfig uses scoped settings 2016-07-11 13:50:38 -07:00
Max Brunsfeld
5acab853cd Remove all config observation from text editor 2016-07-11 12:43:18 -07:00
Max Brunsfeld
d91895961e Move more config observation out of text editor 2016-07-08 17:54:24 -07:00
Max Brunsfeld
eec1b70967 Start moving config observation out of editor into editor registry
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-08 17:41:59 -07:00
Antonio Scandurra
de3b48b2d3 Use editor.update in tests 2016-07-08 10:07:37 +02:00
Antonio Scandurra
811ab26f61 Return an update promise in TextEditor.prototype.update() 2016-07-08 09:42:08 +02:00
Nathan Sobo
bb1516ee77 🎨
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-07-06 12:58:07 -06:00
Nathan Sobo
a5613cd7e4 Convert text-editor-registry and tests to JS
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-07-06 12:54:30 -06:00
Philipp Brumm
a9d554f1c4 remove leftover console.log 2016-07-06 14:22:17 +02:00
Philipp Brumm
4a61bef6fe add a test 2016-07-02 12:28:14 +02:00
Antonio Scandurra
7efb407d8a Write spec for TextEditorElement when autoHeight changes 2016-06-30 15:48:00 +02:00
Antonio Scandurra
b46ae1e681 Allow autoHeight to be updated in TextEditor.prototype.update 2016-06-30 15:30:05 +02:00
Antonio Scandurra
8cb0fbcc5c Allow autoHeight to be set from the editor 2016-06-30 15:27:47 +02:00
Antonio Scandurra
7325381fd6 🎨 2016-06-30 15:08:51 +02:00
Antonio Scandurra
ccf73189ee Allow scrollPastEnd to be updated in TextEditor.prototype.update 2016-06-30 15:07:20 +02:00
Antonio Scandurra
c769b169aa Allow scrollPastEnd to be set from the editor 2016-06-30 15:05:21 +02:00
Antonio Scandurra
7beafa2da6 Introduce TextEditor.prototype.update
This allows TextEditor objects to be used within an etch component
easily.
2016-06-30 12:42:15 +02:00
Antonio Scandurra
a5fdf3e18a Merge pull request #12008 from atom/as-ns-recreate-destroyed-repo
Recreate Repository if the same project is added after being removed
2016-06-21 11:40:49 +02:00
Antonio Scandurra
95932081b2 Recreate repository if the same project is added after being removed
🍐ed with @nathansobo.
2016-06-20 17:06:50 +02:00
Leo Lamprecht
0ceacf5c13 OSX -> macOS 2016-06-20 11:29:10 +02:00
Leonard Lamprecht
3a1ad3fd40 Replace OS X and Mac OS with macOS 2016-06-18 15:33:08 +02:00
simurai
4c6899a1e1 Merge branch 'master' of https://github.com/atom/atom into sm-spec-suite 2016-06-18 15:29:59 +09:00
Antonio Scandurra
5391907c49 Merge pull request #11998 from atom/as-fix-janky-specs
Don't test CSON.readFileSync behavior twice (here and in atom/season)
2016-06-18 00:17:19 +02:00
Antonio Scandurra
bdce8d15ab Rely on CSON.readFileSync to test caching behavior 2016-06-17 11:04:08 +02:00
Nathan Sobo
8a3d5f8534 Use preferred line length as a *maximum* for soft wrapping
...if the softWrapAtPreferredLineLength config setting is enabled.
2016-06-16 08:42:30 -06:00
simurai
b1f0cbb134 Make Spec Suite less flickery 2016-06-11 10:46:10 +09:00
Damien Guard
43afb668c7
🎨 Remove fat-arrow Coffeescript linter warning 2016-06-07 17:20:09 -07:00
Wliu
c6d431bdf1 Merge branch 'master' into wl-update-language-javascript 2016-06-03 21:53:46 +00:00
Antonio Scandurra
2fb757791b Allow atom-pane to be shrunk independently of its contents' width 2016-05-30 14:49:29 +02:00
Antonio Scandurra
6c34844956 🐛 Don't try to recover the same file twice 2016-05-26 11:27:56 +02:00
Antonio Scandurra
49a603a873 Show also a message box when recovery is not successful 2016-05-25 15:54:39 +02:00
Antonio Scandurra
c2b01d54b8 Make coupling looser between the recovery service and the windows 2016-05-25 15:46:37 +02:00
Antonio Scandurra
1a7858c9f1 Log a more informative message when cannot recover a file 2016-05-25 15:15:53 +02:00
Antonio Scandurra
3ce7d0a974 Merge branch 'master' into as-file-recovery-service 2016-05-25 14:04:16 +02:00
Antonio Scandurra
c8fae110e7 Handle recovery when many windows save the same file simultaneously 2016-05-25 14:01:36 +02:00
Antonio Scandurra
3b4c1015cc Forget window when it gets closed 2016-05-25 11:54:09 +02:00
Antonio Scandurra
5e3f343e41 Merge branch 'master' into as-main-process-test-runner 2016-05-25 11:03:10 +02:00
Antonio Scandurra
df0b3dedd7 browser -> main-process 2016-05-25 11:02:29 +02:00
Antonio Scandurra
e57b35f8de Merge branch 'master' into as-file-recovery-service 2016-05-24 19:16:31 +02:00
Antonio Scandurra
209e9d8d9c Add coverage for position: 'after' in cursor's state specs 2016-05-24 10:54:01 +02:00
Antonio Scandurra
c0bed9ab50 🐛 Enforce block decorations to be 'before' by default 2016-05-24 10:49:59 +02:00
Antonio Scandurra
75d4919489 Restore concurrency on renderer specs 2016-05-24 10:01:12 +02:00
Antonio Scandurra
7a12984af3 🔥 Unused requires on specs 2016-05-24 09:28:58 +02:00
Antonio Scandurra
4f1efe6ef6 👕 Fix linter errors 2016-05-24 09:28:00 +02:00
Antonio Scandurra
c7f4b33eb8 Emit informative warning when a file can't be recovered 2016-05-24 09:04:06 +02:00
Antonio Scandurra
858740cd5f 📝 Better description on spec 2016-05-24 08:32:29 +02:00
Antonio Scandurra
25fece4a1a 🎨 file-recovery-service-spec.js -> file-recovery-service.spec.js 2016-05-24 08:24:41 +02:00
Antonio Scandurra
62d48c64ea Add --main-process flag to run specs in the main process
…so that we can write unit tests for code in the main process. Below a
list of conventions we'll be adopting:

1. Use mocha as the test framework.
2. Use chai as the assertion library.
3. Name specs `foo-bar.spec.js`, to prevent the renderer process from
running specs written fro the main process e.g. when calling
`atom --test spec`.
4. Write specs in ES6.

Although somewhat inconsistent with the conventions we use for renderer
process specs, this will hopefully be a first step towards migrating our
entire Jasmine 1.3 test suite to a more modern environment.
2016-05-24 08:23:27 +02:00
Antonio Scandurra
97dd25d14f 💚 2016-05-24 08:10:48 +02:00
Antonio Scandurra
57195d7ba6 Write specs for FileRecoveryService 2016-05-23 21:10:04 +02:00
Antonio Scandurra
ef3ab03d28 Emit {will,did}SavePath on ipcMain before/after a buffer is saved 2016-05-23 18:37:26 +02:00
Antonio Scandurra
ad166db6c4 Don't use temp for integration tests socket creation 2016-05-17 13:56:57 +02:00
Antonio Scandurra
896abe358c Merge pull request #11765 from atom/as-fix-presenter-uncaught-exception
Don't render line-numbers corresponding to lines that need measuring
2016-05-16 14:21:43 +02:00
Antonio Scandurra
c13346a455 Show folded marker in the first screen row of a soft-wrapped buffer row 2016-05-16 11:23:54 +02:00
Antonio Scandurra
b5b324875e Don't render line-numbers corresponding to lines that need measuring
Rendering those line numbers in the gutter isn't useful, and it puts
unneeded pressure to the DOM. In the process of changing
`updateLineNumbersState`, we have also refactored it to stop relying on
row ranges being contiguous. This allows that code path to be:

1. Less error-prone, because we were trying to access rows that weren't
actually rendered, thus potentially throwing errors when measuring
non-contiguous screen rows that weren't visible.
2. Tighter, because we can just iterate over each screen row and ask for
its soft-wrap descriptor.
2016-05-16 10:58:37 +02:00
Antonio Scandurra
d06da3f470 Reset display layer when editor.atomicSoftTabs changes 2016-05-05 09:10:36 +02:00
Wliu
9b70066bed
Fix TokenizedBuffer specs? 2016-05-04 17:28:15 -04:00
Damien Guard
4da23fdc91 Merge pull request #11639 from BrainCrumbz/squirrel-refactor-pieces
🏁 refactor registry and PoSH out of squirrel-update
2016-05-04 14:17:15 -07:00
Antonio Scandurra
ca041384fe Merge pull request #11414 from atom/ns-switch-to-display-layers
Use display layers facility of text-buffer; delete all the code they replace
2016-05-04 20:46:15 +02:00
Damien Guard
ee3425d543 Merge pull request #11323 from clickthisnick/master
Update Grammar In Spec Files
2016-05-04 11:22:37 -07:00
Damien Guard
d3825e87f3 Merge pull request #11642 from atom/dg-buffered-process-options-shell
Fix some Buffered-Process specs, honor options.shell in Atom
2016-05-04 10:19:04 -07:00
Antonio Scandurra
3b46d7f50b Merge branch 'master' into ns-switch-to-display-layers
# Conflicts:
#	src/text-editor.coffee
2016-05-04 18:56:45 +02:00
Damien Guard
48703864c8 Switch to process.platform, stop clobbering process var and move windows block 2016-05-03 15:22:13 -07:00
Josh Abernathy
3781bd2062 Merge pull request #11671 from atom/disentangle-text-editors-global
Remove TextEditor's dependency on the textEditors global
2016-05-03 10:33:41 -04:00
Antonio Scandurra
36bcb542a8 Don't move down a line if it's the last buffer row 2016-05-03 12:58:59 +02:00
Lee Dohm
72721af3c6 Merge pull request #11478 from atom/ku-prompt-save-as-if-save-fails
Prompt user to save as if save fails
2016-05-02 17:36:56 -07:00
Damien Guard
7542a401ff BufferedProcess whole-string spec now cross-platform 2016-05-02 15:37:36 -07:00
joshaber
d325e02def Test it. 2016-05-02 11:32:38 -04:00
Willem Van Lint
73748ef768 Order listeners by reverse registration order 2016-05-01 16:48:09 -07:00
Antonio Scandurra
f4a31261d0 Delete indent guides code from the presenter and the component
…because we're handling that behavior in `TextEditor` and `DisplayLayer`
now.
2016-05-01 11:48:39 +02:00
Antonio Scandurra
1c694df03b Don't show indent guides for mini editors 2016-05-01 11:42:28 +02:00
Antonio Scandurra
4f5efe98ff Overshoot to the nearest character when text nodes are not contiguous 2016-05-01 11:05:14 +02:00
Antonio Scandurra
334b4c1104 Overshoot to the end of the text node when the position cannot be found
...because the only possible scenario when a logical position in a text
node cannot be found is when the requested pixel position is exactly at
the end of the node.
2016-04-30 11:51:54 +02:00
Antonio Scandurra
02d9245c05 Merge branch 'master' into ns-switch-to-display-layers 2016-04-30 11:10:17 +02:00
Antonio Scandurra
005022567b Merge pull request #11348 from atom/wl-drewmnoel-electron
Update Electron to 0.36.12
2016-04-30 09:19:17 +02:00
Antonio Scandurra
7b2f049cbb 🎨 Refine binary search algorithm 2016-04-29 16:51:51 +02:00
Antonio Scandurra
c5a76d4a7d Persist the entire state on reload
This fixes an annoying problem that prevented the state of marker layers
from being saved when the window was reloaded either via `Cmd+R` in
DevTools or via `Ctrl+Option+Cmd+L` in Atom.

The issue was that we were *always* scheduling `saveState` on an idle
callback: `window.onbeforeunload`, however, doesn't wait for that event
before closing the window, and thus that state was never saved in those
situations.

The solution is to use idle callbacks only during the critical code path
(i.e. on mousedown and keydown), but save it synchronously otherwise.
Saving something to IndexedDB is actually asynchronous too, but it seems
like Chrome fulfills `put` requests that get executed right during
`onbeforeunload`.
2016-04-29 14:41:34 +02:00
Damien Guard
d3ee21941a Fix some specs on Windows and honor options.shell 2016-04-28 12:23:44 -07:00
Antonio Scandurra
f2a497d591 Don't create folds for empty ranges 2016-04-28 13:43:00 +02:00
Antonio Scandurra
57442781ec Fix bug when positioning cursors after the fold-marker 2016-04-28 13:31:28 +02:00
Giuseppe Piscopo
bebaf1bdb0 extract Windows PowerShell operations from squirrel-update 2016-04-28 09:24:37 +02:00
Giuseppe Piscopo
63c45cc8fd extract Windows registry operations from squirrel-update 2016-04-28 03:20:55 +02:00
Giuseppe Piscopo
77dcf37ee3 extract process spawning from squirrel-update 2016-04-28 03:20:55 +02:00
joshaber
4727d6611e Revert "Fix the test."
This reverts commit 630b8c69a6.
2016-04-27 17:06:37 -04:00
joshaber
630b8c69a6 Fix the test. 2016-04-27 16:24:29 -04:00
joshaber
20e2486bfb Merge branch 'master' into fix-cached-status 2016-04-27 15:53:23 -04:00
joshaber
a279db5568 Failing test. 2016-04-27 12:50:13 -04:00
Antonio Scandurra
ce4b2fa810
Merge branch 'master' into ns-switch-to-display-layers
# Conflicts:
#	src/display-buffer.coffee
#	src/text-editor.coffee
#	src/tokenized-buffer.coffee
2016-04-27 18:16:03 +02:00
Antonio Scandurra
5cfe97160d
Report boundary when next line's openScopes don't match containingTags
Sometimes, when performing an edit, a change on some row can cause
another row's tokenization to be affected: the classic example is
opening a multi-line comment on a line, thereby causing subsequent lines
to become commented out without changing the buffer's contents at those
locations. We call this technique "spill detection".

Since the amount of affected lines can grow quite large, Atom tokenizes
synchronously only those lines where the edit occurred, triggering
background (i.e. `setInterval`) tokenization for all the other lines
that need to be refreshed because of a "spill".

As predictable, this approach causes a temporary inconsistency in the
stored tokenized lines. In particular, suppose we had two tokenized
lines, and that there's an open tag in the middle of the first one which
closes on the second one. If we perform an edit that causes that tag to
be deleted, when reading the second tokenized line we now have a
dangling close tag.

This didn't matter much in the `DisplayBuffer` version, because for each
line we reopened all the tags found in the stored `openScopes` property,
and closed all the tags starting on such line right at the end of it.

In the `DisplayLayer` world, however, we don't read tags from each
tokenized line, but we let `TokenizedBufferIterator` report tag
boundaries and their respective location: since this is an
iterator-based approach, we were not reading `openScopes` for each
`TokenizedLine`, making the dangling close tag example showed above
evident (e.g. close and open tags didn't match anymore, and exceptions
were being thrown all over the place).

To solve this issue I have considered several approaches:

  1. Recompute all the lines where a spill occurs synchronously when the
  buffer changes. For large files, this can be pretty onerous, and we
  don't want to regress in terms of performance.

  2. Let `TokenizedBuffer.tokenizedLineForRow(bufferRow)` recompute
  potential invalid lines lazily (starting from the first invalid line,
  down to the requested buffer row). When editing the first lines of a
  long file and causing a spill to occur, Atom (or any other package,
  for that matter) could request a line down in the file, causing this
  method to recompute lots and lots of lines.

  3. Let `DisplayLayer` deal with closing an un-opened tag. This is nice
  because we already keep track of containing tags there. However, it
  also feels like the wrong spot where to put this logic, as display
  layers shouldn't deal with grammar-related stuff.

  4. Keep track of containing tags in `TokenizedBufferIterator`, and
  report a boundary at the end of the line when the subsequent one's
  `openScopes` property doesn't match the `containingTags` that the
  iterator has been keeping track of.

Of all these solutions I've chosen 4), because it's the most performant
and clean in terms of code.
2016-04-27 18:06:13 +02:00
joshaber
30d6353fd8 Spec for openedPath. 2016-04-27 12:03:29 -04:00
joshaber
aa9e8ab620 Update the spec. 2016-04-26 14:56:00 -04:00
Josh Abernathy
bb1b89da60 Merge pull request #11603 from atom/remove-packagemanager-dependency
Remove TextEditor's dependency on PackageManager
2016-04-26 12:43:35 -04:00
joshaber
0541755ac8 Consistent indentation. 2016-04-26 09:49:38 -04:00
joshaber
67c7c60dcc Test getUpstreamBranch 2016-04-26 09:49:03 -04:00
joshaber
e16e987e08 Give the fixture a remote 2016-04-26 09:46:04 -04:00
joshaber
ff43d917be Lower case 2016-04-26 09:23:54 -04:00
joshaber
f86a15e5fc Spec for getOriginURL 2016-04-26 09:22:56 -04:00
joshaber
f589bdd8d9 Add a remote to the fixture. 2016-04-26 09:22:38 -04:00
Antonio Scandurra
7ba9cc6329
Unfold all the folds intersecting the row when clicking fold indicators 2016-04-26 13:24:21 +02:00
Antonio Scandurra
38bd120fb1
🎨 2016-04-26 12:11:13 +02:00
Antonio Scandurra
f81f54e08a
Apply 'folded' decoration only to 1st screen row of a wrapped buffer row 2016-04-26 12:11:05 +02:00
Antonio Scandurra
4f6687324e
Include bufferRange in decorationsStateForScreenRowRange 2016-04-26 12:09:38 +02:00
Antonio Scandurra
ebfd821237
Destroy folds corresponding to fold-markers and not the whole buffer row 2016-04-26 10:47:42 +02:00
Antonio Scandurra
00ebe6bbbc
Merge branch 'master' into ns-switch-to-display-layers
# Conflicts:
#	src/text-editor.coffee
2016-04-26 10:19:39 +02:00
joshaber
759d64501d Better test. 2016-04-25 16:07:49 -04:00
joshaber
6852d6e91c Test it. 2016-04-25 15:34:46 -04:00
joshaber
956e037681 But without the space. 2016-04-25 14:20:54 -04:00
joshaber
d494f065df Update the spec. 2016-04-25 14:12:42 -04:00
joshaber
3574613fa3 Don't need resource pool anymore. 2016-04-21 14:19:24 -04:00
joshaber
809d194f31 Update the tests 2016-04-21 13:17:35 -04:00
Nathan Sobo
5ed30f910c Create synthetic iterator boundaries between open and close tags
If no non-negative integer exists between an open and close tag code,
we still need to report a boundary there, since close tags always have
to come first at any given iterator position.

🍐ed with @as-cii
2016-04-21 10:43:21 -06:00
Antonio Scandurra
754cbc2a67
Merge branch 'master' into ns-switch-to-display-layers
# Conflicts:
#	spec/tokenized-buffer-spec.coffee
2016-04-20 10:55:56 +02:00
Wliu
ea5ad4ae59 Coffeescript comment tokenization no longer matches the newline character 2016-04-19 21:31:53 -04:00
Damien Guard
42fef8c014 Merge pull request #11488 from atom/dg-fix-windows-specs
First batch of Windows specs fixes
2016-04-19 15:48:31 -07:00
Nathan Sobo
3bbeb9e680 Merge remote-tracking branch 'origin/master' into ns-switch-to-display-layers 2016-04-19 15:30:00 -06:00
Damien Guard
1500381ac9 Tweaks to the specs improvements from feedback 2016-04-19 14:25:44 -07:00
Michelle Tilley
b2aad098e1 Correctly autoindent \r\n in Selection#insertText 2016-04-18 11:06:51 -07:00
Michelle Tilley
e41b9f00fb Correctly autoindent single newline in Selection#insertText 2016-04-15 21:23:28 -07:00
Damien Guard
99e716f9ed Fix specs failures on Windows including paths 2016-04-15 11:25:05 -07:00
Antonio Scandurra
7eba972f39
Merge branch 'master' into ns-switch-to-display-layers 2016-04-15 17:39:15 +02:00
Katrina Uychaco
b790716caa Revert sample.txt file 2016-04-14 23:28:13 -07:00
Katrina Uychaco
4e9048d22d Create saveDialog helper function and name file in message 2016-04-14 23:25:27 -07:00
Katrina Uychaco
6988546790 Update to use current APIs 2016-04-14 22:02:35 -07:00
Wliu
58f029e92d 📝 2016-04-14 14:19:09 +00:00
Wliu
09b88cd1d5 Fix defective spec and associate 'screen' as a renderer module 2016-04-14 14:11:25 +00:00
Antonio Scandurra
147fed3123
Revert "Remove this commit if it works on travis"
This reverts commit 303bb8c74e.
2016-04-14 15:46:50 +02:00