Commit Graph

9018 Commits

Author SHA1 Message Date
Antonio Scandurra
a186428571 Fix linter errors 2019-08-02 10:31:07 +02:00
Antonio Scandurra
0693b4f48c Report scopes from shallower layers at the start or end of an injection 2019-08-01 15:48:00 +02:00
Antonio Scandurra
a46740261a Fix linter errors 2019-07-30 11:18:27 +02:00
Nathan Sobo
40ad380206 Only cover parent scope boundaries if nested layer has a scope boundary 2019-07-29 15:27:47 -06:00
Antonio Scandurra
fdd60afecb Write test to demonstrate injection grammar bug
Co-Authored-By: Nathan Sobo <nathan@github.com>
2019-07-29 19:30:03 +02:00
Rafael Oleza
f7f002fd20 Merge branch 'master' into electron-4 2019-07-19 17:35:28 +02:00
Rafael Oleza
fd6e9763a0 Fix squirrel-update specs 2019-07-04 15:21:32 +02:00
Rafael Oleza
cbe54954f4 Revert breaking changes on the WinShell module
In earlier commits from this PR, some breaking changes were done to the
WinShell module, which cause some issues on the `settings` package (and
potentially other packages).

Since these breaking changes are not needed (and they don't provide even
a better API), this PR reverts them to keep the previous contract.
2019-07-04 14:14:47 +02:00
Rafael Oleza
f7b7545fd0 Create get-app-name module that returns correct application name
Before, in order to retrieve the application name, Electron's
`getName()` method was used (https://electronjs.org/docs/api/app#appgetname).

Now, instead, we also use the Atom version in order to calculate the release
channel and be able to have it on the app name (e.g `Atom Nightly`).
2019-07-04 13:21:14 +02:00
Rafael Oleza
0578c0626e Merge branch 'master' into dw-windows-separate-channels 2019-07-04 10:34:39 +02:00
Rafael Oleza
9ae30a3545
Merge pull request #19615 from dwelle/ripgrep-pcre2
Add ripgrep pcre2 search support
2019-07-01 18:18:36 +02:00
dwelle
ef7b910ed0 Add ripgrep pcre2 support
👕 fix lint

Co-Authored-By: Rafael Oleza <rafeca@gmail.com>

fix passing PCRE2 flag in specs

👕 fix lint
2019-07-01 14:51:28 +02:00
Rafael Oleza
3d2d439f93 Fix issue when ripgrep returns matches that are empty 2019-07-01 12:49:06 +02:00
Rafael Oleza
7593d49a89 Debounce the resize event handler 2019-06-28 18:51:43 +02:00
Rafael Oleza
58a10a2cc9 Merge branch 'master' into dw-windows-separate-channels 2019-06-26 16:14:12 +02:00
Antonio Scandurra
45ef670303 Delete implementation-dependent test
Co-Authored-By: Nathan Sobo <nathan@github.com>
2019-06-25 16:40:25 +02:00
Rafael Oleza
b6644dfad8 Merge branch 'master' into dw-windows-separate-channels 2019-06-25 15:49:34 +02:00
Rafael Oleza
5b61fbaf3a Merge branch 'master' into electron-4 2019-06-24 10:17:21 +02:00
Benjamin Gray
9e1e647ec7 fix lint 2019-06-21 16:32:16 +10:00
Benjamin Gray
166d968daa adjust specs 2019-06-21 16:11:50 +10:00
Benjamin Gray
4bcb51984e Merge branch 'master' of github.com:atom/atom 2019-06-21 01:34:41 +10:00
Max Brunsfeld
dbdff0f56c ⬆️ language packages 2019-06-18 17:49:20 -07:00
Max Brunsfeld
7bfd33c519 Add includeChildren injection point API, use it for rust injections 2019-06-17 16:54:15 -07:00
Jason Rudolph
c7c082f705
Merge pull request #19551 from atom/revert-19459
Remove delays that we no longer need in watch-path tests
2019-06-17 13:16:03 -04:00
Rafael Oleza
91b53d4b3b Use random port to initialize ChromeDriver
Since ChromeDriver v2.41, ChromeDriver will only connect if, either we precise a port
for remote debugging, either the embedder (ie electron) made sure to pass `USER_DATA_DIR`
to the remote debugging server.
So, for now, we'll just use a random port (we don't care about its value since we're not
connecting through it).

(inspired by 737db138bd).
2019-06-17 10:57:12 +02:00
Rafael Oleza
60093e45e5 Revert "Back to manual debugging it is"
This reverts commit 6e90fbe064.
2019-06-17 10:52:59 +02:00
Rafael Oleza
5ddb665831 Merge branch 'master' into electron-4 2019-06-15 10:26:34 +02:00
Nathan Sobo
2ea1f359cb
Merge pull request #19538 from atom/as-ns/tokenized-line-tokens-shim
Shim tokens in TokenizedLines returned from TreeSitterLanguageMode
2019-06-14 15:06:22 -07:00
Jason Rudolph
3f2309522a
Revert "add delay to watch-path tests to make them less flaky"
This reverts commit dd40782166. With the upgrade to atom/nsfw v1.0.25 in
https://github.com/atom/atom/pull/19525, we should no longer  need the
delay introduced in dd40782166.
2019-06-14 15:28:48 -04:00
Max Brunsfeld
61ef7ff573
Merge pull request #19531 from atom/mb-tree-sitter-0-15-5-test-travis
Update to Tree-sitter 0.15.5 (with travis build)
2019-06-14 12:08:36 -07:00
Antonio Scandurra
376b2e108e Shim tokens in tokenized lines returned from TreeSitterLanguageMode
Co-Authored-By: Nathan Sobo <nathan@github.com>
2019-06-14 19:23:57 +02:00
Jason Rudolph
a71aca850e
Merge pull request #19525 from atom/as/jr/fix-flaky-project-spec
Fix flaky test for `Project.onDidChangeFiles()`
2019-06-14 13:00:23 -04:00
Jason Rudolph
44cad8f586
Revert "Disable flaky spec on Windows until we can identify a proper fix"
This reverts commit a0742f8e9d.

As of 8734f66aab, we're now using the nsfw fixes from
https://github.com/atom/nsfw/pull/9, which should resolve the flakiness
we were seeing on Windows.
2019-06-14 11:20:37 -04:00
Max Brunsfeld
24dd5e5a73 Update to Tree-sitter 0.15.5 2019-06-13 14:54:44 -07:00
Jason Rudolph
a0742f8e9d
Disable flaky spec on Windows until we can identify a proper fix 2019-06-13 13:04:36 -04:00
Jason Rudolph
d03d2772b5
👕
Co-Authored-By: Antonio Scandurra <as-cii@github.com>
2019-06-13 12:41:50 -04:00
Jason Rudolph
9fa32c7c22
Convert spec to use async/await
Co-Authored-By: Antonio Scandurra <as-cii@github.com>
2019-06-13 11:35:12 -04:00
Jason Rudolph
c7d17f6233
If spec succeeds, clear the timeout
Prior to this change, the `console.error` statement _always_ ran, 
regardless of whether the promise resolved successfully. With this 
change, we clear the timeout in the scenario where the promise resolves 
successfully.

Co-Authored-By: Antonio Scandurra <as-cii@github.com>
2019-06-13 11:23:30 -04:00
Jason Rudolph
f9405cb25d
Fix test initialization
If multiple specs were to populate the events var, one spec would 
pollute the others. So, let's reset the events var at the beginning of 
each spec.

Co-Authored-By: Antonio Scandurra <as-cii@github.com>
2019-06-13 11:16:53 -04:00
Jason Rudolph
83119fb3e4
Update onDidChangeFiles spec to use real clock
Prior to this change, the spec was using the fake clock, which was
preventing the `setTimeout` from ever calling the `expire` function.

Co-Authored-By: Antonio Scandurra <as-cii@github.com>
2019-06-13 11:14:31 -04:00
Antonio Scandurra
6d9f6befd2 Increase timeout for atom-application.test.js on CI
On Azure and Travis, we recently started observing a few test failures 
in atom-application.test.js.

After staring at those tests for a bit, it doesn't seem like they are 
failing due to a race condition. Instead, it is possible that these 
tests are simply timing out due to CI containers sometimes being 
overloaded and, thus, slower.  I tested this hypothesis locally by 
running tests on a VM while stress-testing the host machine. Tests would 
eventually have passed, but they  timed out before having the chance to 
do so.

This commit increases the timeout on CI to 10 seconds for 
`AtomApplication` tests in  an attempt to fix the spurious failures we 
were observing. This is similar to what we've historically done for 
renderer process tests (see 
7faea50190/spec/spec-helper.coffee (L50)).
2019-06-13 16:36:55 +02:00
Benjamin Gray
f141ca35a3 Merge branch 'master' of github.com:atom/atom 2019-06-12 14:39:28 +10:00
Antonio Scandurra
ae10429d08 Ensure TextEditorComponent was resized before asserting on its contents
Previously, we would wait for the next update promise after resizing the 
editor as an indicator of when the resize occurred. Unfortunately, 
resize events are unreliable and may not be emitted right away. This 
could cause the test code to wait for an update promise that was 
unrelated to the resize event (e.g., cursor blinking).

This commit uses a condition-based promise that ensures the rendered 
rows have changed as a result of the resize. This seems to fix the issue 
locally when introducing artificial timeouts in the resize event.
2019-06-11 16:20:56 +02:00
Antonio Scandurra
2e6a0acf61
Merge pull request #19457 from atom/as/debug-autocomplete-failures
Run each test suite with a pristine ATOM_HOME directory
2019-06-07 10:10:37 +02:00
Antonio Scandurra
6a88fa4185 Don't symlink compile-cache folder in AtomWindow tests
In these tests, we create a temporary `ATOM_HOME` to avoid cluttering 
the user's real `~/.atom` folder.

Adding a symlink to the real `compile-cache` was introduced to speed up 
main process tests, so that the transpilation cache could be reused. 

Unfortunately, when the real `~/.atom` folder did not exist (such as on 
a pristine environment on CI), it would confuse Atom, which would think 
that it didn't need to re-create a `compile-cache` folder again, but 
wouldn't be able to write to it because the symlink pointed to a 
non-existant directory.

Main process tests were overhauled and made faster recently, so we can 
safely remove this performance optimization.
2019-06-06 17:11:01 +02:00
Rafael Oleza
dd40782166 add delay to watch-path tests to make them less flaky 2019-06-06 16:48:15 +02:00
Rafael Oleza
33f2bd37ee
Merge pull request #19444 from atom/improvements-to-ripgrep-scanner
Improvements to ripgrep scanner
2019-06-06 16:35:36 +02:00
Rafael Oleza
ac9be2d082 Remove test that checks that we can search of a subfolder of an ignored folder
This seems to not be working on Windows or with ripgrep, so it's not
expected behaviour.
2019-06-06 14:02:29 +02:00
Rafael Oleza
8c80d13dd1 Remove logic to prepend wildcard on globs
That logic was only needed to make `ripgrep` match correctly globs like
`src` when we pass it the folder to search on.

If we don't pass the folder, `ripgrep` assumes it's the cwd and their
glob matching logic improves by allowing globs like `src`.
2019-06-05 15:07:24 +02:00
Rafael Oleza
95adde37c0 Take into account the includeHidden option in ripgrep scanner 2019-06-05 10:21:06 +02:00
Rafael Oleza
8758c399db Take into account the follow option in ripgrep scanner 2019-06-04 12:21:50 +02:00
Rafael Oleza
3845862f5d Convert beforeEach() function to async 2019-06-04 12:21:50 +02:00
Rafael Oleza
7652d659e5 Take into account the excludeVcsIgnores option in ripgrep scanner 2019-06-04 12:21:50 +02:00
Nathan Sobo
2d3e332b88
Merge pull request #16100 from atom/wl-deserialize-and-activate
Activate package when deserializing
2019-06-03 13:44:58 -07:00
Antonio Scandurra
6b9b4f96f8
Merge pull request #19423 from atom/as/multi-stroke-accelerators
Display multi-keystroke key bindings in menu item's label
2019-06-03 10:57:26 +02:00
Winston Liu
6e90fbe064
Back to manual debugging it is 2019-06-02 22:00:06 -04:00
Rafael Oleza
e213a69a1f Re-apply prettier JS formatter 2019-06-01 00:29:10 +02:00
Rafael Oleza
79f6836349 Merge commit '1d9a4cafcf6cc288d675512db8fd984e13aab869' into dw-windows-separate-channels 2019-06-01 00:28:37 +02:00
Rafael Oleza
975f203dc7 Merge commit '677bbb7f0b8754787ff9e7bfab4602ba82e13b0b' into dw-windows-separate-channels 2019-06-01 00:27:52 +02:00
Rafael Oleza
ed6d06b16e Re-apply prettier JS formatter 2019-06-01 00:19:59 +02:00
Rafael Oleza
49cb6f4a7b Merge commit '1d9a4cafcf6cc288d675512db8fd984e13aab869' into wl-deserialize-and-activate 2019-06-01 00:19:27 +02:00
Rafael Oleza
040d96ca1b Merge commit '677bbb7f0b8754787ff9e7bfab4602ba82e13b0b' into wl-deserialize-and-activate 2019-06-01 00:18:46 +02:00
Rafael Oleza
66f7f1746a Reformat all JS files using prettier 2019-05-31 20:26:19 +02:00
Rafael Oleza
41840abdc2 Merge commit '1d9a4cafcf6cc288d675512db8fd984e13aab869' into pr18738 2019-05-31 20:25:41 +02:00
Rafael Oleza
0580aa11d1 Merge commit '677bbb7f0b8754787ff9e7bfab4602ba82e13b0b' into pr18738 2019-05-31 20:19:05 +02:00
Rafael Oleza
6263d85250 Re-apply prettier JS formatter 2019-05-31 18:55:45 +02:00
Rafael Oleza
948480665f Merge commit '1d9a4cafcf6cc288d675512db8fd984e13aab869' into wl-upgrade-webdriverio 2019-05-31 18:52:18 +02:00
Rafael Oleza
77dcd96a66 Merge commit '677bbb7f0b8754787ff9e7bfab4602ba82e13b0b' into wl-upgrade-webdriverio 2019-05-31 18:51:49 +02:00
Rafael Oleza
eb495f3ccf Merge commit '1d9a4cafcf6cc288d675512db8fd984e13aab869' into as/multi-stroke-accelerators 2019-05-31 18:45:39 +02:00
Rafael Oleza
ba7b9e39ec Merge commit '677bbb7f0b8754787ff9e7bfab4602ba82e13b0b' into as/multi-stroke-accelerators 2019-05-31 18:42:40 +02:00
Rafael Oleza
7f3f040628 Reformat all JS files using prettier 2019-05-31 18:33:56 +02:00
Rafael Oleza
677bbb7f0b
Merge pull request #19408 from atom/enable-no-useless-escape-eslint-rule
Enable eslint rules that got disabled
2019-05-31 18:29:31 +02:00
Antonio Scandurra
b04695ee69 Verify context menu item label's text for multi-keystroke key bindings 2019-05-31 16:26:18 +02:00
Antonio Scandurra
091325bd02 Merge branch 'master' into electron-3.1 2019-05-29 18:35:01 +02:00
Rafael Oleza
a14b3a5ddd Enable symbol-description eslint rule 2019-05-27 11:17:29 +02:00
Rafael Oleza
9abdb2f93a Enable no-unused-expressions eslint rule 2019-05-27 11:15:37 +02:00
Rafael Oleza
2139b4b936 Enable prefer-promise-reject-errors eslint rule 2019-05-27 11:11:49 +02:00
Rafael Oleza
dc2df49b60 Enable no-useless-escape eslint rule 2019-05-27 10:59:39 +02:00
Winston Liu
5265528675
🤦‍♀️ 2019-05-25 21:55:15 -04:00
Winston Liu
fe5082df51
Check for focus methods again 2019-05-25 20:53:47 -04:00
Winston Liu
7870675ef4
Re-enable tests 2019-05-25 20:50:53 -04:00
Winston Liu
e9ba8fdc05
Yay, it's green! Clean things up a bit. 2019-05-25 20:50:27 -04:00
Winston Liu
50e8c97db4
Delete the session when we're done, just to be safe 2019-05-25 16:50:45 -04:00
Winston Liu
45b772b111
Whoopsies 2019-05-25 16:50:37 -04:00
Winston Liu
7bbbca95bc
atom.workspace should always exist 2019-05-25 15:44:49 -04:00
Winston Liu
7e2a23b797
Ah heck, more async 2019-05-25 15:42:27 -04:00
Winston Liu
8fcd97ae15
...as I was saying, async. 2019-05-25 15:30:36 -04:00
Winston Liu
397c8d74e8
Pass in filePath as an argument 2019-05-25 14:24:10 -04:00
Winston Liu
e47253febf
I think we need to pass in a folder 2019-05-25 13:31:40 -04:00
Winston Liu
81fe767077
Everything's a Promise, apparently 2019-05-25 12:49:36 -04:00
Winston Liu
4961b31cf7
Perhaps it's something with await? 2019-05-25 00:18:16 -04:00
Winston Liu
8728e9f1e1
Thanks documentation for not giving any hint whatsoever that it's async 2019-05-24 21:00:55 -04:00
Winston Liu
8870380a29
Looks like there are windows being returned... 2019-05-24 20:26:33 -04:00
Winston Liu
bb74186003
Scoping 2019-05-24 18:08:48 -04:00
Winston Liu
a2af8ec9ca
Lint 2019-05-24 17:00:37 -04:00
Winston Liu
b9817ace02
Progress! 2019-05-24 16:42:21 -04:00
Winston Liu
1db4324d66
Not sure if addCommand returns anything... 2019-05-24 15:02:54 -04:00
Rafael Oleza
ab90d08292 Fix unrelated test 2019-05-24 20:30:57 +02:00
Winston Liu
cdfd37d4c5
??? 2019-05-24 13:45:17 -04:00
Rafael Oleza
17aa985f4e Fix handling of binary files when using ripgrep scanner 2019-05-24 18:55:18 +02:00