Commit Graph

141 Commits

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