1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

285 commits

Author SHA1 Message Date
Kevin Ansfield c7458b2160 deps: ember-suave@2.0.1
no issue
- https://github.com/DockYard/ember-suave/releases/tag/v2.0.0
- fix linting errors arising from new rules
2016-04-08 16:27:24 +01:00
Kevin Ansfield 39a175108b Replace jQuery-based uploader.js with ember components
no issue
- adds `gh-image-uploader` that handles image uploads in a fully ember fashion and with no dependency on `uploader.js`
- adds `gh-image-uploader-with-preview` that can fully replace the old `gh-uploader`
- replace uses of `gh-uploader` in PSM & TSM with `gh-image-uploader-with-preview`
- updates the editor preview image handling to use the new `gh-image-uploader-with-preview` component
- updates the image upload modal to use `gh-image-uploader` (utilises the `saveButton=false` flag which means the preview has to be handled externally to avoid auto-replacement when typing a URL)
- removes all old `uploader.js` related code
- adds custom `RequestEntityTooLargeError` and `UnsupportedMediaTypeError` errors to our `ajax` service
2016-04-05 12:03:20 +01:00
David Balderston ebbb22a8f5 Remove Nav Item Placeholder and Set as Base Url Value
Closes #6440

* Removed the `.fake-placeholder`class from the input, test, and css
* On adding a nav item, if the url value has not been set by the user,
then set it to the base url as shown in the input
* If url has been set by the user, just do what it has always done
2016-03-22 07:11:20 -07:00
Austin Burdine 8061b71e9f add signin acceptance test
refs #6039
2016-02-16 23:08:24 -06:00
Kevin Ansfield 3d51161002 Merge pull request #6486 from acburdine/code-injection-test
Add settings/code-injection acceptance test
2016-02-15 11:07:01 +00:00
Kevin Ansfield a3c00f0071 Merge pull request #6488 from acburdine/labs-test
Add settings/labs acceptance test
2016-02-15 11:05:29 +00:00
Austin Burdine 71c72c386d improve 404 error handling in post route
closes #6503
- change post route 404 handling to match that of the editor and tag routes
- fix 404 tests
2016-02-14 16:49:57 -06:00
Hannah Wolfe 971afd9042 Merge pull request #6468 from kevinansfield/ember-sortable-nav-items
Replace jquery-ui.sortable with ember-sortable for nav items
2016-02-14 13:44:07 +00:00
Austin Burdine 6e4bea2b9d add settings/labs acceptance test
refs #6039
2016-02-11 09:19:04 -06:00
Austin Burdine 65148f08b3 add settings/code-injection acceptance test
refs #6039
2016-02-11 09:05:48 -06:00
Austin Burdine cd1c8dc743 Add settings/general acceptance test
refs #6039
- adds acceptance tests for settings/general flows
- fixes up mirage settings fixtures
2016-02-11 06:06:38 -06:00
Kevin Ansfield 8aaf2e1356 Replace jquery-ui.sortable with ember-sortable for nav items
refs #6458, closes #6457
- replaces jquery-ui.sortable with ember-sortable for drag-n-drop handling
- moves the "new/blank" nav item out of the nav items list
  - allows it to be excluded from the draggable list
  - cleans up handling of the `navigationItems` array as there's no longer a need to ignore/exclude this extra item
- clears validation errors when typing in the respective field
- adds acceptance test for adding/removing nav items
- improves acceptance test for saving nav items to cover more edge cases
2016-02-09 22:08:21 +00:00
Kevin Ansfield e6bbe22573 Test client using real browsers on Travis
no issue
- drop phantomjs tests both locally and on Travis
- instruct Travis to install latest Chrome and Firefox
- start an X server when running the client tests on Travis
- update testem config to start Chrome and Firefox in both local and CI tests
- fix testing preview sizing in Firefox as it doesn't support `zoom: 50%` style
- improve infinite scroll testing to be more reliable
- fix post acceptance test to handle both mobile and desktop views
2016-02-08 16:10:40 +00:00
Austin Burdine dbf7943391 fix 404 acceptance tests 2016-02-05 06:16:29 -06:00
Kevin Ansfield f01b4bad30 Merge pull request #6392 from kevinkucharczyk/post-invalid-id-404
Fix posts.post route not redirecting to 404
2016-02-03 17:04:48 +00:00
Kevin Ansfield 53b798d466 Acceptance tests for password reset flow on signin screen
refs #6039
- adds `/authentication/passwordreset` endpoint to mirage config
- tests the "Forgot?" link behaviour on the signin form

NB: This will fail until #6425 is merged as this tests the correct behaviour rather than the currently broken behaviour ;-)
2016-02-02 12:22:41 +00:00
Kevin P. Kucharczyk edc52ed65b Fix posts.post route not redirecting to 404
closes #6385
- redirect to 404 when post is not found
- replace replaceRoute calls with replaceWith calls in routes (replaceRoute is only available on controllers)
- add post mirage factory
- add acceptance test for post 404 redirection
2016-01-26 15:25:53 +01:00
Kevin Ansfield eb127990f1 Fix 401 error when uploading images
closes #6377
- restores ajax prefilter initializer that was removed in #6243
- adds regression test for standard `$.ajax` requests sending Authorization header

This can be removed once we no longer have jquery plugins that make internal ajax calls that don't go through ember-ajax.
2016-01-25 11:11:29 +00:00
Kevin Ansfield 97bb577496 Refactor modals
refs #5798, closes #5018
- adds new `gh-fullscreen-modal` component - modals are now specified in-context so that they can have deeper interaction with their surrounding components/controller/route, i.e. a modal component can be a thin confirm/deny wrapper over the underlying controller action keeping all context-sensitive logic in one place
- adds spin-buttons to all modals with async behaviour
- adds/improves behaviour of inline-validation in modals
- improves re-authenticate modal to properly handle validation and authentication errors
2016-01-12 20:53:08 +00:00
Kevin Ansfield 21c7274a3b Fill in pending tests setup acceptance tests
refs #6039
- test the sad paths in the setup process
2016-01-05 17:03:22 +00:00
Austin Burdine 1822afcaf7 add team acceptance test 2015-12-06 15:24:06 -06:00
Austin Burdine 26018c43d3 fix 404 error handling in editor, tags, and team routes
closes #6094
- adds 404-handler mixin
- applies mixin to settings/tags/tag, editor/edit and team/user routes
- adds adapter-error test helper to override the default adapter error
2015-12-03 16:37:23 -06:00
Austin Burdine 0e04b62640 deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06:00
Kevin Ansfield 7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Kevin Ansfield 21fc4662ff Display error message on setup if origin doesn't match config.js url
refs #6106
- add error handler for authentication step of blog setup
- move setup acceptance test out of 'settings' folder
2015-11-26 11:22:16 +00:00
Kevin Ansfield 1e73e8c678 Add acceptance test for setup flow happy-path
refs #6039
- add `jquery-deparam` ember testing dependency for use in mirage config
- setup necessary mirage fixtures & endpoints for successful testing of setup flow's happy-path
- add happy-path acceptance test for setup flow
2015-11-15 11:51:19 +00:00
Kevin Ansfield 7db0ffbda2 Fix auth regressions after ESA 1.0 upgrade
refs #6039, closes #6047, closes #6048

- delete old/unused fixtures file
- add failing tests for #6047 & #6048
- redirect to sign-in if we get a 401 when making an API request
- fix incorrect `this.notifications` call in tag controller
- raise `authorizationFailed` action in application route's `sessionInvalidated` hook so that it can be handled by leaf routes (fixes re-auth modal display)
- close "saving failed" alert when successfully re-authenticated
- adds a "window-proxy" util so that we can override `window.*` operations in tests
- fix `gh-selectize` attempting to register event handlers when the component has already been destroyed
2015-11-12 12:56:27 +00:00
Kevin Ansfield d98ad41008 Set up ember-cli-mirage and update existing acceptance tests
refs #6039
- adds ember-cli-mirage dependency
- sets up mirage to match our API endpoints and responses
- adds fixture data for settings that are always present for all blogs
- converts existing acceptance tests to use mirage
2015-11-03 15:35:58 +00:00
Kevin Ansfield 8357361aec Use tag slugs in URLs for tag management and add front-end edit redirect
refs #5845
- adds custom adapter for tags so that `store.queryRecord('tag', {slug: 'tag-slug'})` hits the `/tags/slug/tag-slug` endpoint instead of `/tags/?slug=tag-slug`
- updates tag management screens to use tag slugs instead of IDs
- adds `/tag/:slug/edit` redirect to front-end
2015-11-02 14:56:59 +00:00
Kevin Ansfield 4ecdf182e6 Routable tags
refs #5845
- Updates tag settings screen to match content screen behaviour. Each now tag has it's own route that is link-able from other areas of the app
- Updates a number of places where jQuery event handler code was not wrapped in Ember's run loop
2015-10-27 12:48:41 +00:00
Austin Burdine 031a129f0b deps: ember-simple-auth@1.0.0
closes #5951
- update to esa 1.0
2015-10-18 13:17:02 -05:00
Hannah Wolfe be9bdbadb1 Merge pull request #5928 from kevinansfield/notification-keys
Prevent duplicate alerts and clear on login
2015-10-14 17:24:17 +01:00
Kevin Ansfield d162055df3 Fix random ember test failures
no issue
- increases the timeout because acceptance tests sometimes hit the limit which then caused a knock-on effect through other tests
- fix settings/navigation acceptance tests where it picked up previous test failure error messages
- fix user model unit tests so that `expect` is always called _after_ the runloop has finished handling property updates
2015-10-14 11:26:21 +01:00
Kevin Ansfield 3e6f5edc27 deps: grunt-jscs@2.1.0
no issue
- update grunt-jscs dependency
- fix deprecated `validateJSDoc` configuration
- fix numerous linting errors, including:
  - use of future-reserved `public` and `private` variable names
  - use of `[]` instead of dot-notation (especially `express['static']` and `cacheRules['x']`)
  - extra spaces in `const { run } = Ember` style constructs

One issue that did become apparent is that there are conflicting rules that prevent the use of object function shorthand such that both of these:

```
{ myFunc() {} }
{ myFunc () {} }
```

are called out due to either the missing or the extra space before the `(`
2015-10-12 19:21:16 +01:00
Kevin Ansfield 04d4c2bbad Fix unsaved nav settings persisting across transitions
closes #5852
- resets navigation settings controller's model when transitioning away
- fixes `locationType` config setting so acceptance tests don't mess with the URL
- configure the ephemeral session store for ember-simple-auth during tests
- adds dummy env-config meta fields so acceptance tests don't fail
- adds `ember-cli-simple-auth-testing` dependency for auth testing helpers
- adds Pretender dependency to mock API requests for acceptance tests
2015-10-07 15:57:14 +01:00