feat: add CHRNX podcast grunge background

This commit is contained in:
chrnx committed 2026-08-13 00:40:39 -05:00
1 parent 7480f9c21e
commit a537196525
3 files changed
+63 -1

No files matched your search

+26 -1
View File
@@ -1,11 +1,12 @@
import assert from 'node:assert/strict';
import { mkdtempSync, readFileSync, readdirSync, rmSync, statSync, symlinkSync, writeFileSync } from 'node:fs';
import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, symlinkSync, writeFileSync } from 'node:fs';
import { execFileSync } from 'node:child_process';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { test } from 'node:test';
const read = ( path ) => readFileSync( new URL( `../../${ path }`, import.meta.url ), 'utf8' );
const PODCAST_BACKGROUND_SOURCE = 'assets/images/podcast-frequency-grunge.png';
test( 'local visual fixtures define stable pages and representative editorial states', () => {
const pages = JSON.parse( read( 'tests/fixtures/pages.json' ) );
@@ -242,6 +243,30 @@ test( 'post-card CSS fallbacks never reuse approved section portraits', () => {
assert.doesNotMatch( components, /url\([^)]*(?:alter-ego-|the-no-names-musician-cutout)/ );
} );
test( 'podcast background source stays separate from portrait and card fallbacks', () => {
assert.ok(
existsSync( new URL( `../../${ PODCAST_BACKGROUND_SOURCE }`, import.meta.url ) ),
`missing ${ PODCAST_BACKGROUND_SOURCE }`,
);
const portraitAllowlist = read( 'inc/queries.php' );
assert.doesNotMatch( portraitAllowlist, /podcast-frequency-grunge\.png/ );
for ( const path of [
'assets/css/components.css',
'blocks/featured-stories/style.css',
'blocks/journal-stream/style.css',
'blocks/latest-podcast/style.css',
'blocks/related-posts/style.css',
] ) {
assert.doesNotMatch(
read( path ),
/podcast-frequency-grunge\.png/,
`${ PODCAST_BACKGROUND_SOURCE } must not become a card fallback in ${ path }`,
);
}
} );
test( 'front page and section pages connect the real editorial patterns', () => {
const front = read( 'templates/front-page.html' );
assert.match( front, /chrnx\/home-intro/ );