Commit Graph

536 Commits

Author SHA1 Message Date
Hannah Wolfe
9388c196fc Uncommenting casper screenshots
- WHOOPS!
2014-06-08 18:50:37 +02:00
Hannah Wolfe
5190f1f0e4 Merge pull request #2876 from halfdan/2833-rasperize-cache
Cache invalidation for post update
2014-06-05 13:44:22 +01:00
Fabian Becker
340192c5da Cache invalidation for post update
closes #2833
- Handle status change of post
2014-06-04 18:11:28 +00:00
Jason Williams
bb4a0a3540 Update slug API to work with additional types
Closes #2866
-update slug API to handle users and apps in addition to
 posts and tags
-update existing tests
-add new functional tests for slug endpoint on http api
2014-06-04 05:54:03 +00:00
Fabian Becker
46c5cf7843 Fix 12h cookie test issue.
fixes #2776
- Changed test to just check for 12h +/- 2500ms
2014-06-03 20:35:33 +02:00
William Dibbern
07df9911ce Export backup prior to migration
Closes #847
- Added logic to export database to the `core\server\data\` folder prior
to beginning a migration.
- Factored out versioning logic from migration to prevent circular
references
2014-05-31 18:56:09 -05:00
Hannah Wolfe
99c96abab3 Merge pull request #2686 from iBotPeaches/unsafe_meta
escapes " in meta title/description
2014-05-31 17:48:29 +01:00
Connor Tumbleson
5933ee3afe escapes meta title/description
closes #2663
adds unit-test
2014-05-31 11:08:09 -05:00
Jason Williams
a3c2fe5496 Fix up unit tests. Check config url with isURL.
No issue
-validate url in config.js using validator.isURL
-fix up async flow in bootstrap unit tests
-make sure done handler is called on async tests
2014-05-29 21:06:40 +00:00
Hannah Wolfe
97011e5eca Merge pull request #2814 from lennerd/issue-2601
Refactore slug API for generating tag and post slugs
2014-05-27 10:21:39 +03:00
Jason Williams
a5d4e1db94 Fix up url helper unit tests
Closes #2817
-use async semantics for tests
-fix api.settings.read stub for the url helper describe block
-rename test to describe actual behavior (return '/' instead of '')
2014-05-26 20:53:21 +00:00
lennerd
bebafdc9a9 Refactore slug API for generating tag and post slugs.
Closes #2601
- Removed slug generation from the post API
- Added new, self-contained slug API
- Fixed slug permissions in the fixtures files
- Added a HTTP route for the new API method
- Added integrational tests
2014-05-26 10:07:05 +02:00
Hannah Wolfe
51090acf54 Merge pull request #2799 from jaswilli/issue-2798
Fix content preview actions and add tests
2014-05-24 12:23:56 +03:00
Sebastian Gierlinger
217e3ed7ad Improve status codes
closes #2187
- added UnsupportedMediaTypeError (code: 415)
- added status code 201 if a new object was created
- Updated tests
2014-05-24 08:05:12 +02:00
Jason Williams
669f7f8b0c Fix content preview actions and add tests
Closes #2798
-fetch full model for active post in Backbone content preview view
-remove unnecessary type check in Models.Post.saving
-add functional tests for all post settings menu actions in editor screen
-add functional tests for all post actions in content preview
 screen for posts with and without tags
2014-05-23 20:54:02 +00:00
Hannah Wolfe
11cf0ae125 Merge pull request #2791 from shindakun/assetcache
Make cache max-age on theme assets one year.
2014-05-23 19:05:49 +03:00
Steve
5f7182b7a2 Make cache max-age on theme assets one year.
closes #2790
- Added one year in ms var.
- refs: #2447
2014-05-22 07:55:38 -07:00
Jason Williams
9d16e72bb0 Add tests for handlebars core helper functions
Closes #1842
-add unit tests for core helper functions
-fix up coreHelpers.e
-clean up coreHelpers.pagination
2014-05-22 03:57:52 +00:00
Hannah Wolfe
c02ebb0dcf Refactor API arguments
closes #2610, refs #2697

- cleanup API index.js, and add docs
- all API methods take consistent arguments: object & options
- browse, read, destroy take options, edit and add take object and options
- the context is passed as part of options, meaning no more .call
  everywhere
- destroy expects an object, rather than an id all the way down to the model layer
- route params such as :id, :slug, and :key are passed as an option & used
  to perform reads, updates and deletes where possible - settings / themes
  may need work here still
- HTTP posts api can find a post by slug
- Add API utils for checkData
2014-05-15 10:41:05 +01:00
Hannah Wolfe
692573a241 Merge pull request #2735 from shindakun/tag404
Display 404 page if tag does not exist.
2014-05-14 16:32:18 +01:00
Hannah Wolfe
4c0010db45 Merge pull request #2673 from halfdan/2592-tags-api
Implements new Themes JSON API
2014-05-14 16:31:36 +01:00
Sebastian Gierlinger
d1149a927b Fix validation
- fixed validation that broke when introducing error classes
- added a test
2014-05-14 15:30:46 +02:00
Fabian Becker
628654961a Implements new Themes JSON API
closes #2592
- Add themes browse/read endpoint
- Add new permissions for themes (only admin by default)
- Add integration tests
2014-05-14 11:23:42 +02:00
Gabor Javorszky
24190a186e Move mail api to json/api format
Fixes #2650
* rerouted all mail sending to api/mail
* changed request and response formats to json/api-like structure
* tested with forgotten password and new blog email
2014-05-13 17:34:37 +01:00
Jason Williams
414890f263 Ensure settings values are strings before saving
closes #2736
-reintroduces JSON.stringify for non-string values in
 api.settings.edit
-added a regression test
2014-05-13 05:36:18 +00:00
Steve
eb2fdc44fb Display 404 page if tag does not exist.
closes #2667
- if tag result is '' 404 instead of rendering an empty page
- added test for /tag/asdf should 404
2014-05-12 11:30:08 -07:00
Hannah Wolfe
10759ed45a Merge pull request #2733 from jaswilli/test-error
Fix intermittent image upload modal failures
2014-05-12 10:27:15 +01:00
Jason Williams
0d7a935855 Fix intermittent image upload modal failures
ref #1702
-wait for logo upload modal to go away before beginning test
 for cover upload modal
2014-05-12 02:31:20 +00:00
Jason Williams
ef1bc05422 Another adjustment to handle timing issue on tests
ref #1702
-timing issue with the test still exists in #2729 since
 .description is added to the dom after the fact via js
2014-05-11 19:25:48 +00:00
Jason Williams
e3c3c2ab30 Adjust test to handle timing issue on upload modal
ref #1702
-change the tests for the cover and logo image upload modal to
 handle a timing issue in the way they are rendered
2014-05-11 18:31:48 +00:00
Sebastian Gierlinger
fd0f5a5028 Add distinct error classes
closes #2690
- added new error classes
- moved errorhandling.js to /errors/index.js
- changed API errors to use new classes
- updated tests
2014-05-09 12:11:29 +02:00
Hannah Wolfe
896be9119f Cleaning up settings functional tests
ref #1702

- All the tests need cleaning up a bit, but these ones are failing
  regularly and I'd like to get to the bottom of it.
2014-05-08 12:09:32 +01:00
David Arvelo
2d783ac3d4 DB API returns JSON-API compatible objects. Export triggers 'Save As' dialog.
closes #2647
- GET method returns { db: [exportedData] }
- POST, DELETE methods return { db: [] }
- 'delete all content' test updated
- Attach 'Content-Disposition' header on DB export for 'Save As' browser dialog
- Add DB API functional test for Export
2014-05-07 19:05:09 -04:00
Hannah Wolfe
d1f57a2569 Merge branch 'ember'
Conflicts:
	Gruntfile.js
	core/client/models/post.js
	core/client/models/settings.js
	core/client/models/user.js
	core/client/router.js
	package.json
2014-05-07 22:28:29 +01:00
Jacob Gable
298077582b ACL and strict rules for Settings API
Ref #2061

- Add canThis permission checks to settings api calls
- Add strict rules about accessing core settings without internal: true
- Omit core settings in browse() call unless internal: true
- Update unit tests to call api.settings with contexts
- Add a couple unit tests for new scenarios
- Update all api.settings calls in the app to call with internal context
- Re-arrange permissions.init in server startup so config.theme.update
can access settings without permissions error
2014-05-07 10:56:03 -05:00
Fabian Becker
2795e723e1 Move to new API format for Settings.
refs #2606
- Use new API format when updating settings from the client side
- Add additional test to test new API format
- Adjust functional tests to work with the new format
2014-05-06 19:02:55 +00:00
Hannah Wolfe
31fc84cefb Consistency in model method naming
- The API has the BREAD naming for methods
- The model now has findAll, findOne, findPage (where needed), edit, add and destroy, meaning it is similar but with a bit more flexibility
- browse, read, update, create, and delete, which were effectively just aliases, have all been removed.
- added jsDoc for the model methods
2014-05-06 00:36:42 +01:00
Fabian Becker
2a803aecdd Proper endpoints for persistent notifications
closes #2637
- Add new get API route for all notifications
- Wrap API responses to comply with JSON-API
- Add new tests / adjust fixtures
- Adjust all occurences of passive notifications
2014-05-06 00:05:14 +02:00
cobbspur
b201b06e56 updated error handling on all mocha tests
- switch to using catch
- added error handling where missing
2014-05-05 21:58:58 +01:00
Sebastian Gierlinger
39e654e9c3 Change error message response
closes #2643
- added error type
- added error property for validations
- wrapped errors in an array
- returns multiple errors for validation
- updated tests and admin
2014-05-05 15:51:21 +02:00
Jason Williams
d0931aa455 Add location header to response when new object is created
closes #2635
- add new logic to the api request handler to set a location header
  when new objects are created
- added an api context to config.urlFor() to return the root url
- added functional tests for the affected routes
2014-05-04 14:52:01 +00:00
Jason Williams
4d41e12c02 Adjust update check to handle changes in API calls
closes #2681
- fixed api calls and response parsing
- added a test to for update check
- adjusted gruntfile.js to run new update check integration test
2014-05-04 01:36:00 +00:00
lennerd
66a046b00b Return new tags when posts are created via API
closes #2680
- added include options when adding a post
- added functional and integrational tests
2014-05-03 19:24:11 +02:00
Hannah Wolfe
0c252fb687 Gruntfile Cleanup & Documentation
refs #2622, refs #1340

- added documentation to grunt tasks which will replace the wiki page, including reordering the tasks to make the documentation easier to read
- removed grunt changelog which is no longer used
- merged jshint:shared into jshint:server
- cleanup of quote marks, formatting, line lengths etc
- also fixed the incorrect version number for grunt-docker
- added route tests to coverage
2014-05-03 17:59:50 +01:00
Hannah Wolfe
f2071eedb2 Move user API to primary document format
closes #2593

- added new format to user API methods
- changed all places where the user api was used
- updated tests and added more coverage
- little bit of cleanup in utils/api
2014-05-02 20:50:44 +01:00
Hannah Wolfe
ebdbf8a7aa Merge pull request #2661 from jgable/settingsPrimaryDocument
Settings API Primary Document refactor
2014-05-02 15:55:31 +01:00
Hannah Wolfe
94ed8a5cea Merge pull request #2670 from jaswilli/issue-2628
Redirect from admin editor to frontend post view
2014-05-02 14:59:24 +01:00
Jason Williams
c1bddf4182 Add functional test for markdown help modal in editor
closes #2273
2014-05-02 00:41:46 +00:00
Jacob Gable
7e9880ce8d Settings API Primary Document refactor
Closes #2606

- Refactor settings api responses to { settings: [ ] } format
- Update all code using api.settings to handle new response format
- Update test stubs to return new format
- Update client site settings model to parse new format into one object of key/value pairs
- Refactor to include all setting values
- Remove unused settingsCollection method
- Update settingsCache to store all attributes
- Update settingsResult to send all attributes
- Remove unnecessary when() wraps
- Reject if editing a setting that doesn't exist
- Reject earlier if setting key is empty
- Update tests with new error messages
- Use setting.add instead of edit that was incorrectly adding
- Update importer to properly import activePlugins and installedPlugins
- Update expected setting result fields
- Fix a weird situation where hasOwnProperty didn't exist 🤷
2014-04-30 23:15:27 -05:00
Jason Williams
4b46d85c26 Redirect from admin editor to frontend post view
closes #2628
- added /view/ route to the editor. if /view/ is appended to
  the url of a post being edited a redirect to the frontend
  will occur
- updated controller to check for /view/ and built the
  correct url for the post
- added test for the new route
2014-05-01 01:50:24 +00:00