Commit Graph

91 Commits

Author SHA1 Message Date
germanrcuriel
afbbee031e Add Coverage report for Unit and Integration tests
issue #361
- Added shell:coverage task to generate coverage report
- Registered test-coverage Grunt task as shortcut of shell:coverage
- Added coverage files to .gitignore
- Added require-cli and blanket to package.json
2013-11-09 18:58:27 +01:00
Sebastian Gierlinger
e2cee5be66 Move API tests to /integration/
closes #1396
- moved core/test/unit/api* to core/test/integration/api/
- moved core/test/integration/model* to core/test/integration/model/
- moved core/test/unit/utils to core/test/utils
- moved core/test/unit/fixtures to core/test/utils/fixtures/
- changed gruntfile.js to execute api tests with target 'integration'
2013-11-07 14:26:47 +01:00
Fabian Becker
0908ecf6b7 Run tests on MySQL and use travis-$DB environments.
refs #921
fixes #1385
2013-11-05 15:01:10 +00:00
Hannah Wolfe
60bef38298 Adding submodule update to grunt init
issue #1053

- not the greatest module, but perhaps one to re-create ourselves in future
2013-11-02 09:36:37 +00:00
Hannah Wolfe
56ea2bb557 Gruntfile.js cleanup & removed unused dependency
- grunt-open is no longer needed
- grunt build isn't used, so get rid.
2013-11-01 15:33:49 +00:00
Hannah Wolfe
df1571cecc Merge pull request #1369 from bengladwell/jslint-params
Remove unparam:true from jslint config in Gruntfile.js
2013-11-01 04:39:50 -07:00
Fabian Becker
933a8c764a Separate model tests to separate tasks/directory.
refs #921
2013-11-01 09:38:42 +00:00
Fabian Becker
3d42a3338f Run tests on MySQL and SQLite3.
fixes #921
2013-11-01 09:38:42 +00:00
Ben Gladwell
69d3a1460d Remove unparam:true from jslint config in Gruntfile.js
issue #1365
- added /*jslint unparam:true*/ to functions where absolutely necessary
- added /*jslint unparam:true*/ to functions in which keeping parameter
  list added clarity to the underlying api, even when those parameters
  are not currently used
- removed unused parameters in a few places
2013-10-31 14:02:34 -04:00
Zach Geis
45c2873e88 Grunt dev no longer opens browser
closes #1355
- dev task no longer calls open
2013-10-30 11:21:14 -05:00
Nick Schonning
5d24a4bf9d Move JS comments to task descriptions
- Makes them visible by "grunt --help"
- Normalize quoting to single
2013-10-25 01:58:58 -04:00
Hannah Wolfe
adcdeb0205 Merge pull request #1253 from halfdan/gruntfile-watch
Add core/server.js to grunt watch
2013-10-24 07:14:49 -07:00
Hannah Wolfe
39a777a5ea Merge pull request #1220 from mduvall/ruby-dependencies
Explicitly add Ruby dependencies to project
2013-10-24 02:39:56 -07:00
Matt DuVall
1580cccbf1 Explicitly add Ruby dependencies to project via Bundler
closes #1220
- This uses Bundler to install Ruby dependencies to handle explicit
  dependencies in provisioned environments
- The initial Gemfile contains SASS dependencies (sass and bourbon gems)
2013-10-23 18:16:16 -07:00
Fabian Becker
db0a182200 Add core/server.js to grunt watch 2013-10-23 20:58:28 +00:00
Hannah Wolfe
b76eeef27f Merge pull request #1167 from manzoid/add-target-to-grunt-test-functional
add a `target` arg to `grunt test-functional`
2013-10-22 14:45:37 -07:00
Hannah Wolfe
0d1fd56c0e Fixing client-side jslint exclude
- Gruntfile had an exclude for all of client/assets rather than client/assets/vendor
- Fixes missed jsLint errors
2013-10-22 22:06:22 +01:00
Hannah Wolfe
5d169610ce Merge pull request #1133 from gotdibbs/Issue1124
Fixed intermittent test errors
2013-10-22 07:59:50 -07:00
Tim Mansfield
725d1541d7 add a target arg to grunt test-functional
The idea here is to slightly speed up test development by allowing you
to specify a single test file to run.
2013-10-18 17:13:07 -07:00
Fabian Becker
58f07cefa3 Fix CasperJS warning. 2013-10-18 08:50:49 +00:00
William Dibbern
702a016547 Fixed intermittent test errors
Fixes #1124

- Updated default mocha timeout to 15 seconds. Any future tests that
depend on a timeout (and thus might be better off with a lower value)
can override the default setting which is now 15 seconds.
- Removed test-specific timeout overrides for the mocha tests.
- Fixed the editor/splitbutton tests to wait for the appropriate
selector instead of assuming the dom has been updated immediately.
Should resolve intermittent timeouts when checking the splitbutton's
applied classes.
2013-10-16 17:57:52 -05:00
Matthew Harrison-Jones
87269513d9 Included NProgress in Production Grunt concat 2013-10-15 11:18:57 +01:00
William Dibbern
ac33cea0a1 Clean up test database after tests
Fixes #1064

- Updated grunt config for unit and functional tests to remove the test
database after each is run.
- Cleaned up a couple of issues with the functional tests that may have
been causing travis builds to fail randomly, including: the start page
is now `about:blank` instead of whatever page the last test suite left
off at, added some checks in the logout tests to ensure they're truly
independent of the other test suites.
2013-10-14 22:39:52 -05:00
Peter deHaan
f4dabe07b5 Update Gruntfile.js
Removing double 'path' require()
2013-10-14 10:49:13 -07:00
Hannah Wolfe
119b0ea430 Merge branch '0.3.2-wip'
Conflicts:
	core/client/assets/lib/uploader.js
2013-10-11 20:56:15 +01:00
Hannah Wolfe
d47b19b491 Added grunt release task
closes #941

Conflicts:
	Gruntfile.js
2013-10-11 18:19:03 +01:00
Matthew Harrison-Jones
5daa46276c SCSS is now compressed on build 2013-10-10 15:27:07 +01:00
Matthew Harrison-Jones
58417c2a8d Added in functionality for a working loading bar 2013-10-08 16:39:07 +01:00
William Dibbern
8ef27f0590 Refactored tests
Fixes #362

- There is no need to set the viewport on functional tests anymore
unless something other
than the default of 1280x1024 is desired.
- There is no need to invoke `casper.run` to trigger `test.done`
anymore for functional tests.
- Each test works independently of the rest; registration is handled
once for the lifetime of the test run and then login/logout can be
invoked automatically as desired.
- Mocha tests all utilize predefined, more realistic fixtures when
appropriate.
- Renamed old api tests that were really model tests as appropraite.
- Added example api test for posts.
2013-10-07 21:05:25 -05:00
John O'Nolan
d1957958e3 Cleanup indentation and quotes
Aligns all requirements vertically for easier reading + adds single quote standard consistently throughout Ghost, except in long strings.
2013-09-26 15:06:31 +01:00
nicoburns
994263b033 Added grunt-contrib-clean task to clear build folder 2013-09-19 08:45:29 +01:00
Hannah Wolfe
a5af6edd1d Don't remove content images from build 2013-09-18 20:50:39 +01:00
Hannah Wolfe
0ea290df96 Grunt build and gitignore updates 2013-09-18 19:45:21 +01:00
nicoburns
3b3d7a7c34 Replaced Hammer.js with FastClick
Issue #149 Closes #519
- Uses FastClick to speed up click events instead of using Hammer.js tap
events
2013-09-17 22:11:13 +01:00
Hannah Wolfe
d5518c986a Adding grunt prod task
- compiles assets for production environment
2013-09-17 01:49:04 +01:00
Jacob Gable
63eb9581ea Compile assets with grunt
- Made a helper called ghostScriptTags that will spit out the relevant
  script tags with version parameter; 4 unminified files in development,
  1 minified file in production.
- Added grunt concat and uglify tasks to build files into core/built
- Fixed some unit tests by making them native date objects
2013-09-15 14:06:42 -05:00
Hannah Wolfe
596c1dccd2 Updating example config file
- url first, replaced with temporary URL with documentation
- mail config is a commented out example
- mail documentation link in config and mail file
- no more staging
- gruntfile updated to generate correct docs
2013-09-15 15:45:18 +01:00
Hannah Wolfe
63d8cbb87c Unit tests require config file to be present.
Conflicts:
	Gruntfile.js
	core/test/unit/admin_spec.js
2013-09-14 14:07:05 +01:00
Hannah Wolfe
003f9d2048 Fixing tests 2013-09-13 17:29:01 +01:00
Hannah Wolfe
e9d2646997 Refactoring tests to always run as expected
closes #721

- we now have grunt test-unit for safely running unit tests.
2013-09-13 15:12:38 +01:00
Hannah Wolfe
eb15a37850 Gruntfile cleanup 2013-09-12 21:03:01 +01:00
William Dibbern
9064914829 Added redirect to get rid of /page/1/
Fixes #592

- Added *permanent* redirect to ensure `/page/1/` isn't used and that
`/` is used instead.
- Added pageUrl helper (and unit tests) to generate client side url
fragment for blog pages conforming to the above standard.
- Updated pagination helper to use new `pageUrl` theme helper.
- Added functional tests for redirects and added scaffolding for
functional frontend tests in general.
2013-09-09 18:32:44 +01:00
Hannah Wolfe
b55ed1c33c CasperJS test amends
- removing --fail-fast as this prevents screenshots
- adding debug code for the good of all
2013-08-30 10:50:42 +01:00
Hannah Wolfe
fe713c1042 Further grunt validate / casperjs test improvements
- Test environment runs on a different port
- Removed wait() and replaced with waitFor() where possible
- Added more timeout functions / handlers
- General consistency improvements
2013-08-29 20:13:17 +01:00
Hannah Wolfe
f318d164d4 Adding Github Flavored Markdown support
closes #422, issue #295

- Added GFM mode to codemirror
- Took the github.js extension for Showdown and added all useful behaviour
- Now supports strikethrough, line breaking and
  multiple underscores, and auto linking urls & emails without breaking
  definition urls
- Also added definition url handling in preparation for #295
- Added unit tests for the extentions individually and integrated with
  showdown
2013-08-29 14:32:09 +01:00
Hannah Wolfe
5a9db4dc76 Casperjs tests now use test DB 2013-08-29 11:04:33 +01:00
William Dibbern
badd6d10d4 Added CasperJS Functional Test to Build
Fixes #363

- Added new grunt task to run casperjs tests.
- Added prerequisites (sass/bourbon/casperjs) to travis config.
- Updated failing functional tests to use more robust `waitFor`
statements.
- Updated capserjs `base.js` file to use a password which conforms to
our 8 character minimum.
- Added necessary logout to first test and also registration step to
ensure a user is present in the system.
2013-08-26 16:28:41 -05:00
William Dibbern
ff3a9dde00 Patch to prevent timeouts in unit tests
Temporary patch for #362

- Split out database teardown and initialization so they each have their
own 2 second timeout.
- Added some test-specific increased timeouts.
2013-08-24 16:07:15 -05:00
Jacob Gable
7a5cccf4c2 Add LiveReload Grunt Dev Task
Adds the ability to run a new task via `grunt dev` that will watch our
sass, templates and javascript files for changes and reload them in the browser.

Also, refactored the Gruntfile to auto load all grunt-* tasks to remove
some code.
2013-08-17 13:56:02 -05:00
Hannah Wolfe
2f11f053ab Minor code cleanup, docs and other bits & pieces 2013-08-06 22:24:40 +01:00