0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added test to test default theme against linked gscan version (#19020)

fixes GRO-32

If we ever introduce errors in the linked source theme and linked gscan
version combination, this test will catch it.
This commit is contained in:
Simon Backx 2023-11-16 13:03:00 +01:00 committed by GitHub
parent a2cd4445f3
commit e3cdc24d6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -591,6 +591,8 @@ jobs:
name: Regression tests (Node ${{ matrix.node }}, ${{ matrix.env.DB }})
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
env:
FORCE_COLOR: 0

View file

@ -49,7 +49,7 @@ export default [
setting('site', 'twitter_description', null),
// THEME
setting('theme', 'active_theme', 'Source'),
setting('theme', 'active_theme', 'source'),
// PRIVATE
setting('private', 'is_private', false),

View file

@ -0,0 +1,14 @@
const assert = require('assert/strict');
const {mockSetting} = require('../../utils/e2e-framework-mock-manager');
// This test checks if the default theme passes the current gscan version
// If this test fails, check the used gscan version in Ghost
it('Default theme passes linked gscan version', async function () {
const themeService = require('../../../core/server/services/themes');
// Set active theme name
mockSetting('active_theme', 'source');
await themeService.init();
const theme = await themeService.api.getThemeErrors('source');
assert.deepEqual(theme.errors, [], 'Default theme should have no errors');
});