fix: finalize CHRNX fixture and landmark contracts

This commit is contained in:
chrnx committed 2026-08-12 09:11:52 -05:00
1 parent 1e9386ac13
commit d575e1ffad
6 files changed
+77 -65

No files matched your search

+24 -9
View File
@@ -96,9 +96,16 @@ test( 'long, incomplete, empty, and missing states stay usable', async ( { page
} ),
).toBeVisible();
await expect( page.locator( '.chrnx-podcast-meta' ) ).toHaveCount( 0 );
await expect( page.locator( '.taxonomy-chrnx_topic, .taxonomy-chrnx_language' ) ).toHaveCount(
0,
);
await expect( page.getByText( 'Estado de prueba para un episodio sin show' ) ).toHaveCount( 0 );
await page.goto( '/emotion-is-not-a-slider-designing-expressive-systems-that-can-hesitate/' );
await expect( page.locator( 'pre code' ) ).toContainText( 'const state' );
await expect( page.locator( 'pre code' ) ).toContainText(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
);
await expectNoHorizontalOverflow( page );
for ( const [ path, title ] of [
@@ -110,9 +117,6 @@ test( 'long, incomplete, empty, and missing states stay usable', async ( { page
'/una-cuerda-rota-tambien-puede-decidir-el-arreglo/',
'Una cuerda rota también puede decidir el arreglo',
],
[ '/nota-local-sin-extracto/', 'Nota local sin extracto' ],
[ '/note-without-topic/', 'Note without a topic' ],
[ '/nota-sin-idioma-asignado/', 'Nota sin idioma asignado' ],
] ) {
await page.goto( path );
await expect( page.getByRole( 'heading', { level: 1 } ) ).toContainText( title );
@@ -120,12 +124,6 @@ test( 'long, incomplete, empty, and missing states stay usable', async ( { page
}
await expect( page.locator( '.chrnx-entry__meta a', { hasText: 'English' } ) ).toHaveCount( 0 );
await page.goto( '/unbroken-token-overflow-test/' );
await expect( page.locator( 'pre code' ) ).toContainText(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
);
await expectNoHorizontalOverflow( page );
await page.goto( '/journal/?chrnx_topic=..%2F..%2Fcode&chrnx_language%5B%5D=en&s%5B%5D=x' );
await expect( page.locator( 'select[name="chrnx_topic"]' ) ).toHaveValue( '' );
await expect( page.locator( 'select[name="chrnx_language"]' ) ).toHaveValue( '' );
@@ -232,6 +230,23 @@ test( 'site routes preserve heading order, named landmarks, and skip-link keyboa
}
} );
test( 'search and not-found recovery navigation landmarks have unique names', async ( {
page,
} ) => {
for ( const [ path, expected ] of [
[ '/?s=fixture-that-cannot-exist', 'Search recovery navigation' ],
[ '/this-route-does-not-exist/', 'Page not found recovery navigation' ],
] ) {
await page.goto( path );
await expect( page.getByRole( 'navigation', { name: expected } ) ).toHaveCount( 1 );
const names = await page
.locator( 'nav' )
.evaluateAll( ( nodes ) => nodes.map( ( node ) => node.getAttribute( 'aria-label' ) ) );
expect( names.every( Boolean ) ).toBeTruthy();
expect( new Set( names ).size ).toBe( names.length );
}
} );
test( 'reduced motion removes card transitions while theme preference remains user-controlled', async ( {
page,
} ) => {