Commit Graph

169 Commits

Author SHA1 Message Date
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
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