From 027d6a84a8a648539538c44b26a6491a9baf8204 Mon Sep 17 00:00:00 2001 From: Naz Date: Fri, 18 Feb 2022 15:35:03 +0700 Subject: [PATCH] Fixed disconnected Stripe test refs https://github.com/TryGhost/Toolbox/issues/214 - Disconnected Stripe state is now a special case after the defaul test configuration was changed to have fake Stripe keys included mimicing configured Stripe - The disconnected state is now achieved through an API call instead of mocking internal services from the test level. This seems like a cleaner approach, although still a bit cumbersome --- test/e2e-api/admin/members.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/e2e-api/admin/members.test.js b/test/e2e-api/admin/members.test.js index 0668c4ef3f..d3146e8e82 100644 --- a/test/e2e-api/admin/members.test.js +++ b/test/e2e-api/admin/members.test.js @@ -42,10 +42,16 @@ let agent; describe('Members API without Stripe', function () { before(async function () { agent = await agentProvider.getAdminAPIAgent(); - await fixtureManager.init('members'); + await fixtureManager.init(); await agent.loginAsOwner(); }); + before(async function () { + await agent + .delete('/settings/stripe/connect/') + .expectStatus(200); + }); + beforeEach(function () { mockManager.mockMail(); });