fix: harden CHRNX character stage contracts

This commit is contained in:
chrnx committed 2026-08-12 17:57:57 -05:00
1 parent 11ac0ac715
commit 5573362432
3 files changed
+173 -11

No files matched your search

+7
View File
@@ -274,6 +274,7 @@ test( 'character-led openings share the exact stage class contract', () => {
test( 'character stages define the shared mockup effect and responsive geometry', () => {
const components = read( 'assets/css/components.css' );
const visualStates = read( 'tests/e2e/visual-states.spec.mjs' );
for ( const token of [
'--chrnx-character-accent',
@@ -289,4 +290,10 @@ test( 'character stages define the shared mockup effect and responsive geometry'
assert.match( components, /\.chrnx-character-stage__art\s*>\s*\.chrnx-responsive-portrait/ );
assert.match( components, /@media \(max-width:\s*780px\)[\s\S]*?\.chrnx-character-stage\s*\{[\s\S]*?grid-template-columns:\s*1fr/ );
assert.match( components, /@media \(prefers-reduced-motion:\s*reduce\)[\s\S]*?\.chrnx-character-stage/ );
assert.match( components, /--chrnx-character-copy-surface/ );
assert.match( components, /\.chrnx-music-landing \.chrnx-character-stage__content\s*>\s*\.chrnx-responsive-portrait:has\(\.chrnx-character-stage__collage\)[\s\S]*?inset:\s*0/ );
for ( const timeout of [ '180_000', '120_000', '60_000' ] ) {
assert.match( visualStates, new RegExp( `test\\.setTimeout\\( ${ timeout } \\)` ) );
}
assert.match( visualStates, /character stage below-fold derivatives wait for approach/ );
} );