Commit Graph

1006 Commits

Author SHA1 Message Date
Ronald Langeveld
38174e0fd4 Added newsletters filter admin test
ref https://github.com/TryGhost/Team/issues/2012

- Added missing test for filtering members from specific newsletters
2023-01-11 14:49:23 +08:00
Elena Baidakova
69d4a96fb8
🎨 Add ability to send test email with chosen newsletter (#15783)
closes TryGhost/Team#1897

-
[Design](https://www.figma.com/file/RpEbPA7H7VHLtXjt3YyB2t/Multiple-Newsletters-Preview?node-id=0%3A1&t=YkDXy063OkCrAI4a-0)
-
[Discussion](https://ghost.slack.com/archives/C019B1K4FAM/p1667924062808939)
2023-01-09 17:48:30 +04:00
Kevin Ansfield
ea9c8c03fe
Update dependency ember-template-lint to v5.3.0 (#16062)
refs https://github.com/TryGhost/Ghost/pull/15550

Pulled out of the rolled up node+ember-js+ember-template rollup linter update PR as it required fairly extensive changes.

- bumped package
- renamed `no-down-event-binding` to `no-pointer-down-event-binding`
- disabled `no-pointer-down-event-binding` rule
- disabled `no-triple-curlies` rule
- ran `yarn lint:hbs --fix`
- updated integration tests to match Octane syntax
- fixed various one-off errors
- updated .lint-todo
2023-01-04 09:39:32 +00:00
Kevin Ansfield
c3487fea41 Refactored <GhBenefitItem>
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated component to Glimmer
- swapped usage of `ValidationState` mixin for `{{validation-status}}` modifier
  - updated modifier to accept custom error/success classes
- removed unnecessary/unused code in the `gh-benefit-item.js` backing class
2022-12-14 11:57:54 +00:00
Kevin Ansfield
9fd87f565d Migrated <GhValidationStatusContainer> to {{validation-status}} modifier
no issue

- moved logic from `<GhValidationStatusContainer>` to a new `validation-status` modifier
  - removes a usage of the `ValidationState` mixin
  - migrated uses of the component to a mixin
  - paves the way for full removal of the `ValidationState` mixin in later refactors (mixins are deprecated)
- migrated `<GhFormGroup>` to a glimmer component
  - swapped the extend of `GhValidationStatusContainer` to usage of the `validation-status` modifier with a template-only component
  - updated all `<GhFormGroup>` to use the standard `class=""` instead of `@classNames=""` and `@class=""`
  - allows `data-test-*` attributes to be added to uses of `<FormGroup>` to help when complex components are grouped as a form input
2022-12-09 12:38:35 +00:00
Simon Backx
b615c9f7d2
Added post scheduling Playwright test and loosened time restrictions (#15960)
refs https://github.com/TryGhost/Team/issues/2371

- Adds a test that schedules a post 5 seconds in the future and waits
for it to be published
- Reduced the time restrictions for scheduling: 
    - The minimum time in the frontend is now 5 seconds in the future (came
from 5 minutes in the future)
    - The time picker now suggests 10 minutes in the future instead of the
minimum scheduling time (came from 5 minutes)
    - In the backend, a post will be allowed to be scheduled if it is at
least 2 minutes in the past (came from 2 minutes in the future)
    - The scheduler will publish a post if it is at least 5 minutes in the
past, and maximum 5 minutes in the future (came from 2 minutes)
2022-12-07 17:29:36 +01:00
Kevin Ansfield
3817f583fa 🐛 Fixed unexpected "unsaved changes" modal when deleting a member
closes https://github.com/TryGhost/Team/issues/2275

When deleting a member, after confirming deletion another "unsaved changes" modal popped up. From that point, if you clicked to stay you remained on the member screen with stale data (the member was still deleted) resulting in further errors when any attempt to make changes was made.

- prevented the unsaved changes check running for a deleted member because it would always return `true` in that case
- ensured the data setup for the unsaved changes check still occurs when a member is accessed directly via the URL
  - previously it was skipped because the data setup only occurred inside `fetchMemberTask` but that isn't called when the route already loaded the model via it's `model()` hook
2022-12-05 11:48:37 +00:00
Elena Baidakova
95c3a68c34
Updated the filter naming in Post Analytics (#15898)
closes TryGhost/Team#2329
- Replace 'Received' on 'Sent' in member's filter
- Moved links for feedback analytics from chart to table
2022-11-30 17:39:37 +04:00
Hannah Wolfe
e4dbf9b0fd Updated error fallbacks to generic error message
refs: https://github.com/TryGhost/Team/issues/1121

- We've decided on one  preferred message for unexpected errors
- We want to use this everywhere where we don't know what to display
- We now have a GENERIC_ERROR_MESSAGE constant that we should use
2022-11-23 21:49:40 +00:00
Hannah Wolfe
c740eecaec Fixed duplicate error messages from API
refs: https://github.com/TryGhost/Team/issues/1121

- In certain cases our API sends the same data for message and context.
- We will also fix this server-side, but we should also be smart in the UI and not show duplicate info
2022-11-23 15:56:58 +00:00
Ronald Langeveld
08232bd538
Cleaned up GA Flags (#15762)
closes https://github.com/TryGhost/Team/issues/2126

- Cleaned up the following GA flags: `newsletterPaywall`, `freeTrial`, `compExpiring`, `searchHelper`, `emailAlerts`, `fixNewsletterLinks`.
2022-11-18 16:09:25 +07:00
Hannah Wolfe
dfffa309a8
Improved member importer error handling (#15843)
refs: https://github.com/TryGhost/Team/issues/1121

- This makes several key changes to the way errors are handled in the member importer, to ensure that we only show error messages to users that we wrote.
- Fundamentally, we no longer trust all API errors, and instead only trust a set of very specific API errors. Anything outside of that is replaced with a generic error message.
- Also switches the server-side error generated for email verification (which can throw during member import) to be a HostLimitError, as that is a more appropriate class.
- Note: there are many other parts of Ghost admin that need a similar overhaul, and a similar change we need to introduce server side to fully resolve the underlying issue of bubbling up code errors to the UI.
2022-11-17 19:41:39 +00:00
Kevin Ansfield
332dd4fbf1 Switched editor re-authenticate modal to new modal pattern
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
- simplified unauthed save behaviour because we now have a promise for the modal enabling us to wait for the modal to close before continuing
2022-11-14 09:55:34 +00:00
Simon Backx
7c3d75ade7
🐛 Fixed pasting newlines in post titles (#15794)
fixes https://github.com/TryGhost/Team/issues/2193

- When pasting a title with a newline, we now trim the string and clear newslines before pasting.
- When sending the slug to the backend to generate a unique slug, we now sluggify it in the frontend before adding it to the URL to prevent issues with unsupported characters (causing possible routing problems in Pro).
2022-11-10 14:43:15 +01:00
Elena Baidakova
b526c4b719
Add tests to tabs and events pagination (#15757)
closes TryGhost/Team#2128
2022-11-07 16:32:06 +04:00
Kevin Ansfield
9bdb25d184
Fixed hosting management screen not loading after sign-in process (#15763)
refs https://github.com/TryGhost/Team/issues/2110

- dynamically defined properties on the config service did not have
autotracking set up properly if they were accessed in any way before the
property was defined, this caused problems in a number of areas because
we have both "unauthed" and "authed" sets of config and when not logged
in we had parts of the app checking for authed config properties that
don't exist until after sign-in and subsequent config re-fetch
- renamed `config` service to `configManager` and updated to only
contain methods for fetching config data
- added a `config` instance initializer that sets up a `TrackedObject`
instance with some custom properties/methods and registers it on
`config:main`
- uses application instance initializer rather than a standard
initializer because standard initializers are only called once when
setting up the test suite so we'd end up with config leaking across
tests
- added an `@inject` decorator that when used takes the property name
and injects whatever is registered at `${propertyName}:main`, this
allows us to use dependency injection for any object rather than just
services or controllers
- using `application.inject()` in the initializer was initially used but
that only works for objects that extend from `EmberObject`, the
injections weren't available in native-class glimmer components so this
decorator keeps the injection syntax consistent
  - swapped all `@service config` uses to `@inject config`
2022-11-03 11:14:36 +00:00
Kevin Ansfield
d1a061e5a7
🐛 Fixed comped subscription duration drop-down sometimes not being visible (#15764)
closes https://github.com/TryGhost/Team/issues/2110

- added failing test showing feature service `@feature` properties
weren't autotracking correctly if accessed before
authentication+settings fetch occurs
- shows labs and feature properties on the feature service are not
reacting to changes in the settings service
- removing the `@computed` on the `feature.labs` getter stops it being
cached but it then fails on the `feature.testFlag` computed property
- updated `settings` service to behave as expected with our current
version of Ember
- inspected the store schema for `Setting` to define the "proxied"
properties up-front rather than only after fetching
- updated the property definition to use `computed` so we're opting in
to the old style reactivity (required adding the `@classic` decorator to
pass linting)
2022-11-03 10:08:48 +00:00
Kevin Ansfield
2d2ac0102a Refactored signin controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to native class syntax and glimmer component patterns
- removed use of jQuery, the workaround to trigger change events no longer appears necessary
2022-11-01 14:12:23 +00:00
Kevin Ansfield
b272b34a44 Fixed linter error 2022-10-31 12:12:58 +00:00
Kevin Ansfield
5bf3fe9cb8 🐛 Fixed error preventing admin area being usable by staff users with Contributor role
closes https://github.com/TryGhost/Team/issues/2190

- added a guard around the tier fetches in `membersUtils` service so the fetch doesn't occur unless we have a logged in user and they aren't a contributor
- extracted the `withPermissionsCheck` mirage util function and added role checks around the mocked tiers endpoints
- added an acceptance test that loads the content screen and creates a draft post as a contributor to help catch regressions
2022-10-31 12:01:39 +00:00
Rishabh Garg
d10d4390f0
Removed duplicate newsletter tracking settings (#15717)
refs cca0f7d7dc

- newsletter tracking setting has now moved to analytics settings page. the duplicate settings on newsletter settings page is removed.
2022-10-28 02:35:39 +05:30
Hakim Razalan
b88a54fb71
🐛 Fixed redirect to signin modal not shown when logged out (#15522)
fixes:  https://github.com/TryGhost/Ghost/issues/15291

- An attempt to improve re-authenticate modal toggle - show re-authenticate modal every time user save (ctrl/cmd + s)
- An attempt to fix redirection when user re-login on different tab. Prevent redirection to sign-in page since the user already logged in on another tab.
- Re-enable `editor` test on `authentication-test.js`
2022-10-21 21:03:12 +01:00
Simon Backx
7c824556c2
Added new members filters and refactored filters (#15667)
fixes https://github.com/TryGhost/Team/issues/2112

- Removed a bit of duplicate code across templates and components that was used to handle filters
- Updated filter objects to contain information about the filter
- Added resource filters that are able to select a single resource, which can be used in columns
- Filters can now define columns by themselves. Not all columns already make use of this functionality, but we can move those over later (cleanup: https://github.com/TryGhost/Team/issues/2133)
- The filter definitions became quite long. We should move them to separate files in the future: https://github.com/TryGhost/Team/issues/2134
- Filters can now have custom NQL parsing
- Improved support for parsing recursive or grouped NQL queries
- Added support for filtering members by feedback
2022-10-21 17:18:00 +02:00
Elena Baidakova
c65b980ada
Added tabs component (#15652)
closes TryGhost/Team#2086
2022-10-19 15:20:15 +04:00
Elena Baidakova
67b65538cf
Added toggle to enable/disable audience feedback in admin (#15601)
closes TryGhost/Team#2043
- Added ability to enable like/dislike buttons for each newsletter.
- Buttons color calculated from accent color.
2022-10-13 10:24:46 +04:00
jbenezech
b9dd9f066d
🐛 Fixed settings overriden when updated from multiple tabs (#15536)
closes: https://github.com/TryGhost/Ghost/issues/15470

- When multiple browser tabs are open, each manipulate a different copy of ember data model, changes to the model in one tab are not reflected in the model of the other tab.
- When updating some settings, all current settings were sent to the API.
- As a result, when updating two different categories of settings (navigation/code inspection) in different tabs, the second update was overriding the first one.
- From a user perspective, this is not a natural behaviour. Only settings visible on-screen when clicking save should be modified.

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-10-12 14:03:54 +01:00
Kevin Ansfield
0de195d052 Updated component tests for moved nav item components
refs 48af4ab3a1

- updated test locations and component names
- updated tests to use angle bracket syntax to match component usage
2022-10-07 17:42:52 +01:00
Kevin Ansfield
7b443d4b63 Removed need for .get() with config service
no issue

The `config` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `config` service by grabbing the API response after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to a tracked object holding the API response data. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `config.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed unnecessary async around `config.availableTimezones` which wasn't making any async calls
2022-10-07 16:14:57 +01:00
Kevin Ansfield
060d791a63 Removed need for .get() with settings service
no issue

The `settings` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `settings` service by grabbing the attributes off the setting model after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to the model's getters/setters. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `settings.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed use of observer in the `customViews` service because it was being set up before the native properties had been added on the settings service meaning autotracking wasn't able to set up properly
2022-10-07 16:14:57 +01:00
Aileen Booker
c4188c1a9e
Added Ghost Explore in Ghost as iframe app behind feature flag (#15495)
no issue

- Added Ghost Explore screen behind alpha flag
- Moved existing /explore route to /explore/connect which we'll redirect to for outside requests
- Added iframe communication with Ghost Explore App
2022-10-07 14:32:54 +01:00
Simon Backx
7e3b41f643
Removed emailClicks feature flag (#15556)
fixes https://github.com/TryGhost/Team/issues/2028

Since link clicks became GA, some older components and templates are no longer used.
2022-10-07 14:27:57 +02:00
Simon Backx
07cb542b97
Improved timezone support date picker and improved tests (#15545)
fixes https://github.com/TryGhost/Team/issues/1946

Problem:
- When running the admin tests in a timezone that is later than UTC, the tests failed.

Causes:
- Some tests needed some adjustements
- The DateTimePicker did not always use the correct timezone.
- Test models createdAt times sometimes depended on the timezone of the test runner

Solution:
- All the input DateTimePicker gets should be processed in the blog's timezone.
- Make sure that all communication (properties, setters, minDate...) with `PowerDatepicker` happens in the local timezone. When setting, convert that date to the blog timezone and use that as the real value.
2022-10-07 12:20:06 +02:00
Kevin Ansfield
524b23c182
Migrated staff user screen to Ember Octane patterns (#15532)
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated staff user controller to native class syntax
- removed use of `{{action}}` helper
- moved from custom components to native `<input>` and `<textarea>` for form fields
  - added `{{select-on-click}}` modifier to cover the `<GhTextingInput @selectOnClick>` option behaviour for any input element
- added `submitForm()` test helper that finds closest `form` element and trigger's a `submit` event on it simulating <kbd>Enter</kbd> being pressed whilst a field has focus
2022-10-05 12:05:31 +01:00
Kevin Ansfield
289e8a8da6 Fixed staff acceptance test
refs e0430b4efc

- acceptance test had mixed up name/slug fields so was testing for incorrect values now that cmd+s inside the slug field is working as really expected
2022-10-04 18:55:25 +01:00
Kevin Ansfield
e0430b4efc 🐛 Fixed ctrl/cmd+s not saving focused fields on general/staff settings screens
no issue

- swapped from route actions triggered by shortcuts mixin to explicit `{{on-key}}` actions
- when saved via keyboard, blur any focused element to trigger it's on-blur action and schedule the save to run after those actions
2022-10-04 17:55:24 +01:00
Sanne de Vries
2c498ab193 Updated breadcrumb and title style across admin
Refs https://www.notion.so/ghost/Switch-breadcrumb-style-513a624c0e0d490ca39a2fdb97a6971a

- Separating out the breadcrumbs and the title makes it easier to navigate back on multiple levels for nested pages.
- Avoids very long titles, as it doesn't include breadcrumbs anymore
2022-10-04 12:35:29 +07:00
Kevin Ansfield
cd9a50841e Fixed tests
refs 85cce39af7

- removed out of date transfer owner modal integration test
- fixed missing `?` in optional chaining in `<GhImageUploader>` error handling
2022-10-03 22:05:02 +01:00
Stephen Sauceda
eb585f9c02
🐛 Fixed active state bug in sidebar nav (#15511)
closes: https://github.com/TryGhost/Ghost/issues/15506

- The sidebar items that don't open the editor were missing some relative current-when attributes so the nested views weren't considered "active".
2022-10-03 19:49:21 +01:00
Kevin Ansfield
258f56ded9
Added regression test for publishing as editor when over member limit (#15518)
closes https://github.com/TryGhost/Team/issues/2010
refs a67cb265fc

- wrapped all members endpoints in a permission check that returns a 403 response if the logged in member is not an admin
- added a publish-flow acceptance test that goes through the flow as an Editor user that fails if the stats endpoint is hit and throws a permissions error
- removed some unnecessary waits in members acceptance test that were added for earlier versions of Ember
2022-10-03 12:05:58 +01:00
Kevin Ansfield
485b793ee3 Deleted test for component that doesn't exist
no issue

- looks like the test file was left over from development
2022-10-03 11:26:00 +01:00
Daniel Lockyer
9818634b63
Merged v5.16.1 into main
v5.16.1
2022-09-27 11:21:48 +07:00
Kevin Ansfield
e3db911108
🐛 Fixed confusing error state when publishing if member count is over hosting plan limit (#15473)
closes https://github.com/TryGhost/Team/issues/1885

- adds limit check for members to the `PublishOptions` class when it's constructed to set a `publishDisabledError` property if the limit check fails
  - if `publishOptions.publishDisabledCheck` is present, all publish options in the publish flow are disabled, the underlying error message is shown, and the continue button is removed to prevent filling in everything only to find at the end of the process that publishing fails
- added handling for a `HostLimitError` error from the API when confirming publishing so the proper underlying message is displayed instead of the confusing "Host limit error, cannot edit post" error
  - this is a backup measure for any instances where you're under the max members limit when starting the publish flow but are over the limit when you reach the end of the publish flow
2022-09-26 17:37:35 +01:00
renovate[bot]
65a74f41c8
Update dependency ember-power-select to v4.1.7 (#15157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-24 15:08:42 +02:00
Kevin Ansfield
fa84808048 Dropped ember-cli-moment-shim dependency
no issue

Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.

- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
  - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
  - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
2022-09-24 13:28:23 +02:00
Sanne de Vries
47903962cc Updated post list layouts
Refs https://github.com/TryGhost/Team/issues/1895
2022-09-15 12:50:53 +01:00
Kevin Ansfield
2d9dd4639d Added redirect between mobiledoc/lexical editors
no issue

- mobiledoc and lexical editors will co-exist for some time so we want to make using both as straight forward as possible
- posts can only have one of `lexical` or `mobiledoc` properties set so in the `edit` route for each editor we detect the opposite property being present and redirect so the right editor is loaded for each post
2022-09-13 18:55:39 +01:00
Kevin Ansfield
8376f1f2fc Updated lexical editor acceptance test to match new behaviour
refs e97d5dd3fe

- `/lexical-editor` route now checks for `editor.url` config rather than `editor.lexicalUrl`
2022-09-13 11:45:49 +01:00
Daniel Lockyer
a766253a78
Merged v5.14.1 into main
v5.14.1
2022-09-12 16:06:43 +01:00
Kevin Ansfield
e230370b33 🐛 Fixed Admin freeze when filtering long tag lists
closes https://github.com/TryGhost/Ghost/issues/15391

- `vertical-collection` component was throwing errors during render when the tags list was filtered down causing slowdowns or full Admin crashes
- similar regression had popped up before and fixed in https://github.com/TryGhost/Ghost/pull/15207 but the dependency had been bumped again without realising it caused an error
- added a test that triggers the error-throwing behaviour in the tags input to help catch this in future dependency updates
2022-09-12 15:49:59 +01:00
Kevin Ansfield
8fde9a05d2 Switched User settings unsaved changes modal to new modal pattern
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-09 17:44:12 +01:00
Kevin Ansfield
6e11a24002 Switched Unsplash integration unsaved changes modal to new modal pattern
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-09 17:44:12 +01:00
Kevin Ansfield
5d5e77af85 Switched Slack integration unsaved changes modal to new modal pattern
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-09 17:44:12 +01:00
Kevin Ansfield
2c10e53774 Switched AMP unsaved changes modal to new modal pattern
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-09 17:44:12 +01:00
Kevin Ansfield
a6f19ca807 Switched navigation unsaved changes modal to new modal pattern
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-09 17:44:12 +01:00
Kevin Ansfield
2396c6d615 Switched general settings unsaved changes modal to new modal pattern
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-09 17:44:11 +01:00
Kevin Ansfield
4ad040b4aa Improved display of recipient filter posts list sends column tooltip
refs https://github.com/TryGhost/Team/issues/1025

- added `{{humanize-recipient-filter}}` helper that converts an NQL recipient filter into a more readable format
- updated posts list to use the new helper in the sends column tooltip shown when hovering with the mouse
2022-09-08 11:03:20 +01:00
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
Kevin Ansfield
5bbdad38a5 Refactored delete all content 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:46 +01:00
Kevin Ansfield
eca3cd7110 Moved tag screen components
no issue

- relocated screen-specific components into a separate `tags/` directory as part of the move to keep the top-level `components/` directory for re-usable components
2022-09-08 09:18:36 +01:00
Kevin Ansfield
4ce3d58e34 Fixed linting
refs aa53a1c71f

- missed some cleanup when replacing tests
2022-09-07 17:57:15 +01:00
Kevin Ansfield
aa53a1c71f 🐛 Fixed error when deleting tag and missing slugs on tags list
no issue

- fixes error that left the confirmation modal in place when deleting a tag by ensuring we return `true` in the task used by the confirm button, if we return the transition object it trips the "failed" state because the `/tags` route aborts and refreshes when transitioning to it
- fixes missing attached posts count in the tag delete confirmation modal by using the correct `tag.count.posts` attribute in the conditional
- fixes missing slugs in the tags list by using the properties on `@tag` rather than expecting a separate `@slug` argument
- replaced the skipped tags acceptance tests with an updated tests that match the recent redesign
2022-09-07 17:51:56 +01:00
Sanne de Vries
594e2ccb08 Removed all launch-wizard related code
No issue

- With the onboarding flow redesign, the launch wizard can no longer be accessed and is therefore deleted.
2022-09-02 13:20:01 +01:00
James Morris
4f8526fd77 Improving the members page on mobile
no issue
2022-09-01 13:09:23 +01:00
Kevin Ansfield
04c3de8ffc Fixed tests that compared .textContent instead of .innerText with inline SVGs
refs 038600c350

- SVGs have titles now and title text content will be included in `element.textContent`
- updated tests that failed to use `.innerText` instead
  - via chai-dom's `.rendered.text()`
  - via direct access `find('.elem').innerText).to...`
2022-09-01 10:01:30 +01:00
James Morris
2a198c367e Reverting back some changes to try and fix failed tests
no issue
2022-08-31 16:07:12 +01:00
James Morris
ae28cdffbb Fixed the test for new member page based on changes
no issue
2022-08-31 15:16:32 +01:00
Rishabh
5e2613b6ed Fixed lint
refs 594ef34871
2022-08-26 15:31:10 +05:30
Rishabh
74f94e85a4 Fixed lint for staff user test 2022-08-26 15:29:06 +05:30
Rishabh
76419f8ed4 Removed email alerts UI for non admin staff
refs https://github.com/TryGhost/Team/issues/1825
2022-08-26 15:24:28 +05:30
Rishabh Garg
da62355e18
Wired email alert settings for staff users on admin (#15313)
refs TryGhost/Team#1826

- allows staff users to manage their email alert settings behind the flag
- only owner and admin users are able to toggle their email alerts
2022-08-25 15:47:14 +05:30
Kevin Ansfield
3fd32ce3cf
Lexical-powered editor experiment (#15278)
no issue

We're spending a bit of time playing with an alternative to mobiledoc-kit to test it's feasibility as a base for future editor improvements.

- add `editor.lexicalUrl` config that points at the unpkg release by default
- set up a route on `/ghost/#/lexical-editor/post/` for the test playground which renders `<KoenigLexicialEditor>` as the editor
- adds `<KoenigLexicalEditor>` component that lazy loads the external react component
2022-08-23 11:45:50 +01:00
Aileen Nowak
515bf1cc14 Added Ghost Explore UI
no issue

- Added `/explore` route which requires min. Admin and is behind a feature flag
- Fetches Admin API key and ID to create a token and return back to Ghost Explore with the correct query params
- Fullscreen UI
2022-08-01 11:11:47 +01:00
Sanne de Vries
09794a7c05 Updated theme upload modal in Casper error state
No ref

- Updated modal default state to make it look more clickable
- Updated the Casper upload error state design
- Changed the 'try again' button to directly open the finder rather than only resetting the modal
2022-07-14 15:07:08 +01:00
Sanne de Vries
be0fb41636 Updated webhook actions to dotdotdot menu 2022-07-12 13:38:51 +01:00
Simon Backx
549e8c526f Added newsletter slug generation to mirage 2022-06-02 13:19:52 +02:00
Simon Backx
7c04c2c472 Added test to see if newsletter is saved 2022-06-02 12:58:10 +02:00
Simon Backx
d5887c6ac0 Added tests for newsletter limits
refs https://github.com/TryGhost/Team/issues/1477
2022-06-02 11:21:29 +02:00
Simon Backx
557e268445 Added newsletter archiving tests
refs https://github.com/TryGhost/Team/issues/1477
2022-06-02 10:39:17 +02:00
Kevin Ansfield
ed235b374d Increased publish flow acceptance tests
refs https://github.com/TryGhost/Team/issues/1586

- updated `?newsletter_id=id` handling in posts API mock to match the real `?newsletter=slug` behaviour
- added additional publish flow acceptance tests for single/multiple newsletter behaviour, scheduling, and sending
2022-05-31 22:59:20 +01:00
Kevin Ansfield
99f05e14b2 🐛 Fixed default publish type being "Publish and email" when default recipients set to "Usually nobody"
no issue

The default recipients setting "Usually nobody" was being respected with the email recipient list defaulting to no members selected. However the UI for that state was confusing because the default publish options ended up being "Publish and email" and "Not sent as a newsletter" but it was expected to be "Publish" with the newsletter option being disabled.

- updated the `PublishOptions` setup to reflect the desired outcome for "Usually nobody"
  - default publish type is set to "Publish"
  - default email recipients are set to match post visibility - this means there are fewer clicks required when switching from "Publish" to "Publish and send"
- updated mirage data setup so any members created are automatically assigned to any newsletter instance with `subscribeOnSignup` set
  - ensures we get proper member counts in the publish flow
2022-05-30 20:04:04 +01:00
Kevin Ansfield
3f0e46c7b0 Added initial tests for new publish flow
refs https://github.com/TryGhost/Team/issues/1586

- added test helper for enabling/disabling members and helpers for disabling mailgun and newsletters
- added `loginAsRole` helper that alleviates duplication of user+role creation and also handles log-out before log-in so it's easier to mix different role tests within a block that has a default role setup in `beforeEach()`
- cleaned up editor tests that were skipped due to using the old publish flow
- added `Publish flow` acceptance test suite with an initial batch of tests
2022-05-30 19:12:16 +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
8e9582d632 Migrated signup screen to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- dropped usage of `<GhTrimFocusInput>` and `<GhTextInput>` in favor of native input elements for more explicit behaviour
- switched `SignupController` to native class syntax
  - migrated to `@action` decorators and swapped all template action triggers to `{{on}}` and `{{fn}}`
2022-05-27 13:28:29 +01:00
Kevin Ansfield
c24ea5d0bc Fixed raw JS error messages appearing in alerts (#2407)
refs https://github.com/TryGhost/Team/issues/1613

We use `notifications.showAPIError()` in many of our try/catch routines but those can also pick up standard JS errors which can result in ugly and useless messages showing in alerts.

- added a list of known built-in JS error type names to check against and a generic error message to be used in place of ones we know shouldn't be displayed
- in `showAPIError(obj)` check `obj.name` against the known list and swap the message for a generic one
  - only the message is swapped, we still log the full/original error to Sentry
- in `handleNotification(msg)` which is the final method used when displaying any alert/notification, extract all words in the supplied message and check that against the known list and swap the message on a match. This handles situations where the API might give us a raw JS error message in the message string
2022-05-27 11:52:39 +01:00
Kevin Ansfield
aaef8f7d44 Deleted unused <GhProfileImage> component
no issue

- the component became unused when the staff user page design was updated but was never cleaned up
2022-05-26 10:42:10 +01:00
Kevin Ansfield
7356bfbcd9 Migrated notifications tests to Octane patterns
refs e021843e3f

- fixed closing of alerts due to missing `.args` after migrating to glimmer syntax
- updated related tests for glimmer component syntax
2022-05-25 12:45:26 +01:00
Simon Backx
49c0a64184 Cleaned up removed feature flags
refs https://github.com/TryGhost/Team/issues/1616
2022-05-25 10:11:24 +02:00
Simon Backx
bc1aa493fa 🐛 Fixed unreliable paid members enabled checks (#2405)
refs https://github.com/TryGhost/Team/issues/1650

- Some places only checked for Stripe being connected via the 'connect' method and ignored the 'direct' method
- Updated (where possible) admin to use the new calculated `paid_members_enabled` setting
2022-05-24 16:53:03 +02:00
Simon Backx
857a8e5ae0 Added tests for unsaved newsletter changes
refs https://github.com/TryGhost/Team/issues/1477
2022-05-18 15:57:02 +02:00
Simon Backx
59a1b8a31f Added tests for editing newsletters
refs https://github.com/TryGhost/Team/issues/1477

- Added default test fixture
- Added tests for validation of newsletter when editing
- Added tests for opening and closing tabs
2022-05-18 13:14:38 +02:00
Kevin Ansfield
ea98469e6e Cleaned up improvedOnboarding labs flag
no issue

- the feature has been GA for a while now so the conditionals are no longer required
2022-05-18 10:13:06 +01:00
Simon Backx
8502ebb96a Moving over the new Dashboard to replace the old (#2389)
refs: https://github.com/TryGhost/Team/issues/1631

Co-authored-by: James Morris <moreofmorris@users.noreply.github.com>
2022-05-17 09:34:34 +02:00
Rishabh Garg
8b5b3aa734 Updated usage of the Tiers API (#2388)
refs https://github.com/TryGhost/Team/issues/1575

- Update usage of Tier to read monthly & yearly price & currency from top level
- Updated usage of Tier to read benefit name from benefits[n], not from benefits[n].name

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2022-05-16 19:51:49 +01:00
Simon Backx
eee3a9aa90 🔥 Removed multipleProducts, tierWelcomePages, and tierName flags
refs https://github.com/TryGhost/Team/issues/1616
2022-05-16 17:25:03 +02:00
Kevin Ansfield
3b088cbd77 Removed usage of old publish menu for contributors
no issue

- updated `<PublishManagement>` and sub-components to handle contributors by replacing publish button with save button in main view and in preview
- removed feature flag gating and usage of `<GhPublishmenu>` in editor template
- updated tests that indirectly used the old publish menu so they work with the new design/behaviour
- skipped editor tests that used the old publish menu
2022-05-16 14:18:04 +01:00
Simon Backx
032f4d2ced Removed non multipleNewslettersUI tests 2022-05-16 14:11:51 +02:00
Hannah Wolfe
385240e03d Refactored to use individual slack settings (#2384)
refs: TryGhost/Team#1625

- we want to remove backwards compatibility code for slack being a single setting

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-16 11:38:32 +01:00
Kevin Ansfield
d353f5dff1 Skipped editor test that uses old publish menu
no issue

- CI keeps failing on this test because Firefox is being slow and hitting the 15sec timeout
- skipped for now as it's testing an old flow that no longer exists and the test will be replaced with an updated version soon
2022-05-12 15:06:52 +01:00
Hannah Wolfe
47d6c17135 Settings cleanup (#2377)
refs: https://github.com/TryGhost/Toolbox/issues/327
requires: TryGhost/Ghost#14791

- lang / locale has had a lot of churn, but we decided this setting should always be locale
- Removed test relating to unused editor_is_launch_complete setting 

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-12 14:53:18 +01:00
Hannah Wolfe
affe6743e5 Renamed products to tiers (#2372)
refs: https://github.com/TryGhost/Team/issues/1145

- this should allow us to remove the /products endpoint in v5

It avoids:

- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-11 22:41:54 +05:30
Kevin Ansfield
756f5094b4 Added "Save" button to editor for scheduled and published posts
refs https://github.com/TryGhost/Team/issues/1597

- added "Save" button to editor for scheduled and published posts when any edits have been made
- shows "Saving..." then "Saved" for 3 seconds before disappearing
  - replaces "Saving..." indicator shown in status bar on the left
- added `showIcon` argument to `<GhTaskButton>` so it can be used for text style buttons
- changed editor status behaviour to only show "Scheduled" by default with the full text shown on hover
2022-05-10 10:04:21 +01:00
Simon Backx
a103184c6a Updated newsletter recipientFilter to use slugs instead of instead
refs https://github.com/TryGhost/Team/issues/1576
refs https://ghost.slack.com/archives/C02G9E68C/p1651763933403669?thread_ts=1651763878.116549&cid=C02G9E68C
2022-05-05 17:37:34 +02:00
Simon Backx
1f5f9645e6 Updated members count to use selected newsletter when publishing
refs https://github.com/TryGhost/Team/issues/1576

- Passes the selected newsletter to the recipient selector
- Added a `recipientFilter` getter to the newsletter model to make changes easier in the future
- Updates the `fullRecipientFilter` in the new publishing flow to use the newsletter's recipientFilter
- Already takes future paid only newsletters into account
- The counts in the status message after publishing is not updated yet (requires https://github.com/TryGhost/Team/issues/1569)
- The counts in the scheduled notification is not updated yet (requires https://github.com/TryGhost/Team/issues/1569)
2022-05-05 17:17:23 +02:00
Simon Backx
19249bdae5 Renamed members-email-labs to newsletters and removed unused files
no issue

We still had some old components and templates from the `members-email` settings that were only were used when the (now GA) `multipleNewsletters` flag was disabled. I’ve removed them and renamed all routes and components from `members-email` and `members-email-labs` to just `newsletters` because it was sometimes hard to understand if a given components was still used or not when fixing issues.
2022-05-05 13:37:53 +02:00
Simon Backx
9b87b4c40a Added basic newsletter creation test
refs https://github.com/TryGhost/Team/issues/1477

- Very basic test only
- Includes some extra test attributes in the components
- Commented out a test that was not yet fininished
2022-04-28 10:50:27 +02:00
Rishabh Garg
c15711434f Updated route for newsletter settings (#2353)
- updates newsletter settings route to `/settings/newsletters` for GA
2022-04-26 13:10:16 +01:00
Simon Backx
4e3b4a7fe0 Readded multipleProducts flag in member filter tests 2022-04-26 13:10:16 +01:00
Simon Backx
0dc2c17285 Removed blank line that failed linting 2022-04-26 13:10:16 +01:00
Simon Backx
03edf7e1d9 Fixed test linting error 2022-04-26 13:10:16 +01:00
Simon Backx
18f4748e8b Fixed tests partially for updated member counts
no issue

Also moves some reused test methods to the test helpers folder (wasn't able to move it to the fixtures because too many tests were failing):
- enableNewsletters helper
- enableStripe helper
- enableMailgun helper
2022-04-26 13:10:16 +01:00
Kevin Ansfield
f6c9ffcf60 Fixed conflicting test selector in <GhTaskButton>
refs 8e120a74d6

- we use `data-test-state` inside of some modals which also use `<GhTaskButton>` which caused unrelated tests to start failing due to a change in matching element counts
2022-04-19 20:42:47 +01:00
Kevin Ansfield
8e120a74d6 Fixed <GhTaskButton> behaviour
refs 502fcaba3c

- the conditional for `isFailure` was wrong meaning we were showing the idle state unintentionally
- fixed the conditional so it checks for the return value rather than a `null` error
- updated the template with test selectors so it's easier to determine state where class names are not sufficient to differentiate
2022-04-19 20:25:27 +01:00
Kevin Ansfield
4c5144cb61 🐛 Fixed close button on "unsaved changes" modal not always behaving like "Stay" button
no issue

The close button in the unsaved changes modal used the `@close` action directly compared to the "Stay" button which used `(fn @close false)`. The close button version without explicit arguments resulted in the first argument being a `PointerEvent` instance which if checked as a modal return value as `if (shouldClose)` would evaluate as truthy therefore matching the "Leave" behaviour instead of the "Stay" behaviour.

- changed modal to explicitly call `(fn @close false)` when the close button is clicked
- updated design settings route to have an explicit `shouldLeave === true` check so default behaviour is always "Stay"
2022-04-14 12:39:10 +01:00
Peter Zimon
626634246f Updated Portal mock for offers (#2319)
Updated the preview block of offer creation screen to match the new style of Portal.
2022-04-01 13:22:41 +02:00
Kevin Ansfield
623825f8f0 🐛 Fixed scheduled send-only post switching to publish+send when rescheduling
closes https://github.com/TryGhost/Ghost/issues/14354

When setting/cleaning up the publish menu state we were incorrectly reverting to the default "publish & send" state when a post was already set to be email-only. This resulted in an unexpected and non-obvious switch to "publish & send" when re-scheduling a scheduled email-only post.

- updated the publish menu setup and cleanup routines to account for scheduled, email-only posts
- fixed the header in the publish menu to say "sent" rather than "published" when an email-only post is scheduled
2022-03-31 17:11:06 +01:00
Kevin Ansfield
78e08af003 Fixed newsletter settings tests
refs a4ca693871

- label's "for" was removed to enable more direct use of the checkbox enabling keyboard usage but the test was not updated to reflect the change
2022-03-31 11:37:38 +01:00
Kevin Ansfield
d6487d3630 Created labs versions of members-email settings code
refs https://github.com/TryGhost/Team/issues/1441

- duplicated route/controller/template and component to `-labs` versions so larger changes and refactors can be made without affecting the GA code
- added redirect for `/settings/members-email -> /settings/members-email-labs` when `multipleNewsletters` flag is enabled
- cleaned up multiple-newsletters related code from the non-labs component
2022-03-31 11:06:21 +01:00
Kevin Ansfield
3e4c8fb429 Improved test output readability for custom views failures
no issue

- test was failing locally due to a bad dependency version but the "expected null to exist" error was not very helpful
- added custom messages to the expectations so it's immediately obvious which expectation has failed, eg "custom view modal (on add): expected null to exist"
2022-03-31 10:52:54 +01:00
Kevin Ansfield
4bfc7529d6 Cleaned up membersActivityFeed labs flag (#2309)
no issue

- `membersActivityFeed` is GA so we don't need any of the conditionals or now-unused code
2022-03-30 12:43:52 +01:00
Rishabh Garg
fcf7f516b8 🐛 Fixed error on saving a paid member (#2312)
refs https://github.com/TryGhost/Team/issues/1435
refs a47b61c1d4

A recent change for showing all subscriptions of a member on detail screen introduced a circular json structure with subscription -> tiers -> subscriptions, which throws an error on saving any member with paid subscription on member detail screen.
2022-03-22 21:58:21 +05:30
Simon Backx
96d02a208d Fixed linting issues in dashboard 5 component 2022-03-22 09:58:42 +01:00
Simon Backx
7c96a1d562 Added dashboard 5.0 component
refs https://github.com/TryGhost/Team/issues/1431
2022-03-21 18:08:13 +01:00
Thibaut Patel
a47b61c1d4 Added canceled subscriptions in member detail screen (#2287)
refs https://github.com/TryGhost/Team/issues/1141

Showing canceled subscriptions provide a more complete picture of the activity of a member.

- Given there is no `member.product` object when a subscription is canceled, use the `member.subscriptions.price.product` objects instead of `member.products`.
- applied boy-scout rule for linter errors and and code formatting
- removed `multipleTiers` flag conditionals as it's now GA
- set up subscriptions as a separate mirage resource so they are easier to work with
    - updated `PUT /members/:id/` endpoint to match real API's complimentary subscription behaviour
    - modified mirage member serializer to match API output

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-03-18 16:15:42 +00:00
Kevin Ansfield
091ae194bf 🐛 Fixed duplicate email open rate column when filtering members by open rate
no issue

- email open rate is shown by default so we don't need to add the column a second time when the list is filtered by that data
- added `email_open_rate` to the default columns list so it's ignored when adding any filtered-by columns
2022-03-17 09:29:15 +00:00
Kevin Ansfield
fcb27507d3 🐛 Fixed slow loading and high memory usage of members list screen
refs https://github.com/TryGhost/Team/issues/1423

- problem:
  - all members requests were automatically adding `?include=email_recipients` as the email recipients relationship was set up to be always embedded
  - embedded email_recipient records also embed the whole email record
  - on the members index screen this meant for each of the 50 members loaded on a page we were also loading every email they have ever received resulting in a huge API response
  - this was not a problem previously because the API was ignoring the `include` parameter on the browse endpoint and Admin wasn't formatting the include properly in snake_case
- solution:
  - the only place we need associated email recipients is on the member details screen where they are used to show the email activity feed
  - removing the `{embedded: 'always'}` option for the `member.emailRecipients` association stops `?include=email_recipients` being added automatically to every members request
  - the member details screen explicitly adds `?include=email_recipients` so no further changes are needed
  - activity feed will be changing to use proper event objects in the future and further optimisation can be made
2022-03-15 18:26:24 +00:00
Sanne de Vries
bb7b388465 Fixed test 2022-03-11 12:52:30 +00:00
Kevin Ansfield
f0418266f4 🐛 Fixed "Must be in the past" error when closing and re-opening publish menu whilst scheduling
closes https://github.com/TryGhost/Team/issues/1399

- the publish/schedule save type was not being reset when closing the publish menu, even though the underlying post publish date _was_ reset leading to the publish menu and the post state being out of sync
- added a reset of the save type when closing the menu, this means "schedule" will need to be re-selected when re-opening the menu but that follows the same behaviour as the reset of the publish menu options
2022-03-11 10:13:08 +00:00
Kevin Ansfield
b373109b16 Updated members bulk-delete test for change of default filter
refs 79afb5fc9c
refs 652fc883d7

- test was set up expecting "Label" to be the default filter shown when opening the members filter UI but it's been changed to "Name" which is no longer behind a labs flag
2022-03-10 17:05:15 +00:00
Kevin Ansfield
79afb5fc9c Added "Name" and "Email" filters to members screen
closes https://github.com/TryGhost/Team/issues/1408
closes https://github.com/TryGhost/Team/issues/1409

- adds new text-based filters that match against member names and emails that allows more specific filtering than search
  - new filter operators introduced for "contains", "does not contain", "starts with", and "ends with"
2022-03-10 16:45:24 +00:00
Kevin Ansfield
af08f050d3 Added "Email" members filter
refs https://github.com/TryGhost/Team/issues/1409

- added filter property definition using the same "contains" operators and parsing supported added for the "Name" filter
2022-03-09 16:05:28 +00:00
Kevin Ansfield
f65437b14c Added "Name" members filter (#2289)
refs https://github.com/TryGhost/Team/issues/1408

- switched to `@tryghost/nql` packages to get access to latest releases
- updated `GET /members` mirage endpoint with a try/catch and explicit logging to make any errors from NQL more visible
- added "Name" filter option
  - has `is`, `contains`, `does not contain`, `starts with`, `ends with` operators
  - uses a plain text field for the input value
- added support for `~`, `-~`, `~^`, and `~$` operators when generating NQL queries from filter definitions
2022-03-08 21:30:20 +00:00
Kevin Ansfield
3a9ea11213 Added "Last seen" filter to members screen
refs https://github.com/TryGhost/Team/issues/1418

- adds "Last seen" option to members filtering that lets you filter by date a member last logged in or opened an email with `before`, `on or before`, `on or after`, and `after` options
- adds "Last seen on x" data to the member details screen
2022-03-08 20:21:49 +00:00
Kevin Ansfield
10ff54151f Fixed linter error for unused variable in dashboard-test.js 2022-03-08 19:23:03 +00:00
Kevin Ansfield
9fbb63cf41 Updated dashboard acceptance tests for latest member graphs/resources box behaviour
refs https://github.com/TryGhost/Team/issues/1376

- adjusted tests so they are in sync with expected dashboard behaviour
- removed `dashboardHideGettingStarted` feature and it's usage in the `showMembersGraphs` property as there's no longer a resource box to dismiss
2022-03-08 19:20:12 +00:00
Kevin Ansfield
3d8b06847b Cleaned up members filter nql parsing/generation
refs https://github.com/TryGhost/Team/issues/1419

- small cleanups to remove unnecessary duplication
2022-03-08 19:07:46 +00:00
James Morris
3571c79fd5 Updated tests to remove the Resources Banner from Dashboard
refs: https://github.com/TryGhost/Team/issues/1376
2022-03-08 19:04:11 +00:00
Sanne de Vries
3ae3e8142a 🎨 Redesigned user authentication pages (#2286)
Refs https://www.notion.so/ghost/Invite-staff-users-steps-in-setup-guide-367737e13d97450a98a0f39ec6b68181

* Simplified the selfhoster setup flow to one setup page only
* Redesigned the reset password pages and the signup page for new staff members

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2022-03-08 17:30:46 +00:00
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
696fca0f9e Hid members graphs in dashboard until get-started block dismissed or members added
refs https://github.com/TryGhost/Team/issues/1406

- added fetch of a single member to the dashboard initialisation if we don't already have some members loaded in memory
- added `showMembersGraphs` getter used in the conditional for rendering the members graphs block component
  - if `improvedOnboarding` flag is disabled, return `showMemberData` so existing functionality is retained
  - will return `false` if until the single-member fetch has completed if we don't already have any members in memory
  - returns `true` if any members exist or the "get started" dashboard resources block has been dismissed
2022-03-07 13:26:52 +00:00
Kevin Ansfield
020cd75369 Added shortcut buttons to "Last seen" members filter datepicker (#2291)
refs https://github.com/TryGhost/Team/issues/1410

- added block invocation support to `<GhDatePicker>` that exposes the calendar components used inside the datepicker dropdown allowing for customisation of the dropdown content
- updated "last seen" datepicker to use the block invocation support to add buttons that select typical "time ago" dates

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-03-04 17:09:28 +00:00
Kevin Ansfield
17710c3e8e Switched members table to show info from most-recently-updated subscription instead of first in array
no issue

- members having multiple subscriptions is not really expected but if it does happen then the most recently updated subscription is most likely to be the one that we're interested in showing the details of in the members table
- added `{{most-recently-updated arr}}` helper+function that will return the item in the array argument with the most recent "updated at" value
  - uses `updatedAtUTC` or `updatedAt` or `updated_at` values so it will work against any of our models or un-transformed API response objects
- updated `<GhMembersListItemColumn>` to use a `mostRecentSubscription` getter when showing subscription data rather than assuming the first object in the subscriptions array should be displayed
2022-03-04 16:32:41 +00:00
Simon Backx
4a8c680f59 🐛 Remove empty benefits before saving (#2284)
refs https://github.com/TryGhost/Team/issues/1188

- The api throws a validation error when we try to add benefits with an empty name
- Before saving, we remove benefits with an empty name
- Added test for empty benefit names
2022-03-04 17:00:09 +01:00
Kevin Ansfield
1f062ff844 Switched "Last seen" filter to standard date picker filter
refs https://github.com/TryGhost/Team/issues/1410

- we have problems translating an "x days ago" NQL filter back to the UI component so as a temporary measure we're switching to a datepicker input as we have a working solution for that
- a later iteration will add shortcut buttons for selecting typical "x days ago" dates in the datepicker
2022-03-04 13:55:32 +00:00
Kevin Ansfield
e4fb2ca19a Added "Created", "Paid start date", and "Next billing date" date-based filters to members list screen (#2290)
no issue

- allows for filtering members by additional fields using a date picker with `before`, `on or before`, `after`, and `on or after` queries
2022-03-04 12:10:35 +00:00
Kevin Ansfield
dd258faafb Updated members filter datepicker error messages
no issue

- shortened invalid date format error message in `<GhDatePicker>` to "Date must be YYYY-MM-DD" so it's less likely to wrap
- added `@maxDateError` and `@minDateError` arguments to `<GhDatePicker>` allowing override of the default "Must be on or before xxxx-xx-xx" message shown when the inputted date is outside of the allowed range
- updated `<GhDatePicker>` usage in the "Created" member filter to use "Must be in the past" error message when a future date is selected
2022-03-04 09:32:59 +00:00
Kevin Ansfield
b46bec1354 Added "Next billing date" members filter
no issue

- added datepicker based filter for the next billing date of paid subscriptions
- updated table to add "Next billing date" column when filtered, showing the paid subscription's current period end date
2022-03-03 22:43:50 +00:00
Kevin Ansfield
ee8b9452a5 Added "Subscription start date" members filter
no issue

- added datepicker based filter for the start date of paid subscriptions
- updated table to add "Start date" column when filtered, showing the paid subscription's start date
2022-03-03 19:38:28 +00:00
Kevin Ansfield
d0763531f5 Changed default date filter operator to "on or before"
no issue

- prevents automatically filtering out all of today's members as soon as a "Created" filter is added as happened when the default was "before"
2022-03-03 19:14:33 +00:00
Kevin Ansfield
ff1c603585 Fixed initial "Create" member filter date not always matching "today" in site timezone
no issue

- updated default date filter values so they match the date in the site timezone rather than local timezone
  - fixes problems such as defaulting to 2022-03-01 when you're in UTC@4AM but the current date in the site timezone of UTC-5 at that time is 2022-02-28
2022-03-03 18:52:06 +00:00
Kevin Ansfield
7470f887cb Updated "Created" member filter to work against site timezone instead of UTC
no issue

- updated NQL generation to adjust dates in filter string so they are the UTC equivalent
  - eg, in UTC-5 "created on or after 2022-02-22" becomes `created_at:>='2022-02-22 05:00:00'`
- updated NQL parsing to take a UTC date filter, convert to a date in the site timezone, then convert to a local date in a way that the datepicker input value matches the respective site timezone date
  - eg, in UTC-5 `created_at:<='2022-02-22 04:59:59` becomes "created on or before 2022-02-21"
2022-03-03 18:17:14 +00:00
Kevin Ansfield
067f8d667f 🐛 Fixed members table showing dates in UTC rather than site timezone
closes https://github.com/TryGhost/Ghost/issues/13611

- added `{{moment-site-tz}}` helper for transforming any date into the selected site's timezone
  - allows for use on any date in the system
  - keeps transformation a display-level concern
- updated members table to use `{{moment-site-tz}}` to transform the date before display
2022-03-03 16:16:46 +00:00
Kevin Ansfield
20329c4d81 Fixed invalid NQL syntax when using "created on or after" filter
no issue

- the "on or after" filter generation was missing the trailing quote around the date literal causing an "Error parsing filter" error
2022-03-03 10:11:16 +00:00
Kevin Ansfield
89f9516f04 Added "created at" members filters
refs https://github.com/TryGhost/Team/issues/1390

- added `membersTimeFilters` feature flag and labs toggle
- added `<GhDatePicker>` component that lifts functionality from the `<GhDateTimePicker>` component
  - `<GhDateTimePicker>` has not yet been refactored to use the new component internally as there are some odd/complex interactions with error handling with it's existing use-cases and they are in critical publishing paths so the refactor doesn't belong as part of this change
- added "Created at" filter type to members filters
  - uses new date picker component for input value
  - has "before", "on or before", "after", "on or after" operators
  - "on" and "not on" operators were skipped as they require two NQL statements to represent, breaking the current 1:1 statement:filter approach used in the NQL-based query param parsing
2022-03-02 21:59:48 +00:00
James Morris
9bee294314 Removed test case for Finishing Touches button that doesn't exist anymore to stop tests failing
no issue
2022-03-02 13:36:18 +00:00
James Morris
bf676ddfb0 Renamed Finishing Touches onboarding step to Done with other changes and styling tweaks
refs: https://github.com/TryGhost/Team/issues/1376

- renamed finishing touches file to done
- no last modal, just the done screen for first start
- added options for next steps
2022-03-02 12:46:15 +00:00
Rishabh Garg
c1ad9475d7 Added filter by tiers to members filter UI (#2274)
closes https://github.com/TryGhost/Team/issues/1029

- allows site owner to filter members on specific tier
- needs tiers beta flag enabled and site should have more than 1 paid tiers.
2022-02-28 16:08:44 +05:30
Kevin Ansfield
e7424b1892 Removed "Email" member filter options when email sending is disabled
no issue

- updated the selection of available filter properties to remove any with the "Email" group when the default email recipients setting is set to "disabled"
2022-02-24 14:52:01 +00:00
Kevin Ansfield
07a01c2df6 Removed "Subscription" member filter options when Stripe is not connected
no issue

- updated the filtering of available filter properties to remove any with the "Subscription" group when Stripe is not connected
2022-02-24 11:24:39 +00:00
Kevin Ansfield
2bf311edc8 Updated label filtering test to check labels column is populated correctly
no issue

- updated assertions to check that labels are shown inside the labels column when filtering members list by label
- added a member serializer to mirage so that relationships are correctly expanded to full embedded records
2022-02-23 13:54:23 +00:00
Kevin Ansfield
0589f32788 Added last seen at column to members list when filtered
closes https://github.com/TryGhost/Team/issues/1388

- added `lastSeenAtUTC` property to member model
- added `last_seen_at` filter column handling to `<GhMembersListItemColumn>`
  - uses same format as the "Created" column showing the date only and a "days ago" string
2022-02-22 17:13:32 +00:00
Kevin Ansfield
ab67df76f8 Added tests for filtered columns showing in members table
refs https://github.com/TryGhost/Team/issues/1388
refs https://github.com/TryGhost/Team/issues/1337

- when filtering the members table, extra columns are shown to make any filtered data visible but we didn't have any tests for the functionality
- updated the `filterColumnLabels` getter to return an object with the original filter type name and the display label so it's easier to use test selectors
2022-02-22 16:10:16 +00:00
Kevin Ansfield
034dc8ef3f 🐛 Fixed mismatched operator in member filters after changing filter type
closes https://github.com/TryGhost/Team/issues/1384

- when setting the filter type, change the filter's relation/operator to match the filter type's first operator so the filter string and the UI are in sync
2022-02-22 10:08:16 +00:00
Kevin Ansfield
4d00f5fb69 Added "Last seen" members list filtering options
closes https://github.com/TryGhost/Team/issues/1307

- adds "Last seen more/less than x days ago" option to members filtering UI
- re-ordered a few related objects/arrays so they are consistent
2022-02-22 09:47:01 +00: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
Kevin Ansfield
15510221c5 🐛 Fixed "Enable email open-rate" toggle
closes https://github.com/TryGhost/Team/issues/1381
refs 21b4b15a1c

- when the email newsletter settings was refactored, the `emailTrackOpens: reads('settings.emailTrackOpens')` was removed as it's a confusing redirection but it's usage in the toggle action was missed
2022-02-21 14:31:36 +00:00
Kevin Ansfield
80504a426c Fixed linter error 2022-02-19 22:26:28 +00:00
Kevin Ansfield
2e42bc1908 Fixed membership tests in CI
refs 4b646d40ea

- blogUrl config was not set meaning the baseUrl handling in `<GhUrlInput>` picked up the current test URL which can change between test runs, especially when run in parallel using ember-exam
2022-02-19 22:20:33 +00:00
Kevin Ansfield
4b646d40ea Added non-Stripe members setting screen acceptance tests
refs https://github.com/TryGhost/Team/issues/1358

- added acceptance tests for members settings screen
  - subscription access management
  - default post access management
  - free tier management
- fixed `enableLabsFlag()` test helper overwriting existing flag settings when enabling another one
- updated API mocks and fixtures
  - matched product fixtures to default tiers-enabled products
  - updated product API mocks to include benefit handling
2022-02-18 22:36:01 +00:00
Kevin Ansfield
03defc274e 🐛 Fixed Admin crash when member filters were focused+blurred without entering a filter value
closes https://github.com/TryGhost/Team/issues/1309
closes https://github.com/TryGhost/Team/issues/1336

- the error occurred because the `<Members::FilterValue>` component detaches it's value from the passed in value it was initialized with. Due to the detached handling, after changing the filter type away from the default label filter to a text input based filter, the internal value stayed as `[]` even though the filter type's value was changed. When the blur event was triggered in that state the internal `[]` value was used to update the filter resulting in an invalid filter string
  - added a quick-fix of assigning the input's value in the blur event handler meaning we get the expected `''` value
  - allows for passing tests to be created ready for a deeper fix/refactor later
- added `nql` dependency and used it in the `GET /members` API mock to match members against the filter param so behaviour matches the real API
  - tested increase in code size - dev build increased by ~180KB, no difference in prod
- added acceptance tests for all current filters and search
2022-02-15 21:38:57 +00:00
Kevin Ansfield
c72b31f504 Fixed test-selector typo for members table
refs 995673ad3c (commitcomment-66689174)

- fixed typo
- added check to base state test to confirm
2022-02-15 15:01:36 +00:00
Kevin Ansfield
9a77543e6f Removed unused resolver test helper
no issue

- hangover from older Ember versions
2022-02-15 15:01:36 +00:00
Kevin Ansfield
b65c05a9ba Removed unused find* test helpers 2022-02-15 15:01:36 +00:00
Kevin Ansfield
63d41e7255 Fixed linter error for unused variable 2022-02-15 13:31:17 +00:00
Kevin Ansfield
f253228d94 🐛 Fixed "Header two" formatting toolbar button not working
closes https://github.com/TryGhost/Ghost/issues/14146
refs https://github.com/TryGhost/Admin/pull/2251

- an action rename was missed when converting the toolbar component to native class syntax
- added test for the h3 toolbar button working
  - fixed `<KoenigEditor>` not assigning the test property that gives tests access to the underlying mobiledoc `editor` instance
2022-02-15 13:23:37 +00:00
Kevin Ansfield
995673ad3c Added acceptance test for members search
refs https://github.com/TryGhost/Team/issues/1336
refs bf9bbc3aa6

- adds basic search param handling to `GET /members` API mock
- adds acceptance tests for basic search behaviour
- contains regression check for search input not being visible when no members match
2022-02-14 16:23:57 +00:00
Kevin Ansfield
69a8122ca6 Disabled non-functional edit buttons in labels dropdown when importing members (#2258)
closes https://github.com/TryGhost/Team/issues/1320

- added `@allowEdit` argument to `<GhMemberLabelInput>` and changed the dropdown to only show the edit label when `@allowEdit` is truthy
- updated usage in the filter UI and members detail screens to allow editing
2022-02-11 15:20:28 +00:00
Kevin Ansfield
7d0298c7a8 🐛 Fixed labels not being selectable in members importer
refs https://github.com/TryGhost/Team/issues/1320

- added a tracked `labels` property in `<ModalImportMembers::CsvFileMapping>` and passed it through to `<GhMembersLabelInput>` so that it has a list of labels that can be added to
- fixed error from sorting labels if one doesn't have a name
- added acceptance test for selecting labels in the members import flow
2022-02-11 13:10:42 +00:00
Kevin Ansfield
09a97779b2 Added basic happy path acceptance test for member csv upload
refs https://github.com/TryGhost/Team/issues/1320

- fixed event handling in `gh-file-input` for test-initiated uploads
- added `POST /members/upload/` API mock that emulates uploading a single member
  - it's enough for this particular test and can be expanded as needed
- added acceptance test that does a simple 1-member, no Stripe, CSV upload with no mapping changes
2022-02-11 11:07:13 +00:00
Kevin Ansfield
152e9ff7d1 Added acceptance test for members import modal display
refs https://github.com/TryGhost/Team/issues/1320

- start of acceptance tests ready for more detailed testing
- added ignore of `no-duplicate-landmark-elements` lint rule in import modal template
  - the rule was a false flag because the conditionals only allow one `<header>` element to be rendered at a time
2022-02-11 10:01:08 +00:00
Sanne de Vries
1e081aa000 Fixed test 2022-02-09 10:56:21 +01:00
Kevin Ansfield
8e5cbf4e0f Cleaned up members filter labs components
no issue

- the members filtering is out of labs, we don't need to keep the labs component naming around
- renamed `-labs` components/classes to non-labs naming, replacing old and unused non-labs components where necessary
2022-02-08 11:48:55 +00:00
Kevin Ansfield
2525a43156 Changed firstStart flow to show a streamlined settings screen
closes https://github.com/TryGhost/Team/issues/1310

- added `/setup/finishing-touches` route
  - refreshes theme preview on access
  - uses existing setting form components to build a reduced settings menu
- updated `/?firstStart=true` handling to transition to `/setup/finishing-touches` instead of showing the get-started modal
- updated standard setup flow to show the get-started modal upon completion
  - `/?firstStart=true` flow for now will only be used when a theme has been chosen before site creation
2022-02-04 17:06:40 +00:00
Peter Zimon
d5018cbb3a Fix tests 2022-02-02 10:57:34 +01:00
Kevin Ansfield
8bc4309deb Added display of get-started modal after completing setup flow
refs https://github.com/TryGhost/Team/issues/1295

- moved `?firstStart` query param handling into `'home'` route as it seemed like a preferable location
  - switched to using `resetController` hook to manage removal of query param which seemed more reliable than the transition approach
- added `firstStart` query param to the transitions when completing step 3 of the setup flow
2022-02-01 18:20:26 +00:00
Peter Zimon
6fa8dafa79 Contributors updates (#2235)
Updates Admin UX for Contributors

When logged in as a Contributor:

- removes sidebar, added floating account menu and dark-mode switch to right side. Updated mobile menu accordingly
- all post by the given user is listed in the Post list
- changed post filtering
- hides email columns in post list
- removes publishmenu for Contributors in Post preview modal
- visual tweaks
2022-02-01 18:59:20 +01:00
Kevin Ansfield
9760e67b3d Added "Get started" modal for first-load onboarding
refs https://github.com/TryGhost/Team/issues/1295

- modal is triggered by the query param `?firstStart=true`, eg https://localhost:2368/ghost/#/?firstStart=true
- clears the query param after triggering the modal so it doesn't get re-triggered after leaving and re-entering the dashboard route
2022-02-01 17:47:50 +00:00
Gabriel Csapo
8d01fb5556 Switched majority of files from EmberObject to native class syntax using @classic decorator (#2227)
no issue

- ran [ember-native-class-codemod](https://github.com/ember-codemods/ember-native-class-codemod) to convert the majority of remaining EmberObject based controllers and components to native class syntax using the `@classic` decorator
- skipped older style modal components (`components/modal-*.js`) due to observed incompatibilities in some cases
2022-02-01 09:34:03 +00:00
Rishabh Garg
7c5b14d050 Updated specific tier visibility handling for posts/pages (#2233)
refs TryGhost/Team#1071

Specific tier visibility for a post was previously stored in `visibility` column directly, which had a limitation of 50 charts. Going forward, for the specific tiers visibility of post/page, we use `tiers` array in API that contains list of tiers with access for post. This change -

- replaces `filter` type to `tiers` for visibility
- adds new visibility filter segment component in post settings menu which stores array of tiers instead of nql string for visibility
- updates serializer and model for post/page
- updates tests
2022-02-01 12:24:06 +05:30
Sanne de Vries
21b4b15a1c Improved Email newsletter settings page (#2207)
Updated email newsletter settings

- Added toggle to disable email newsletters
- Hides email related UI when email is completely turned off
- Rearranged email newsletter settings
- Added publish-menu preview in 
- Changed default-recipients setting
- Updated publish-menu to show Publish as default action
- Removed the confirmation modal during publishing when no emails are intended to be sent
2022-01-27 12:40:11 +01:00
Sanne de Vries
beca9b13dd Updated Author user profile page and sidebar
No issue

- Authors don't need access to staff page and don't need to see breadcrumbs on their profile page
- There's enough space in the side navigation for the post views to be visible by default
2022-01-26 14:49:55 +00:00
Kevin Ansfield
7376167d0a Fixed errors thrown in integration tests
no issue

- errors were due to test setup rather than anything being broken
- cleans logged errors in test output
2022-01-21 23:45:47 +00: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
92ece7b373 Refactored member activity list components
refs https://github.com/TryGhost/Team/issues/1277

- renamed `<GhActivityTimeline>` to `<GhMemberActivityEventParser>` and modified so that it yields parsed events rather than directly renders them
  - makes the component re-usable as it can be used to decorate raw events ready for use in context-specific templates
  - switches to using a getter to yield the parsed events so that they will update automatically when the `@events` argument changes
- updated `<Dashboard::LatestMemberActivity>` to use `<GhMemberActivityEventParser>` and keep the member activity box output local to itself
- added integration tests for `<Dashboard::LatestMemberActivity>`
  - added Mirage setup for member activity event models/serializers/route
2022-01-19 12:58:09 +00:00
Kevin Ansfield
eb2109499a Added initial setup of members activity feed
refs https://github.com/TryGhost/Team/issues/1277

- added `/members-activity` route with associated controller, template, and components behind labs flag
  - table component currently renders some dummy rows
- added navigation item to main menu
  - will use the currently set `?filter` query param unless clicked whilst already on the `/members-activity` screen in which case it will reset the query
- added link to dashboard members activity panel
- added link to member details activity panel
  - sets the filter param to `?filter=member:{member.id}` in preparation for the feed to be filtered to the member's activity
- updated the labs-flag test helper file to export both `enableLabsFlag()` and the new `disableLabsFlag()` so it's easier to test for flag-disabled functionality
2022-01-17 18:06:12 +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
Kevin Ansfield
05373e7ac2 Fixed editor test failing when run within 10mins of midday
closes https://github.com/TryGhost/Team/issues/854

- when testing the scheduling of a post we were grabbing a time 10 mins in the future and using that to set only the _date_ for the scheduled publish time. That causes problems because 10 mins in the future from just before midday with site set to a +12hr timezone as in the tests will move into tomorrow but without the associated change in scheduled time we've jumped forward 24hrs meaning the tests that were expecting the default +5min change when switching to a scheduled post would fail
2022-01-06 13:02:43 +00:00
Kevin Ansfield
cdbba8530f Fixed ?search= empty param after members bulk delete
no issue

- the members query reset was using `""` rather than `null` due to a bug in an old version of search/filtering but that meant we could end up with an empty param
- switched to `null` as it no longer appears necessary to use a blank string, this matches behaviour of other params
2022-01-05 12:52:12 +00:00
Kevin Ansfield
f1bcb073a3 🐛 Fixed incorrect automatic CSV download when bulk-deleting members
closes https://github.com/TryGhost/Team/issues/1265

- we were generating the correct query params for the export endpoint but those query params weren't applied to the export URL before fetching it meaning the default GET behaviour of listing first 15 members was always being used when generating the backup CSV
2022-01-05 12:21:52 +00:00
Kevin Ansfield
dae210daa5 Fixed linter error
refs 6cafae86d7

- all uses of `sinon` were removed in the updated tests but the import was missed
2022-01-03 15:32:42 +00:00
Kevin Ansfield
6cafae86d7 Updated <GhThemeTable> test
refs https://github.com/TryGhost/Team/issues/1164

- component integration tests were failing after `<GhThemeTable>` was replaced with `<GhThemeTableLabs>`
- updated tests to match new table component behaviour
2022-01-03 15:27:32 +00:00