From c33edbac08ea0d93481770cff5c448d8d4fe9754 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 12 Nov 2018 16:31:47 +0000 Subject: [PATCH] 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 --- .../components/modal-webhook-form.hbs | 36 +++++++-------- .../app/templates/settings/integration.hbs | 25 +++++----- ghost/admin/mirage/config.js | 6 +-- ghost/admin/mirage/config/webhooks.js | 5 -- ghost/admin/mirage/factories/webhook.js | 18 ++++++++ .../acceptance/settings/integrations-test.js | 46 +++++++++++++++++++ 6 files changed, 99 insertions(+), 37 deletions(-) create mode 100644 ghost/admin/mirage/factories/webhook.js diff --git a/ghost/admin/app/templates/components/modal-webhook-form.hbs b/ghost/admin/app/templates/components/modal-webhook-form.hbs index f9aab6182c..97608540e0 100644 --- a/ghost/admin/app/templates/components/modal-webhook-form.hbs +++ b/ghost/admin/app/templates/components/modal-webhook-form.hbs @@ -1,30 +1,30 @@