Commit Graph

5261 Commits

Author SHA1 Message Date
Nathan Sobo
8e27d8215a Store hidden input data in TextEditorPresenter::state 2015-02-19 17:14:54 -07:00
Nathan Sobo
168df987d7 Make GutterComponent a plain JS object instead of a React component 2015-02-19 17:14:53 -07:00
Nathan Sobo
c06e100fae Make LinesComponent a normal object instead of a React component
Also, remove ability to disable hardware acceleration since there’s
no longer a need for it and it complicated this conversion.
2015-02-19 17:14:53 -07:00
Nathan Sobo
883af7a83e Update cursor nodes manually 2015-02-19 17:14:52 -07:00
Kevin Sawicki
54290e0717 Merge pull request #5643 from atom/ks-deprecations-in-tasks
Report deprecations from tasks
2015-02-19 15:14:35 -08:00
Kevin Sawicki
ebefc3b36d Assert stack trace location 2015-02-19 14:53:15 -08:00
Max Brunsfeld
0674244f5c Always create new window when opening w/ no path
Fixes #5631
2015-02-19 14:35:22 -08:00
Kevin Sawicki
d721cc62e3 Report deprecations in tasks 2015-02-19 14:12:48 -08:00
Antonio Scandurra
59cc10a1ee Bring in @nathansobo PR changes
...as they were needed to pass specs
2015-02-19 21:09:06 +01:00
Antonio Scandurra
79c16a0d00 Use softWrapAtNewLines in moveDown and moveUp
/cc: @nathansobo
2015-02-19 20:01:37 +01:00
Max Brunsfeld
cf60855245 Don't destroy repo in ::removePath if it is still needed 2015-02-19 10:28:54 -08:00
Max Brunsfeld
d4298bf077 Add Project::removePath
The tree-view needs to be able to remove a path from
the project
2015-02-19 10:02:37 -08:00
Antonio Scandurra
67ef17e0c8 💚 Fix soft wrapping scroll spec 2015-02-19 16:23:59 +01:00
Antonio Scandurra
85e202ee0a Get rid of wrapAtPhantomTokens 2015-02-19 16:23:51 +01:00
Max Brunsfeld
a9adfa6a76 Fix bug in Project::relativize 2015-02-18 16:47:35 -08:00
Max Brunsfeld
8c3988a790 Fix race when starting atom twice in spec 2015-02-18 13:37:06 -08:00
Antonio Scandurra
8184ad9a77 Ensure phantom tabs are correctly tokenized 2015-02-18 21:31:00 +01:00
Antonio Scandurra
bef1e862cc Fix failing specs (and add new ones)
When fixing failing specs, I adapted existing expectations to match the "soft
wrap indenting" behaviour: this means that there's no need to write a new spec
for it.
2015-02-18 21:20:04 +01:00
Max Brunsfeld
0eb742566f Always open w/ one untitled buffer when no paths are given
Fixes #5607
2015-02-18 11:17:52 -08:00
Max Brunsfeld
39a225821e Reuse current window if it has no project path
Fixes #5615
2015-02-18 10:29:48 -08:00
Kevin Sawicki
63af713a3f Guard against detected repository that does not open
Closes #5609
2015-02-18 09:16:06 -08:00
Sebastian McKenzie
52506a0df2 Rename 6to5 to Babel 2015-02-18 12:23:58 +11:00
Max Brunsfeld
bcfa4ef608 Restore old behavior for multiple path CLI args
Signed-off-by: Nathan Sobo <nathan@github.com>
2015-02-17 15:25:50 -08:00
Max Brunsfeld
a857932d6f Merge pull request #5537 from atom/try-assign-repo-after-provider-is-registered
Try to set the Project's repo if it does not have one when a new Reposit...
2015-02-17 10:48:08 -08:00
Michael Bolin
222db8af21 ./script/grunt lint and temp.mkdirSync('atom-project') instead of 'tmp'. 2015-02-17 10:14:35 -08:00
Michael Bolin
5805bf9675 Try to set the Project's repo if it does not have one when a new RepositoryProvider is registered.
I tested this using my test `HgRepositoryProvider`. Now when I run the following from the
command line:

    atom <path-to-directory-with-hg-repository>

And then run the following in the console:

    atom.project.getRepositories()

I get an array with an `HgRepository` in it. Previously, I got an empty array because the
`Project`'s paths were set before my `HgRepositoryProvider` was registered.
2015-02-13 22:27:13 -08:00
Nathan Sobo
55a70da3cf Hide scrollbars on mini editors
Fixes #5548
2015-02-13 19:37:27 -07:00
Max Brunsfeld
9517410ef4 Incrementally initialize presenter in random mutation spec
Fix resulting failures

Signed-off-by: Nathan Sobo <nathan@github.com>
2015-02-13 18:05:05 -08:00
Nathan Sobo
7e32dc6e7d Tempororily disable random presenter spec 2015-02-13 14:33:24 -07:00
Max Brunsfeld
ac78cee584 🔥 ncp; use fs.copySync 2015-02-12 22:14:02 -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
e0aa8e7f5c Move ncp dependency to build/package.json 2015-02-12 21:18:20 -08:00
Max Brunsfeld
f7e1629cfc Set multiple project paths for multiple cmd-line paths
Signed-off-by: Jessica Lord <jlord@github.com>
2015-02-12 21:18:18 -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
Max Brunsfeld
4ebfd22e3d Add Project::addPath 2015-02-12 21:16:26 -08:00
Max Brunsfeld
8ab4ad54d8 Allow Project::setPaths to handle multiple paths
Signed-off-by: Jessica Lord <jlord@github.com>
2015-02-12 21:16:15 -08:00
Nathan Sobo
01512989f7 Comment out json-diff module require
This is only for use locally to troubleshoot failing specs.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-02-12 18:04:40 -07:00
Kevin Sawicki
ef7726ba35 Uncomment env var check 2015-02-12 16:04:27 -08:00
Kevin Sawicki
2470d44dd2 Use temp directory for ATOM_HOME 2015-02-12 15:51:55 -08:00
Kevin Sawicki
a372c892f0 Set chromedriver path in integration spec helper 2015-02-12 15:04:33 -08:00
Kevin Sawicki
20b2be51d9 Add initial compile cache spec 2015-02-12 14:22:46 -08:00
Max Brunsfeld
aa59c38264 Merge pull request #5491 from bolinfest/repository-provider
Set up the atom.repository-provider service and implement GitRepositoryP...
2015-02-12 11:00:05 -08:00
Nathan Sobo
205d1df7b4 Precompute ::startRow and ::endRow in presenter 2015-02-12 11:34:45 -07:00
Michael Bolin
653bd32a3f Introduce local promise variable to simplify assertion. 2015-02-12 09:52:48 -08:00
Michael Bolin
248e958628 Move most test logic into waitsForPromise in git-repository-provider-spec.coffee 2015-02-12 09:49:40 -08:00
Michael Bolin
603a672629 Moved the bulk of the test into waitsForPromise to eliminate some extra variables. 2015-02-12 09:47:11 -08:00
Michael Bolin
efd9e505eb split up one of the tests in git-repository-provider-spec.coffee 2015-02-12 09:43:17 -08:00
Michael Bolin
673dae9f5b Remove snake-case variable names in tests. 2015-02-12 09:38:29 -08:00
Michael Bolin
5cbfc2473d Remove snake-case variable names in tests. 2015-02-12 09:33:25 -08:00
Michael Bolin
ca31c08e22 Remove reference to private atom.project.repositoryForDirectory property in unit test. 2015-02-12 09:31:44 -08:00
Michael Bolin
a3286f1f1d Fix up assertion messages. Make some .then() calls one-liners. 2015-02-12 09:28:26 -08:00
Michael Bolin
7a89366146 excise outdated comment 2015-02-12 09:22:27 -08:00
Michael Bolin
ddd0ef5eb1 change describe() to it() so runs() is nested in an it() 2015-02-12 09:20:17 -08:00
Nathan Sobo
cc80378b29 Precompute ::scrollTop in presenter 2015-02-12 09:36:44 -07:00
Michael Bolin
bdae2f99a8 Add a unit test for GitRepositoryProvider. 2015-02-11 23:27:59 -08:00
Michael Bolin
485a4deb83 Fix an assertion that was failing but was being reported as part of the wrong test. 2015-02-11 23:01:19 -08:00
Michael Bolin
5b03cfe878 Added unit test for Project::repositoryForDirectory and fixed the bug
that my unit test caught.
2015-02-11 22:38:02 -08:00
Nathan Sobo
54fcaa6132 Precompute ::scrollHeight and cache ::scrollPastEnd config value 2015-02-11 23:01:08 -07:00
Nathan Sobo
05554d03e4 Precompute ::scrollWidth 2015-02-11 22:53:38 -07:00
Nathan Sobo
fc603aaa0d Precompute ::clientHeight and ::clientWidth 2015-02-11 22:42:32 -07:00
Nathan Sobo
be691b6a54 Precompute contentHeight and height 2015-02-11 22:04:05 -07:00
Nathan Sobo
e4168d70b7 Use computed clientWidth instead of contentFrameWidth as max scrollWidth 2015-02-11 11:47:18 -07:00
Nathan Sobo
7f0110f49e Update cursors as soon as all required measurements are assigned 2015-02-10 15:16:58 -07:00
Nathan Sobo
f5294454e6 Keep a minimum of 3 lines on screen when scrolling past end 2015-02-10 14:38:20 -07:00
Nathan Sobo
3e9b48ef71 Expand computed scrollHeight when editor.scrollPastEnd is enabled 2015-02-10 14:19:06 -07:00
Nathan Sobo
a4fd589616 Don’t render line numbers if scrolled past end 2015-02-10 10:11:20 -07:00
Nathan Sobo
711f0a227c Honor the editor.scrollPastEnd option in TextEditorPresenter 2015-02-10 09:47:24 -07:00
Nathan Sobo
89d5dd339e Merge pull request #5293 from atom/ns-editor-presenters
Move all text editor view state into a presenter object
2015-02-09 15:43:14 -07:00
Nathan Sobo
4f0e1997cf 💄 CharWidth -> CharacterWidth in presenter 2015-02-09 15:28:17 -07:00
Max Brunsfeld
3e28eff755 Remove logic for different promise types in waitsForPromise
I added that logic when using the selenium-webdriver library, but
then switched to using webdriverio, which has the same Promise
interface as Q.
2015-02-09 14:22:13 -08:00
Max Brunsfeld
ef9ae8e7d7 Merge pull request #5404 from atom/mb-integration-test
Add integration test to cover browser-side code
2015-02-09 13:11:53 -08:00
Nathan Sobo
0d1ba90561 Update presenter’s gutter background state when background color changes 2015-02-09 13:54:25 -07:00
Nathan Sobo
62c8244bf2 Merge branch 'master' into ns-editor-presenters 2015-02-09 13:37:27 -07: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
Nathan Sobo
c8c13b8b40 Use cached .foldable values on TokenizedBuffer instead of recomputing 2015-02-06 18:54:34 -07:00
Nathan Sobo
f326c818fd Update .foldable on tokenized lines based on indentation 2015-02-06 18:54:13 -07:00
Nathan Sobo
0081fa283e Cache .foldable on tokenized lines based on block comments
Still need to handle indentation
2015-02-06 14:53:07 -07:00
Max Brunsfeld
6430bbb460 Wait for chromedriver's startup message on stdout 2015-02-05 22:40:17 -08:00
Kevin Sawicki
30419027a8 Show notification on config save failures 2015-02-05 15:34:17 -08:00
Kevin Sawicki
5de95759cd Spy on editor.save 2015-02-05 15:24:00 -08:00
Kevin Sawicki
e51c8f3407 Add specs for save/saveAs error handling 2015-02-05 15:07:42 -08:00
Max Brunsfeld
56677e71e4 Enable integration tests with environment var
I think this makes more sense then running them via a separate command,
since that command would only make sense for atom-core, unlike the
current 'run-package-specs' command, which works for any atom package.

This way, they won't run by default, but you can opt in to running them
on the command line by setting an env var, or in the spec runner by
temporarily editing the code, like we do for focused tests anyway.
2015-02-05 13:02:08 -08:00
Kevin Sawicki
fd1d872840 Prompt split editors to save on close
Previously an editor that was split into multiple panes would not
prompt to save correctly when the window was unloading.

This adds a new `windowCloseRequested` option passed through from the
beforeunload handler to the editor so that it can specially handle this
case.

Closes #5257
2015-02-04 17:14:46 -08:00
Kevin Sawicki
6e3d41f433 Suppress deprecations in BufferedNodeProcess
This keeps it consistent with the render process which also suppresses
deprecations

Closes #5383
2015-02-04 15:27:17 -08:00
Max Brunsfeld
28f280183e Use which(1), not bash's type function 2015-02-04 15:22:51 -08:00
Max Brunsfeld
f1df254a66 Use varargs in integration-test helper fn 2015-02-04 15:20:44 -08:00
Max Brunsfeld
af28083a6f Add integration test coverage for reusing windows w/ the same dir 2015-02-04 15:07:08 -08:00
Nathan Sobo
77599c799c Rename TextEditorPresenter::height to ::explicitHeight
This clarifies that the height is being assigned externally rather than
derived from the content.
2015-02-04 15:10:58 -07:00
Nathan Sobo
b94576dc09 Pass view measurements to model via presenter
Someday, we won’t need to pass measurements to the model anymore.
2015-02-04 14:48:17 -07:00
Max Brunsfeld
d0757c87c8 Move selenium-webdriver dependency to build/package.json 2015-02-04 13:11:33 -08:00
Max Brunsfeld
c19d99e9e2 Add integration test for starting atom w/ different arguments 2015-02-04 12:59:26 -08:00
Nathan Sobo
3973939de1 Don’t constrain scrollTop/Left until required measurements are assigned
This commit also adds to the list of required measurements and updates
the spec with a buildPresenter helper to more easily supply default
values for required measurements in each spec when they aren’t relevant
to that spec’s content.
2015-02-04 11:13:24 -07:00
Nathan Sobo
b792190693 Constrain scrollLeft based on computed clientWith and scrollWidth 2015-02-04 10:22:29 -07:00
Nathan Sobo
1ae25ed85d Make randomized presenter spec failures easier to reproduce 2015-02-04 10:05:47 -07:00