Skip to content

Commit de40166

Browse files
authored
Added app settings to browser tests (TryGhost#24175)
ref https://linear.app/ghost/issue/PROD-2194/ Adding this at least allows the tests to behave appropriately. We need to figure out a way to make this dynamic so that we can flip settings within the test, or at least re-mount the app with new state for each page view.
1 parent b3ea4cf commit de40166

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

apps/stats/src/standalone.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
import './styles/index.css';
22
import App from './App';
33
import renderShadeApp from '@tryghost/admin-x-framework/test/render-shade';
4+
import {AppSettings} from '@tryghost/admin-x-framework';
45

5-
renderShadeApp(App, {});
6+
// Use test overrides if available, otherwise use defaults
7+
const defaultAppSettings: AppSettings = {
8+
paidMembersEnabled: true,
9+
newslettersEnabled: true,
10+
analytics: {
11+
emailTrackOpens: true,
12+
emailTrackClicks: true,
13+
membersTrackSources: true,
14+
outboundLinkTagging: true,
15+
webAnalytics: true
16+
}
17+
};
18+
19+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
20+
renderShadeApp(App, {appSettings: defaultAppSettings} as any);

0 commit comments

Comments
 (0)