Commit Graph

21 Commits

Author SHA1 Message Date
Kevin Ansfield
bd87ee3e2a Refactored delete custom integration modal
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-08 09:18:48 +01:00
Sanne de Vries
be0fb41636 Updated webhook actions to dotdotdot menu 2022-07-12 13:38:51 +01:00
Kevin Ansfield
b123b297b6 Improved test settings fixtures
no issue

- the settings fixtures file was becoming hard to use because settings have been appended to it on an as-used basis which meant it was difficult to reason about the base-state in acceptance tests and was never really in sync with the default settings state for a Ghost site
- added a utility function to create a settings object with the `id` defined to avoid problems with manually updating the ids in the list
- updated to include all default settings with their default values if not already set to a specific testing value in the old fixtures
2022-05-30 14:09:29 +01:00
Kevin Ansfield
d1e7ccbe00 🐛 Fixed saving of custom integrations
closes https://github.com/TryGhost/Ghost/pull/14183
refs 3ee0c3ff53

- unskipped test for integration saving
- fixed missed rename from `save` to `saveTask`
- fixed `saveTask` throwing from a "handled" validation error
2022-02-21 17:54:47 +00:00
Peter Zimon
d5018cbb3a Fix tests 2022-02-02 10:57:34 +01:00
Kevin Ansfield
57b1ab4800 Ran ember-cli-update --run-codemods (#2219)
no issue

- part of ember upgrades
- removed all unnecessary usage of `.get`
- cleaned up imports where we had imports from the same module across multiple lines
- standardized on importing specific computed helpers rather than using `computed.foo`
- switched tests from using `wait()` to `settled()`
2022-01-21 19:25:47 +00:00
Kevin Ansfield
683a8584ce Refactored away CurrentUserSettings mixin (#2200)
no issue

Mixins are deprecated in Ember so we want to remove their usage. The `CurrentUserSettings` mixin was used in Route files to provide `transitionAuthor()` (that also transitions contributors) and `transitionEditor()` methods so the the consuming route could use them to prevent access to authors/editors. In practice the only reason this was used was to prevent access to admin-only routes.

- added an `AdminRoute` class that inherits from our `AuthenticatedRoute` class
  - when any route inherits from this class it will only allow access to admins and owners, any other user will be redirected to the home screen (dashboard or site depending on permissions)
- updated all of our admin-only routes to use the new `AdminRoute`
  - allowed for removal of `CurrentUserSettings` mixin usage
  - allowed for `beforeModel()` hooks to be removed from consuming routes in many cases
  - some admin-only routes were extending/inheriting directly from Ember's `Route` based on the assumption that the router hierarchy would have a parent route perform the redirect. Those have also been switched to `AdminRoute` for consistency and to prevent accidentally making them available if the router hierarchy changes
  - `/#/settings` does not use the `AdminRoute` so that it can redirect to the current user's setting page for non-admin users
- removed `CurrentUserSettings` mixin file
- cleaned up unnecessary computed property and function used for redirect-when-disabled in the Zapier route
2022-01-17 10:05:27 +00:00
Peter Zimon
e5b6db173c Removed obsolete integration files
- removed unused integration files (was restructured under Settings / integrations)
- removed unused routes
2021-11-05 13:42:38 +01:00
Peter Zimon
9568f703c3 Fixed staff tests
- fixed all staff related tests after Admin route restructure
2021-11-04 09:40:24 +01:00
Peter Zimon
04d9caefed Updated navigation (#1832)
no issue

Updated settings navigation to a completely redesigned flow for Ghost 4.0 🎉

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-02-02 16:08:06 +00:00
Kevin Ansfield
27c4459334 Updated for breaking changes in ember-cli-mirage@1.0.0 2019-05-27 09:58:33 +01:00
Kevin Ansfield
0dd2aa7946 Fixed custom integrations acceptance test 2019-03-19 12:07:41 +00:00
Kevin Ansfield
779a6aba18 Fixed custom integrations acceptance test 2019-02-26 15:22:04 +07:00
Kevin Ansfield
6e5bcd68e6 Updated config service to use new /site/ and /config/ endpoints 2019-02-25 21:47:17 +07:00
Kevin Ansfield
98d06c4cbd Fixed custom integration test in Travis 2019-02-23 18:20:24 +07:00
Kevin Ansfield
9e3974a93d Fixed integration acceptance test 2019-02-23 17:57:17 +07:00
Peter Zimon
605b89a0d2 Left navigation menu update (#1102)
refs. [d6c22df](d6c22df6d7)

- added icons for members and pages
- improved view site link visibility
- added view site to logo dropdown
- updated all navigation and logo menu icons
- rename 'team' to 'staff'
- lots of design refinement and update (colors, shadows)
2019-02-22 16:43:35 +07:00
Kevin Ansfield
73daa80b7f Migrate to latest ember, ember-mocha and modern ember testing (#1044)
no issue
- upgrade to latest `ember-source` and related dependencies including `ember-cli`
- upgrade to latest `ember-mocha` and modern ember testing setup
    - https://github.com/emberjs/rfcs/blob/master/text/0268-acceptance-testing-refactor.md
    - switch from using global acceptance test helpers and `native-dom-helpers` to using the new `ember-test-helpers` methods
    - use [`chai-dom`](https://github.com/nathanboktae/chai-dom) assertions where in some places (still a lot of places in the tests that could use these)
- pin `ember-in-viewport` to 3.0.x to work around incompatibilities between different versions used in `ember-light-table`, `ember-infinity`, and `ember-sticky-element`
    - incompatibilities manifested as "Invalid value used as weak map key" errors thrown when using `ember-light-table` (subscribers screen)
- pin `ember-power-datepicker` to unreleased version that contains a move from global acceptance test helpers to modern test helpers
2019-01-02 09:58:55 +00:00
Kevin Ansfield
c33edbac08 Fixed webhook modal title showing "New webhook" when editing a webhook
refs https://github.com/TryGhost/Ghost/issues/10137
- adjust modal title depending on `webhook.isNew` state
- add acceptance tests for modal creation
- add missing mirage webhook factory
- mock integrations/api-keys/webhooks in test env rather than development
2018-11-12 16:31:47 +00:00
Kevin Ansfield
5047b9f3d7 Added initial custom integrations UI (#1051)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942

- `integration`, `api-key`, and `webhook` models and respective mirage mocks
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- adds custom integrations list to integrations screen
- adds custom integration screen
  - allow editing of integration details
  - show list of webhooks
  - webhook creation modal

NB: the `enableDeveloperExperiments` flag needs to be enabled in the `config.development.json` file for the custom integrations UI to be displayed until it's out of development.
2018-10-18 00:18:29 +01:00
Kevin Ansfield
6dfafdc801 Renamed Apps to Integrations (#1050)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942
- Apps are becoming Integrations that cover the existing built-in integrations as well as new custom integrations
- custom Integrations will comprise of API keys for the Admin and Content APIs and custom-registered webhooks
2018-10-04 11:02:36 +01:00