Fixed e2e tests

This commit is contained in:
Aileen Booker 2023-06-08 16:40:44 -04:00 committed by Aileen Booker
parent d27bb8f075
commit 10859b9b01

View File

@ -5,7 +5,6 @@ const {obfuscatedSetting, isSecretSetting, hideValueIfSecret} = require('./setti
const logging = require('@tryghost/logging');
const MagicLink = require('@tryghost/magic-link');
const verifyEmailTemplate = require('./emails/verify-email');
const stripeService = require('../../services/stripe');
const EMAIL_KEYS = ['members_support_address'];
const messages = {
@ -237,6 +236,8 @@ class SettingsBREADService {
const current = stripePublicKeySetting.get('value');
if (current?.match(/pk_live/) && (!previous?.match(/pk_live/) || !previous)) {
// Require the Stripe service here as it breaks existing tests otherwise
const stripeService = require('../stripe');
// This method currently only triggers a DomainEvent
await stripeService.connect();
}