Nathan Sobo
a564cc66f6
Replace Atom::getLoadSettings with a ::loadSettings property
...
We assign a value into ::loadSettings anyway in a spec, so there's not
much point leaving it a method. Eventually I'd like to pass all these
settings in when constructing the Atom object and eliminate awareness
of the loadSettings altogether from the Atom global.
2013-12-12 16:33:30 -08:00
Nathan Sobo
ebe77065cc
Destroy orphans after each spec
2013-12-12 15:45:16 -08:00
Nathan Sobo
30b0fed60f
Remove packageStates from atom state after specs just in case
2013-12-12 15:11:59 -08:00
Nathan Sobo
5f10c48219
Kill double project assignment
2013-12-12 14:40:12 -08:00
Nathan Sobo
23957d7f66
WIP: Make atom global a telepath model
...
Specs seem to be green but hang on what I'm assuming to be a long GC
pause near the end. I need to investigate what's going on memory wise.
2013-12-12 14:33:50 -08:00
probablycorey
f414c0955b
Specs don't prompt to save editors by default.
2013-12-12 10:35:11 -08:00
Nathan Sobo
b61654b52f
Upgrade to telepath 0.61.0
...
This version adds a bunch of reactive primitives and ensures we destroy
documents when they are no longer referenced.
2013-12-06 21:55:57 -08:00
Kevin Sawicki
3ce6176313
Rename rootView to workspaceView
2013-11-26 11:02:53 -08:00
Kevin Sawicki
17be036ff8
Move window.setUpEnvironment to Atom class
2013-11-22 10:13:59 -08:00
Kevin Sawicki
dd9aa2d02f
💄 Remove extra space
2013-11-21 16:08:27 -08:00
Kevin Sawicki
2f46fee1ca
Use resource path from load settings
2013-11-21 16:08:27 -08:00
Kevin Sawicki
bc1a743b2f
Remove project and rootView from window
2013-11-20 17:23:47 -08:00
Kevin Sawicki
568aa1d396
Remove some package manager shims on atom global
2013-11-20 12:48:05 -08:00
Kevin Sawicki
c9e68ab044
Remove window.config shim from spec helper
2013-11-20 12:48:04 -08:00
probablycorey
bf05ddb958
🔫
...
I screwed up a rebase, this nasty commit is the result.
2013-11-19 15:15:12 -08:00
probablycorey
756c2be64a
Replace editor instance variables with editorView
2013-11-19 14:57:35 -08:00
probablycorey
aaa82e23da
Rename Editor to TextEditorView
2013-11-19 14:34:20 -08:00
probablycorey
02f40688e2
Merge remote-tracking branch 'origin/master' into cj-keymap-cleanup
2013-11-15 13:53:42 -08:00
probablycorey
cb8e378af6
Use keyBinding in place of binding in method names
2013-11-15 13:49:17 -08:00
probablycorey
dcccde8f3f
Clone default keybindings in specs
2013-11-15 13:32:31 -08:00
probablycorey
809a02ca10
Clone keyBindings by default
2013-11-15 11:54:09 -08:00
Kevin Sawicki
6290c19264
Set up spec Project as telepath model
2013-11-15 11:17:32 -08:00
probablycorey
bd8e19bce7
Update keymap in spec-helper
2013-11-15 10:43:20 -08:00
probablycorey
4852ba6d95
Don't store binding sets, instead store a keyBinding array
2013-11-15 10:21:38 -08:00
Kevin Sawicki
fb02917adf
Set defaults after spying on save
2013-11-11 11:43:42 -08:00
Kevin Sawicki
b801c3ce56
Set core/editor config defaults in spec helper
2013-11-11 11:04:24 -08:00
Kevin Sawicki
d4b5303983
Remove remaining package paths from Config class
2013-11-11 10:33:09 -08:00
Kevin Sawicki
3539288a1e
Remove incorrect atom. prefix
2013-11-11 09:29:29 -08:00
Kevin Sawicki
a377a49004
Use atom.config instead of window.config
2013-11-11 09:16:44 -08:00
Kevin Sawicki
9f8a8139e0
Use atom.syntax instead of window.syntax
2013-11-11 08:53:52 -08:00
Kevin Sawicki
9b3edc89a6
Use atom.keymap in specs
2013-11-11 08:43:14 -08:00
Kevin Sawicki
bff47e10f4
Remove dimension shims on window
2013-11-11 08:43:14 -08:00
Matt Colyer
ec761d00ef
Remove modified check on fixture file
2013-11-04 14:53:43 -08:00
Matt Colyer
c9eebcf00a
Fixture hashes depend on line returns
2013-11-01 15:15:17 -07:00
Kevin Sawicki
ebb7a2637a
Upgrade to fs-plus@0.3.0
2013-11-01 08:46:03 -07:00
Nathan Sobo
7d64cd179e
Always mock atom.packages.resolvePackagePath
...
…instead of only in package specs. This allows specs that assume it is
mocked to work correctly when we run the full spec suite. Namely, the
settings-view specs had an issue with this.
2013-10-31 17:08:40 -06:00
Matt Colyer
9ea2bfa920
Clear menu template to avoid separator duplication
2013-10-18 11:34:19 -07:00
Matt Colyer
5541875965
Don't append duplicate menu items
...
Fixes #995
2013-10-18 10:20:03 -07:00
Kevin Sawicki
d6452c37d8
Clear menu template after each spec run
...
This is needed since packages don't destroy menus when deactivated
so the template currently grows larger each time a package is activated.
2013-10-17 16:31:15 -07:00
Kevin Sawicki
0b22d99fad
Store spec directory on required specs
...
This allows the project to be configured based on the spec being
run.
2013-10-14 11:15:40 -07:00
Kevin Sawicki
63f39d84a3
Load package relative to the package's spec directory
2013-10-14 10:33:21 -07:00
Matt Colyer
4d415d3ca9
Generate evil file fixtures depending on platform
2013-10-11 14:09:17 -07:00
Matt Colyer
12b42bf459
Initialize AtomPackage attributes earlier
...
This should make our package loading process a bit more robust.
2013-10-11 12:49:31 -07:00
Matt Colyer
abd8bd1253
Handle errors in package.json gracefully
2013-10-11 12:49:31 -07:00
Matt Colyer
ffdfe63a4e
Add specs
2013-10-08 16:23:34 -07:00
Kevin Sawicki
0033c9659f
💉 directory dependencies into Config
2013-10-07 16:12:00 -07:00
Kevin Sawicki
db47d02c3c
Add fixture packages to atom.packages.packageDirPaths
2013-10-07 16:11:59 -07:00
Kevin Sawicki
5895da3d6f
Store dimensions when spec window is unloaded
...
Refs #918
2013-10-02 17:16:19 -07:00
Kevin Sawicki
80cfcb799e
Destroy rootView/project on both window and atom globals
2013-10-02 15:51:11 -07:00
Kevin Sawicki
3591b921fd
Update atom and window globals in beforEach
2013-10-02 13:40:35 -07:00
Kevin Sawicki
1e108aa0d1
Reference packageStates via atom.packages
2013-10-02 13:40:34 -07:00
Kevin Sawicki
22f2d4c1c5
Update packageDirPaths on new config instance
2013-10-02 13:40:34 -07:00
Kevin Sawicki
c808630ba1
Move all stylesheet globals to ThemeManager
2013-10-02 13:40:32 -07:00
Kevin Sawicki
643e32043b
🐎 Set spec directory once
...
Prevents an IPC call on each beforeEach getting the load settings
2013-09-26 12:20:32 -07:00
Kevin Sawicki
869fe71f73
Accept timeout option to waitsForPromise
2013-09-23 16:44:59 -07:00
Kevin Sawicki & Matt Colyer
de341a7f4c
Use correct binding sets by first keystroke variable name
2013-09-20 16:24:25 -07:00
Kevin Sawicki
d46891caf0
Rename atom-api require to atom
2013-09-20 10:03:02 -07:00
Kevin Sawicki
3c94ca4b9e
Use relative paths in spec requires
2013-09-20 10:02:20 -07:00
Kevin Sawicki
fd85acd3eb
Remove unused require
2013-09-20 10:02:20 -07:00
Kevin Sawicki
c7a0a4bcd9
Use relative require paths in specs
2013-09-20 10:02:19 -07:00
Kevin Sawicki
b84df9ff29
Use relative require path to jasmine stylesheet
2013-09-20 10:02:19 -07:00
Kevin Sawicki
52abb4afc9
Remove nakedLoad and use standard require for jasmine
2013-09-20 10:02:18 -07:00
probablycorey
ae6f0c40e6
Fix default project path in specs
2013-09-13 11:34:47 -07:00
Corey Johnson
2bba50bdd0
Use a packages fixtures directory as the default project directory
2013-09-13 09:01:22 -07:00
Corey Johnson
c90eb7fc73
Add better errors to .toHaveLength spec exception
...
Returns a helpful error when the actual object does not have a length
var.
2013-09-09 09:28:36 -07:00
Kevin Sawicki
aba6958e55
Load base stylesheets in spec-helper
...
This fixes the editor specs not working when focused.
2013-09-04 13:33:39 -07:00
Kevin Sawicki
7b2429851c
Load bootstrap stylsheets in spec helper
2013-09-04 12:48:58 -07:00
Kevin Sawicki
c6d1409151
Merge branch 'master' into summit
...
Conflicts:
.pairs
package.json
spec/app/tokenized-buffer-spec.coffee
src/app/edit-session.coffee
src/app/project.coffee
src/app/window.coffee
src/atom-application.coffee
static/root-view.less
2013-08-14 14:05:35 -07:00
probablycorey
69eace6292
Remove references to windowed config panel
2013-08-05 13:54:37 -07:00
Kevin Sawicki
40d76d2db9
Replace git global with project.getRepo()
2013-07-23 19:31:32 -07:00
Kevin Sawicki
17cecda23e
Use atom-shell 23dd5b4da8
...
The release past this build is causing issues with async callbacks
not firing.
2013-07-16 09:48:15 -07:00
Kevin Sawicki
9d733a2da9
Don't grab native window focus
...
Call $(window) instead of atom.focus() so the native window
doesn't regain focus on each spec run preventing it from running
in the background.
2013-07-15 13:56:21 -07:00
Kevin Sawicki
6bbcc58542
Call atom.focus() in the root beforeEach
...
Async events are not currently firing in specs and this
appears to cause them fire.
2013-07-15 13:40:53 -07:00
Kevin Sawicki
f766bbbb38
Remove Point and Range classes now provided by telepath
2013-07-05 12:53:50 -07:00
Nathan Sobo
b66431e3a6
Delete atom.windowState in global afterEach
...
It seems like the windowState was getting saved to disk, causing weird
window state to be loaded on the next test run and a spec to fail.
2013-06-28 04:39:31 -06:00
Kevin Sawicki
8561bb34a8
Save and restore spec window dimensions
...
Closes #597
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
390b03647e
Don't clear #jasmine-content when window.debugContent is true
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
8b0a68dd4a
Return this
from $.fn.attachToDom
spec helper
2013-06-28 04:39:29 -06:00
Kevin Sawicki
1049a677bf
Set dimension of spec window
2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo
0851b4d011
Replicate pane splitting and removal
...
We're using Peer.js to stream changes to shared telepath documents
between participants.
We're replacing the rootView of joiners in a somewhat hacky way,
but replication of pane splits and items is fully tested.
2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo
6480e956af
Keep resident window state object
2013-06-28 04:39:26 -06:00
Cheng Zhao
b1e8a45fbe
Remove some dead code.
2013-05-29 12:20:56 +08:00
Cheng Zhao
0cc86b024d
Unspy atom.setWindowState after each spec.
...
Spec window needs to call it to save window dimenses.
2013-05-29 12:20:55 +08:00
Cheng Zhao
22d77af409
Also restore dimensions for spec window.
2013-05-24 22:09:44 +08:00
Cheng Zhao
a3b7df7b25
Fix window spec.
...
The windowStatePath now requires atom.windowMode, without setting it the
deserializeEditorWindow would create the wrong window.project.
2013-05-24 21:10:40 +08:00
probablycorey
102068f9e5
Remove calls to $native
...
And now some specs pass!
2013-05-22 11:57:31 -07:00
probablycorey
f23cb1aa79
Window state works now
...
The state is now stored in ~/.atom/.storage/SHA-OF-PATH. It is written
to every time it is set.
2013-05-21 14:12:15 -07:00
Nathan Sobo
b70ff1b164
Don't assign window.jQuery in jasmine-jquery.js
helper
...
I wrap it in a function wrapper to ensure that the assignment
`var jQuery` doesn't end up assigning a window global.
2013-04-26 15:36:13 -07:00
Nathan Sobo
6c43fd5c9d
Set up dev tools event handler when binding default keys
2013-04-26 15:32:47 -07:00
Nathan Sobo
ab1b90804e
Add specs for successful calls to .loadUserConfig
2013-04-26 15:31:18 -07:00
Cheng Zhao
e0865e8c38
Use node-pathwatcher.
2013-04-07 16:35:35 +08:00
Nathan Sobo
f03b6207de
Make all requires of 'fs-utils' assign to fsUtils var instead of fs
2013-04-03 12:01:37 -06:00
Kevin Sawicki
9a8fd062c4
Throw error instead of string
2013-04-02 14:40:55 -07:00
Corey Johnson & Nathan Sobo
c8ec73d2f0
Allow scoped-properties to be added/removed by name
...
Also:
- remove "global" properties
- clear scoped properties between specs
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo
8437f3ff7f
Only load TextMate packages as needed in specs
...
Also: when a TextMate package is deactivated, remove its grammars
2013-03-26 17:35:42 -06:00
Nathan Sobo
a41e3c1ebb
Don't clear loaded packages between specs
2013-03-26 17:35:42 -06:00
Nathan Sobo
bb8b3782b9
Serialize package states independently of RootView
...
Previously, package specs needed to deactivate the root view to test
their package serialization. Now, specs can just deactivate and then
reactivate the package, relying on serialization infrastructure that's
independent of the lifecycle of the RootView.
2013-03-26 17:35:42 -06:00
Nathan Sobo
f5774972e9
Add atom.deactivatePackage(id)
...
It serializes the package state to the atom.packageStates hash when
the package is deactivated, which means we will be able to test
package serialization independent of the overall window lifecycle by
just deactivating and re-activating the package.
2013-03-26 17:35:42 -06:00
Nathan Sobo
e3ddc3f29b
Kill window.loadPackage
spec helper. We use built-in methods now.
2013-03-26 17:35:42 -06:00
Kevin Sawicki
6d2805d782
Drop extension from requireStylesheet()
2013-03-26 00:15:32 -04:00
Corey Johnson & Nathan Sobo
db4420e068
Move grammar overrides to syntax (no serialization yet)
2013-03-22 17:35:35 -06:00
Nathan Sobo
ab934cfbfb
Replace LoadTextMatePackagesTask with async grammar loading
2013-03-22 15:29:07 -06:00
Kevin Sawicki
712ba2c3fa
Clear all syntax subscriptions after spec runs
...
The global syntax object is reused between specs so
each spec should start off with a clean listener list.
2013-03-21 18:46:08 -07:00
Corey Johnson & Nathan Sobo
1ad5327c99
Ensure we never load saved window in specs
2013-03-21 18:51:32 -06:00
Corey Johnson & Nathan Sobo
f4d339ccac
Unify root view state with window state
2013-03-21 18:24:21 -06:00
Kevin Sawicki & Nathan Sobo
501dc9b76c
Merge remote-tracking branch 'origin/master' into cefode
...
Conflicts:
native/v8_extensions/native.mm
spec/app/config-spec.coffee
spec/app/window-spec.coffee
spec/spec-helper.coffee
spec/stdlib/fs-utils-spec.coffee
src/app/atom-package.coffee
src/app/config.coffee
src/app/window.coffee
src/packages/fuzzy-finder/lib/load-paths-handler.coffee
src/packages/markdown-preview/lib/markdown-preview-view.coffee
src/packages/tree-view/spec/tree-view-spec.coffee
src/stdlib/require.coffee
2013-03-20 10:46:50 -06:00
Corey Johnson
3ec74f3211
Move toExistOnDisk
matcher to spec helper
2013-03-12 16:55:28 -07:00
Kevin Sawicki
96a949983c
Use fs.resolveOnLoadPath() instead of require.resolve()
2013-03-12 13:33:25 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1
Use node's require instead of internal require
2013-03-12 10:38:05 -07:00
Corey Johnson
06b63c24dc
Merge remote-tracking branch 'origin/dev' into md-preview-redux
...
Conflicts:
src/packages/markdown-preview/stylesheets/markdown-preview.css
static/atom.css
static/command-panel.css
2013-03-11 17:02:36 -07:00
Nathan Sobo
10d0fdf2d7
Require a deferred package early if needed when deserializing panes
...
The requiring of a package's main module is now decoupled from package
activation. Non-deferred packages will always be required before the
panes are deserialized. This allows the package to register any
deserializers for objects displayed in the panes.
Deferred packages can contain a 'deferredDeserializers' array in their
package.cson. If we attempt to deserialize an object with a deserializer
in the list, the package's main module will be required first so it has
a chance to register the deserializer. But the package still won't be
activated until an activation event occurs.
We may want to add an additional optional hook called 'load' which is
called at require time. We would not guarantee that the rootView
global would exist, but we could give the package a chance to register
deserializers etc. For now, registering deserializers is a side-effect
of requiring the package.
2013-03-11 15:08:19 -06:00
Kevin Sawicki
2212222c47
Use underscore node module
2013-03-11 11:22:36 -07:00
probablycorey
9acd401b9e
Use fixture files to requireStylesheet
2013-03-11 10:02:19 -07:00
Justin Palmer
0624ba6d3f
rename remaining static css files to less
2013-03-11 10:02:19 -07:00
Justin Palmer
2b66b033e0
add less parsing helper to spec helper
2013-03-11 10:02:19 -07:00
Corey Johnson & Nathan Sobo
ff50bc2e6f
Add toBeInstanceOf and toHaveLength jasmine matchers
2013-03-07 14:32:10 -08:00
Nathan Sobo
96fefe94f0
Fix broken specs after rebase
2013-03-07 09:30:29 -08:00
Nathan Sobo
f0398f2331
Ensure modal dialogs are presented in a coherent order
...
Modal dialogs can be presented while other modal dialogs are already
being displayed. Previously, dialogs were always displayed in the order
they were requested. But say you have two untitled buffers in a
pane and you close all items… You'll display prompt dialogs for both
buffers asking the user if they want to save. If the user answers yes
to the first dialog, they should see the path selection dialog before
they see the save prompt for the second buffer.
This commit uses a stack of queues to store deferred dialogs and allow
dialogs presented by the dismissal of another dialog to take precedence
over other pending dialogs.
2013-03-07 09:30:28 -08:00
Nathan Sobo
54fc9efdcb
Eliminate fixturesProject global. Use project global instead.
2013-03-07 09:30:27 -08:00
Kevin Sawicki & Nathan Sobo
d6b85cf7e8
Base title updates on pane:active-item-changed events
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
161ed69ef0
When a pane is removed, focus/activate the next pane
2013-03-07 09:30:22 -08:00
Kevin Sawicki
2ec4d558ba
Make project's Git repository a window global
...
This allows it to operate independently of the
project and mirror the availability of the root view
and project.
2013-03-04 21:43:33 -08:00
probablycorey
30d4cb81b8
Use Courier as the default font for specs
...
Fixes #323
2013-03-04 16:40:02 -08:00
Corey Johnson
4db982f9e5
Use a 5 second timeout for specs
...
Hopefully this is temporary.
2013-02-20 16:28:05 -08:00
Corey Johnson & Nathan Sobo
c03b3fa691
💄
2013-02-20 11:44:50 -08:00
Corey Johnson & Nathan Sobo
5c1fb99037
Requiring window no longer has no side-effects
...
Call window.setUpEnvironment instead.
2013-02-20 11:44:39 -08:00
Corey Johnson & Nathan Sobo
2123fabae6
Window is only shutdown if a rootView and project exist
...
Keeping the shutdown state as a local var in window.coffee causes spec failures because window.shutdown can only be called once in the entire spec suite
2013-02-20 11:31:36 -08:00
Corey Johnson & Nathan Sobo
f5ecaf436e
Move core:close into handleWindowEvents
2013-02-20 09:58:34 -08:00
Corey Johnson & Nathan Sobo
cb1e48bfef
Make toggle-dev-tools command work in spec window
2013-02-20 09:58:00 -08:00
Corey Johnson & Nathan Sobo
9e8831f710
RootView.initialize no longer assigns window.rootView or calls open
2013-02-19 18:26:50 -07:00
Nathan Sobo
7f2747ead0
Make project
a global and refactor startup process
2013-02-19 18:26:50 -07:00
Nathan Sobo
7bdd51b456
Rename deserializeView
to deserialize
...
In additional, rename `registerViewClass(es)` to `registerDeserializer(s)`.
This moves us to a situation where any kind of object may want to be
deserialized, not just views.
2013-02-19 09:48:40 -07:00
Nathan Sobo
d3c2623b61
Make deserializeView
a global method
...
…along with `registerViewClass(es)`
2013-02-18 18:08:18 -07:00
Kevin Sawicki
eb179af0d4
Merge pull request #271 from github/super-command-panel
...
Super command panel
2013-02-14 10:13:40 -08:00
Kevin Sawicki
1922034df5
Disable jquery fx in specs
2013-02-13 17:13:15 -08:00
Corey Johnson
958bc2bfab
Moved atom.loadPackage to a spec-only helper function
2013-02-13 16:37:59 -08:00
Kevin Sawicki
1ee1fa02ba
Merge pull request #255 from github/rearrange-tabs
...
Drag and drop tabs
2013-02-12 08:38:52 -08:00
Kevin Sawicki
a61b0ab9da
Toggle dev tools in spec helper when no root view
...
Previously the keybinding for toggling the dev tools
would not function correctly after the root view had
been destroyed.
2013-02-11 10:22:19 -08:00
Justin Palmer
b2ce4ca6d5
merge dev, fix conflicts from package rewrite
2013-02-09 20:17:29 -08:00
Corey Johnson & Kevin Sawicki
4619e1847f
Manage package lifecycle in Atom instead of in RootView
2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
3b4f07701b
Build packages using paths instead of filenames
2013-02-08 17:28:04 -08:00
Corey Johnson
a89fdd7714
Reset the loadedPackages before each test.
...
Also stop including fixturePackagesPath in configs.packageDirPaths. Instead load fixture packages as needed
2013-02-08 17:28:03 -08:00
Corey Johnson
74ae4a6413
Remove getTextMatePackages
2013-02-08 17:28:03 -08:00
Nathan Sobo
1cab51cefa
RootView can no longer be focused.
...
Allowing root view to be focused was stealing focus away from the
editor whenever a click event made it to the root view. This unnecessary
switching of focus was interfering with the ability to drag tabs.
But if RootView can't be focused, focus ends up being returned to the
document body when there are no focusable elements. This would be fine,
except for the fact that we frequently bind global events on root view,
and so they aren't triggered when events are triggered on the body. We
could just bind all global events on the body, but this would require
us to always attach elements to the DOM during specs, which is a serious
performance killer in specs.
The workaround is in the keymap. When the keymap handles a key event
that was triggered on the body, it triggers the corresponding semantic
event on the root view anyway, so from the event perspective, it's as
if the root view actually had focus. The only place this might fall
down is if someone wants to capture raw key events. But that's the
keymap's job anyway, and we maybe add a hook on the keymap if such a
need ever arises.
2013-02-08 17:33:37 -07:00
Nathan Sobo
e25d83ccbc
Use new addEqualityTester
method to employ _.isEqual in specs
2013-02-02 17:58:39 -07:00
Corey Johnson
8e0b6aec40
Longer spec timeout
2013-01-31 15:46:54 -08:00
Nathan Sobo
c16acc6b2c
Disable 'package-that-throws-an-exception' except in spec that uses it
...
Loading this package logs a warning, so to minimize noise in the spec
console, it should only be loaded when `console.warn` is mocked.
2013-01-27 13:11:42 -07:00
Kevin Sawicki
a950673767
Remove duplicate simulateDomAttachment function
2013-01-11 10:42:43 -08:00
Kevin Sawicki & Nathan Sobo
4dc7ade4e6
Globally mock pasteboard read and write in specs
2013-01-10 11:41:07 -08:00
Corey Johnson
d2521ca8b8
Set editor.autoIndent to false for tests
...
Auto-indenting makes it more difficult to write simple tests. So we turn it off.
2013-01-10 09:41:49 -08:00
Corey Johnson & Nathan Sobo
f008ff52e8
Load snippets from any atom package with a snippets
directory
2013-01-07 14:28:47 -07:00
Corey Johnson & Nathan Sobo
6efe533650
Add atom.getPackages
so we can access package objects anywhere
2013-01-07 14:28:47 -07:00
Nathan Sobo
a9bb4ea163
When loading a package, honor the 'keymaps' manifest in package.json
...
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
2013-01-03 15:17:09 -07:00
Nathan Sobo
08a27cf93d
Load grammars from TextMatePackage
. Delete TextMateBundle
.
...
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Nathan Sobo
25aadda742
Merge branch 'master' into config
2012-12-20 22:17:32 -07:00
Nathan Sobo
880edcd408
Increase waitsFor
timeout in attempt to address intermittent failure
2012-12-20 22:17:08 -07:00
Nathan Sobo
c7605b8aa6
Move loadPackages
to atom
global. Handle '-tmbundle' in regex.
...
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
2012-12-20 21:34:07 -07:00
Corey Johnson
5ea9a4d365
Load TextMate Bundles from packages
directories
2012-12-20 16:25:08 -08:00
Nathan Sobo
37f0aa3f90
Replace window.requireExtension
with atom.loadPackage
...
The goal is that `loadPackage` will be the go-to place for loading all kinds of resources out of directories. `requireExtension` was only designed to load and activate extension modules.
2012-12-18 19:47:20 -07:00
Nathan Sobo
fc9bf38a2a
*Must* use get
and set
to access config
values.
...
The `config` object no longer stores config properties directly. Instead it stores them on an internal `settings` object, which makes it easier to serialize settings without getting them mixed up with non-setting state on the `config` object.
2012-12-17 20:56:37 -07:00
Nathan Sobo
7bf0022d3f
Make the font size 16 in specs, because a few specs depend on it
2012-12-12 16:39:30 -08:00
Nathan Sobo
ff468371ae
Nuke the config between specs
2012-12-12 15:58:50 -08:00
Nathan Sobo
c19c9e0d1f
Save config changes on update
2012-12-12 15:49:01 -08:00
Nathan Sobo
3c2b84a46d
Add config.editor.fontSize
2012-12-12 15:23:36 -08:00
Nathan Sobo
9c31ab3a79
Add global config
object. Config#load
loads user's atom.coffee.
2012-12-12 11:40:09 -08:00
Corey Johnson & Nathan Sobo
702b8047e4
Unwatch all paths after each test
2012-11-29 15:31:05 -08:00
Corey Johnson & Nathan Sobo
2f6566d1c5
Make jasmine timeout quicker (the right way)
2012-11-28 17:15:35 -08:00
Corey Johnson & Nathan Sobo
db78d6a7e5
Ensure PathWatcher isn't watching anything at the end of each spec
...
This replaces the old functionality of ensuring no files or directories have subscriptions in javascript. We allow this now, but we just don't allow leaked watches at the native layer.
2012-11-28 17:16:15 -07:00
Corey Johnson & Nathan Sobo
ce82439420
Make jasmine time out faster on waitsFor
blocks
2012-11-28 16:56:30 -07:00
Corey Johnson & Nathan Sobo
d6009df44e
Buffers retain path when file is deleted and can be re-saved
...
Path watching resumes once the file is saved again. This commit allows files to be created for as-yet nonexistent paths. We won't call `$native.watchPath` until we have at least 1 subscription to the file in JS and the file exists on disk.
Also, we moved execution of the path watcher callbacks until after the callbacks data structure is updated in order to avoid confusing behavior in specs.
2012-11-28 16:55:10 -07:00
Corey Johnson & Nathan Sobo
d5d4751776
Don't set Buffer's file to null when the file is deleted (retain path)
2012-11-28 13:40:37 -07:00
Nathan Sobo
5aba8596a9
Make tokenization synchronous in all specs
...
Disabled some specs that need to make it asynchronous again… will deal with those soon.
2012-11-21 08:22:13 -07:00
Corey Johnson & Nathan Sobo
79036f60bc
Fix bug when setTimeout is called from within a timeout in specs
2012-11-19 16:50:07 -07:00
Corey Johnson & Nathan Sobo
f9563f5e55
Fix PathWatcher
failures
...
Now when a file is removed, we always remove its subscriptions and its kevent.
2012-11-19 13:16:14 -07:00
Corey Johnson
726345d93d
Use spyOn for window.setTimeout and window.clearTimeout in SpecHelper
2012-11-16 16:13:08 -08:00
Corey Johnson
e57cd48c54
Add jasmine.unspy
2012-11-16 16:12:04 -08:00
Corey Johnson
5bdfc49f3f
Window's title matches TextMate pattern of "#{basename} – #{project.path}"
2012-11-15 17:08:37 -08:00
Corey Johnson
7f999f4a96
Store the RootView's title as a member var instead of on document.title.
...
Now the window title is mocked to remain static when the spec suite is run.
2012-11-15 15:55:37 -08:00
Nathan Sobo
5803332501
Allow specs results to be scrolled
...
I added overflow hidden on the html and body tags in a previous commit to prevent rubber banding when scrolling the editor. But it broke the ability to scroll specs. This fixes that.
2012-11-15 13:52:29 -07:00
Nathan Sobo
5a1a1da386
Make editor display updates synchronous in all specs
2012-11-14 13:13:57 -07:00
Nathan Sobo
d1d3b45474
Don't focus the specs window in beforeEach
2012-11-07 16:00:39 -07:00
Nathan Sobo
72d25b405f
Don't show dev tools by default during specs. They steal the focus.
2012-11-07 12:04:47 -07:00
Nathan Sobo
b71fa308a3
Always run window.startup
when window.coffee is required
...
When we actually want to attach the root view in window-bootstrap.coffee, we call `window.attachRootView(path)` instead of calling `window.startup(path)`. Having `startup` called automatically means we can be sure any code we add there runs in every environment (including benchmark and specs). This is where we do things like setup the global keymap, parse text mate bundles and themes, and establish the window close handler. Any globals other than the root view that we want to be available in all environments should be established here. Right now that's just the keymap, but soon I want to add a global pasteboard.
2012-10-24 12:34:45 -06:00
Nathan Sobo
5f253d78e9
Optimization: Use absolute positioning instead of flexbox in editor
...
Flexbox was causing layouts and repaints to cover the entire scroll view instead of just the edited line. This cuts down on DOM manipulation cost significantly.
2012-09-25 14:58:31 -06:00
Corey Johnson
7f8531d10f
Show dev tools when specs are run
2012-09-06 15:36:28 -07:00
Corey Johnson & Nathan Sobo
44db540528
All specs pass
2012-08-30 17:12:52 -06:00
Corey Johnson & Nathan Sobo
08b9d69f59
Focus specs window before each test to ensure focus assertions pass
2012-08-30 16:11:42 -06:00
Nathan Sobo
3cc2faf7c2
Add atom.showDevTools
and replace calls to $native.showDevTools
2012-08-30 11:24:01 -06:00
Corey Johnson & Nathan Sobo
12b06ddf0c
Get spec suite running (lots of failures)
2012-08-27 17:36:36 -05:00
Nathan Sobo
c2c8724ad0
Initial commit
2012-08-10 13:32:19 -06:00
Nathan Sobo
c8154e4e8c
Use Twilight theme stylesheet based on TextMateTheme
2012-08-08 16:55:34 -06:00
Corey Johnson
b378620c54
Add TextMateBundle which handles all bundle loading
2012-08-02 11:38:14 -07:00
Corey Johnson & Nathan Sobo
058f63c01f
load all bundle grammars in window.startup
2012-08-01 17:09:29 -07:00
Corey Johnson & Nathan Sobo
b959d5aa37
Buffers are memoized on project by path
2012-07-18 12:56:09 -07:00
Corey Johnson & Nathan Sobo
c7b7135388
Temporary fix: When editor is resized, adjust width of rendered lines.
...
We do this to ensure that the lines aren't longer than the scroll view if they don't have to be. We really should use min-width instead because it's automatic. Also, trigger window resize when we make the editor narrower.
2012-07-13 17:17:18 -06:00
Corey Johnson & Nathan Sobo
ded4ac7fa1
WaitsForPromise outputs reject callback arguments
2012-07-12 12:11:48 -07:00
Corey Johnson & Nathan Sobo
1331cfb749
When promise resolution throws an exception, waitsForPromise is halted
2012-07-12 11:45:44 -07:00
Corey Johnson & Nathan Sobo
0d50066dad
Add window.originalSetTimeout
...
Signed-off-by: Corey Johnson & Nathan Sobo <cj+nathan@github.com>
2012-07-12 11:44:07 -07:00
Corey Johnson & Nathan Sobo
76d71c82d0
waitsForPromise takes a expectRejection option
...
If we expect rejection, we expect the promises's `fail` callback to be invoked and throw an exception if it isn't. Vice versa is also true.
2012-07-12 11:11:09 -06:00
Corey Johnson
5b2781aec2
waitsForPromise can wait for calls to fail
2012-07-10 15:05:29 -07:00
Nathan Sobo
06cdcaa820
Use fs.md5ForPath in spec-helpert o ensure sample.js isn't modified
2012-07-02 19:21:24 -06:00
Corey Johnson
801a91ec9b
Specs cleanup buffers
2012-06-29 15:38:12 -07:00
Corey Johnson
2ff1cc9baf
Never again will changes to 'sample.js' bite us in the ass
2012-06-29 15:09:31 -07:00
Corey Johnson
1059a6a495
Make dev tools work with specs
2012-06-26 16:41:13 -07:00
Nathan Sobo
e3d7ab31b5
Merge branch 'project-refactor'
2012-06-20 16:41:54 -06:00
Nathan Sobo
b4d77fd107
Load user configuration as part of RootView initialization, before any editors are created
2012-06-20 16:06:45 -06:00
Corey Johnson & Nathan Sobo
1280370fd1
Editor constructor requires an editSession (unless it is a mini buffer)
2012-06-20 09:28:23 -07:00
Corey Johnson
0cfb2e9ef4
Rename Editor.visibleLines to Editor.renderedLines
2012-06-04 17:53:58 -07:00
Corey Johnson
3983a25a98
Use requireStylesheet to load jasmine.css
2012-06-01 15:22:24 -07:00
Nathan Sobo
5045d68be2
2012-05-16 14:47:09 -06:00
Corey Johnson & Nathan Sobo
af65bd785c
fix test failures
2012-05-11 16:06:42 -07:00
Corey Johnson & Nathan Sobo
d51b229d56
When the editor buffer changes and the path is not visible in the TreeView, It selects the closes ancestor entry of that file.
2012-05-11 15:44:18 -07:00
Corey Johnson & Nathan Sobo
38582a22d3
These tests shall pass
2012-05-11 11:25:27 -07:00
Corey Johnson & Nathan Sobo
9427c82084
WIP: Getting specs passing with new stand-in vertical scrollbar
2012-05-11 11:52:03 -06:00
Nathan Sobo
f2f44b9ab6
Can match key patterns with the '-' character
...
Add a parser to parse keystroke patterns instead of splitting on '-' with a regex
2012-05-09 10:56:31 -06:00
Nathan Sobo
eeb28111f3
Double clicking a file changes focus to editor. Double clicking a directory toggles expansion. Single clicking doesn't ever change focus away from tree view.
2012-05-07 14:55:33 -06:00
Corey Johnson & Nathan Sobo
28ff26e845
Merge branch 'master' into statusbar
...
Conflicts:
src/app/editor.coffee
src/app/project.coffee
src/app/root-view.coffee
2012-05-04 11:41:13 -06:00
Corey Johnson & Nathan Sobo
bb689574d0
Project drawer state is restored upon refresh
2012-05-02 16:08:02 -07:00
Nathan Sobo
47c013f817
After each spec runs, make sure there are no subscriptions on directories (which would leak memory)
2012-04-26 15:54:54 -06:00
Corey Johnson & Nathan Sobo
f652b4e357
Position autocomplete menu above cursor if there isn't room below
2012-04-20 17:18:07 -06:00
Corey Johnson & Nathan Sobo
b1ab0735c7
Add ability to simulate DOM attachment to spec helper
2012-04-19 17:56:08 -07:00
Corey Johnson & Nathan Sobo
49b5263fd7
Listen on Editor for bubbled textInput events instead of directly on hidden input
2012-04-19 10:14:45 -06:00
Nathan Sobo
a5a573d732
StatusBar.initialize appends a status bar view to every current and future editor pane
2012-04-17 11:37:01 -06:00
Nathan Sobo
6c5b2a47ec
Reset document.title after each spec to prevent test pollution
2012-04-13 15:11:33 -06:00
Corey Johnson & Nathan Sobo
877b4dc336
RootView constructor can be called with serialized view state data
...
Move the saving of serialized root view data to window.coffee. The window.startup method looks for window state on the atom object and instantiates the root view with that if it is present.
2012-04-12 14:47:51 -06:00
Corey Johnson & Nathan Sobo
416a15e3af
Editors in #panes are always contained by .pane wrappers
...
This prepares us to refactor the split view and editor state code into Column, Row, and Pane objects.
2012-04-11 18:37:22 -06:00
Nathan Sobo
3c53f20aad
Split panes arrangements and editors are restored after refresh
2012-04-11 13:17:12 -06:00
Corey Johnson
37a9d88b48
Spec helper uses window's keymap
2012-04-03 17:20:48 -07:00
Corey Johnson
a372a2b411
Add Editor.bounds() and Editor.screenPositionInBounds()
2012-04-03 15:36:25 -07:00
Corey Johnson
edbd378879
All keybindings are stored in the src/keybindings folder now
2012-04-02 08:57:08 -07:00
Corey Johnson & Nathan Sobo
60affb5d55
Defer cursor auto-scrolling until next tick.
...
Reading the DOM causes a reflow, which slows down character insertion.
2012-03-08 14:04:54 -08:00
Nathan Sobo
8e4a6f65f7
Translate clicks to screen positions correctly when lines are scrolled right
2012-03-07 17:22:13 -07:00
Nathan Sobo
65920fdc25
Rename GlobalKeymap to Keymap
2012-03-07 14:45:26 -07:00
Nathan Sobo
62319113c1
Meta-w closes specs window
2012-03-07 14:27:21 -07:00
Nathan Sobo
20deb80d9f
Give specs window a keymap with the default bindings
2012-03-07 11:04:41 -07:00
Corey Johnson & Nathan Sobo
5a4f4955b2
Set LineWrapper.maxLength based on lines width, not editor with.
...
Because there's a gutter now that doesn't count.
2012-03-02 17:09:45 -08:00
Corey Johnson & Nathan Sobo
e7f7e121f7
Gutter updates line numbers when buffer lines are inserted/removed
2012-03-02 16:24:03 -08:00
Corey Johnson & Nathan Sobo
b3c4fd5cce
Add a nonfunctional gutter to editor layout.
2012-03-02 15:42:04 -08:00
Corey Johnson & Nathan Sobo
f894f11e5f
remove references to native
2012-03-01 16:22:05 -08:00
Corey Johnson & Nathan Sobo
ffeaf7ed17
Remove menu code and tests
2012-02-29 13:47:48 -08:00
Corey Johnson & Nathan Sobo
be463abe42
Move keymap from app to window
2012-02-29 11:33:15 -08:00
Corey Johnson & Nathan Sobo
c84320b536
window-bootstrap is called when a file is opened.
2012-02-28 17:24:58 -08:00
Corey Johnson & Nathan Sobo
b37b45b4b1
atom variable holds all global state and is shared across contexts.
2012-02-28 13:14:35 -08:00
Corey Johnson
a41676e84e
Use event.originalEvent.keyIdentifier instead of event.which.
...
Events match patterns if event.keyStroke == key pattern.
2012-02-15 10:04:02 -08:00
Nathan Sobo
5ab91c3f47
WIP: Handle changes that aren't affected by wrapping
2012-02-08 14:04:55 -07:00
Corey Johnson
b45c00d90e
If an object implements inspect
jasmine will use it in test output
2012-02-03 16:05:57 -08:00
Corey Johnson & Nathan Sobo
82366b1226
Jasmine will call toString() if available to print an object.
2012-02-02 17:00:10 -08:00
Corey Johnson & Nathan Sobo
bb2af7333a
Point -> pixel conversion should be relative to editor.lines
2012-02-02 17:25:23 -07:00
Corey Johnson & Nathan Sobo
a62bd4b304
Double clicking selects a word.
2012-02-02 14:57:05 -08:00
Corey Johnson
c6c762ba23
Double mouse click selects word
...
The mousedown event on editor is causing this to fail right now.
2012-02-02 14:13:28 -08:00