Commit Graph

8 Commits

Author SHA1 Message Date
Kevin Ansfield
c4c48d4104 Resolved ember-cli-mirage import deprecations
refs https://github.com/TryGhost/Admin/pull/2209

- `miragejs` has been extracted to a framework-independent library, the re-exports of `miragejs` elements in `ember-cli-mirage` have been deprecated making our test logs very noisy
- added `miragejs` as a top-level dependency
- updated all relevant imports to pull from `miragejs` instead of `ember-cli-mirage`
2022-03-08 11:32:01 +00:00
Kevin Ansfield
6b6f220300 Fixed tests
no issue

- added basic products mocked endpoint
- fixed error when extracting filter param when filter is empty
2021-05-10 21:02:54 +01:00
Kevin Ansfield
72590083f3 Added ability to bulk delete members by label or status (#1883)
refs https://github.com/TryGhost/Team/issues/585
requires https://github.com/TryGhost/Ghost/pull/12082

When a label or status filter is selected on the members screen show a "Delete selected" option in the actions dropdown. Bulk deleted members will _not_ have any subscription data modified in Stripe, if a member should be deleted and have their subscription cancelled it's necessary to do that on a per-member basis.

- updated bulk delete handling to match API
- added link to bulk delete confirmation modal in members actions dropdown (only shown when label, status, or search is used)
- updated testing framework for members
  - added label factory for easier test setup
  - updated `GET /members` and `DEL /members` endpoints to work with label filters
  - updated test selectors for easier reference in tests
2021-04-08 12:06:27 +01:00
Kevin Ansfield
d0a834b477 🐛 Fixed missing error notification when attempting to activate an invalid theme
no issue
- updates error handling to work with new v2 error response formats
  - `.errorType` -> `.error`
  - `.errorDetails` -> `.details`
2019-03-25 11:32:29 +00:00
Kevin Ansfield
f015eeb430 Fixed mirage not respecting ?limit=all queries
no issue
- the `paginatedResponse` helper util tries to convert strings to integers but had no logic for handling `'all'` so it would always default to 15 in that case
2018-11-07 17:07:55 +00:00
Kevin Ansfield
6a3cfc2ca8 Use token input to allow selection of multiple authors in PSM
requires https://github.com/TryGhost/Ghost/pull/9426
- fixed default token component display in {{gh-token-input}}
    - if no `tokenComponent` is passed to `{{gh-token-input}}` then it should default to the ember-drag-drop `draggable-object` component but instead it didn't output anything
    - put `draggable-object` in quotes because `{{component}}` needs a component name rather than an object
    - rename `option` attribute to `content` to match the default `{{draggable-object}}` interface
- add embedded `authors` attr to the Post model
    - ensure authors is populated when starting new post
    - add validation for empty authors list
- swap author dropdown for a token input in PSM
- show all post authors in posts list
- update tests for `authors`
  - always provide through an authors array
  - fix mirage serialisation for paginated responses (embedded records were not being serialised)
- unify tags and author inputs design
  - remove highlight of primary tags
  - highlight internal tags
  - remove unnecessary/redundant title attributes on tags
  - use SVG icon for "remove option" button in token inputs
2018-03-27 18:50:52 +01:00
Kevin Ansfield
c16d633d4b New content screen prototype (#503)
refs https://github.com/TryGhost/Ghost/issues/7860

- remove preview pane from content screen
- add basic post status filters
- replace custom infinite scroll with ember-infinity and increase trigger threshold for improved scroll behaviour

Commits:
* basic content list + filter using existing infinite scroll and pagination
* swap our custom pagination + infinite loader for `ember-infinity`
* minor cleanups
* reset scroll position when changing filter
* fix tests
* remove client-side sorting step as we no longer have a live collection
* remove unused `mobile-index-route`
* add acceptance tests for content screen filters
2017-01-25 21:05:28 +01:00
Austin Burdine
52b6668955 deps: ember-cli-mirage@0.2.0
- remove lodash from bower
- move all resources to /mirage instead of /app/mirage
- update endpoints to use ORM
- general cleanup
2017-01-13 15:59:37 +00:00