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
Nathan Sobo
5bb3095ffa
Constrain scrollTop based on clientHeight and scrollHeight
2015-02-04 09:38:00 -07:00
Nathan Sobo
3e6669cf3e
Log code for repeatable randomized presenter spec failures
2015-02-04 08:42:06 -07:00
Nathan Sobo
ba6d11e24e
Merge branch 'master' into ns-editor-presenters
2015-02-04 07:57:04 -07:00
Nathan Sobo
86991bbec2
Merge branch 'driskell-bugs/ident_guide_whitespace_only'
2015-02-03 21:26:25 -07:00
Nathan Sobo
973d7ebf13
Add spec coverage for indent guides + invisibles on blank lines
2015-02-03 21:26:01 -07:00
Kevin Sawicki
a4976c32ae
Remove release notes from event payload
...
The release notes are provided by Squirrel on Mac but not by Squirrel for
Windows and the release notes package pulls them down manually anyway
so this field is no longer needed.
Checking for the presence of the release notes previously was preventing the
event from firing on Windows which would cause old release notes to show in
the package.
Closes #3757
2015-02-03 14:57:33 -08:00
Nathan Sobo
78b8039384
Don’t require sync update before measuring when autoHeight changes
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-02-03 15:05:45 -07:00
Nathan Sobo
cd77870286
In presenter, handle the first line being soft-wrapped
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-02-03 15:05:44 -07:00
Nathan Sobo
edd595a72f
Access mouseWheelScreenRow property instead of calling removed method
2015-02-03 15:05:43 -07:00
Nathan Sobo
cf50ec1861
Fix action logging in random spec
2015-02-03 15:05:42 -07:00
Nathan Sobo
de5c1fc28d
Add randomized fuzz test for TextEditorPresenter
...
This test performs random operations on the editor and assigns random
measurements from the view. After each operation, the state of a
pre-existing presenter is compared with that of a new presenter created
with the same parameters.
Since it’s easier to reason about building fresh state than it is to
reason about state updates, I hope this will catch any bugs in our
update logic as we optimize it and explore every corner case.
2015-02-03 15:05:33 -07:00
Nathan Sobo
510520d2c7
🎨 rename ::getStart/EndRow to ::computeStart/EndRow
2015-02-03 15:05:32 -07:00
Nathan Sobo
f005b2005f
Add specs for updating scrollWidth when the longest line changes
2015-02-03 15:05:32 -07:00
Nathan Sobo
b521e8dc97
Handle auto-height in TextEditorPresenter
2015-02-03 15:05:32 -07:00
Nathan Sobo
bbc1a264b5
Make each section of presenter state self-contained
...
This means we have some duplicated values in different parts of the
tree, but it’s cleaner in the view since each component only consumes
a single object. Seems like the presenter should convey the correct
data to the correct locations and minimize the logic in the view. A
few duplicated integers is a reasonable trade-off.
2015-02-03 15:05:31 -07:00
Nathan Sobo
efdba9fc24
Use presenter state for scrollbars and scrollbar corner
2015-02-03 15:05:31 -07:00
Nathan Sobo
0910e86357
Add .right and .bottom to presenter scrollbar states
2015-02-03 15:05:31 -07:00
Nathan Sobo
14776e3f0a
Give each scrollbar its own state object and track visibility
2015-02-03 15:05:30 -07:00
Nathan Sobo
42ab02d7d2
Rename ::clientHeight/Width to ::height and ::contentFrameWidth
...
The term “client” was actually a misnomer here because it typically
means the height excluding the scrollbars, which wasn’t how we were
using it here.
2015-02-03 15:05:30 -07:00