@@ -4,7 +4,7 @@ import fs from "node:fs";
44import path from "node:path" ;
55
66import { projectPageContent } from "../../src/features/project-page/content/projectContent.js" ;
7- import { demoLayout , footerConfig } from "../../src/features/project-page/content/siteConfig.js" ;
7+ import { demoLayout , footerConfig , tableOfContents } from "../../src/features/project-page/content/siteConfig.js" ;
88
99const repoRoot = process . cwd ( ) ;
1010
@@ -17,6 +17,7 @@ test("project page content exposes the expected top-level sections", () => {
1717 "demos" ,
1818 "method" ,
1919 "experiments" ,
20+ "citation" ,
2021 "footer" ,
2122 ] ) ;
2223} ) ;
@@ -28,6 +29,7 @@ test("hero content is populated and action links are present", () => {
2829 assert . ok ( hero . affiliations . length >= 1 ) ;
2930 assert . ok ( hero . actions . length >= 2 ) ;
3031 assert . equal ( hero . actions . some ( ( action ) => action . label === "SIMPLE" ) , true ) ;
32+ assert . equal ( hero . actions . some ( ( action ) => action . label === "Cite" && action . href === "#citation" ) , true ) ;
3133 assert . equal ( hero . repoStats . length , 2 ) ;
3234 for ( const action of hero . actions ) {
3335 assert . ok ( action . label . length > 0 ) ;
@@ -93,6 +95,15 @@ test("experiment tables match their declared columns", () => {
9395 }
9496} ) ;
9597
98+ test ( "citation content exposes BibTeX for the paper" , ( ) => {
99+ const { citation } = projectPageContent ;
100+ assert . equal ( citation . sectionTitle , "Cite" ) ;
101+ assert . deepEqual ( Object . keys ( citation ) , [ "sectionTitle" , "copyLabel" , "copiedLabel" , "bibtex" ] ) ;
102+ assert . match ( citation . bibtex , / ^ @ a r t i c l e \{ w e i 2 0 2 6 p s i 0 , / ) ;
103+ assert . match ( citation . bibtex , / a r X i v p r e p r i n t a r X i v : 2 6 0 3 \. 1 2 2 6 3 / ) ;
104+ assert . match ( citation . bibtex , / y e a r = \{ 2 0 2 6 \} / ) ;
105+ } ) ;
106+
96107test ( "referenced public assets exist" , ( ) => {
97108 const assetPaths = new Set ( [
98109 projectPageContent . hero . teaserVideoSrc ,
@@ -124,4 +135,5 @@ test("shared carousel layout remains centralized in siteConfig", () => {
124135 assert . ok ( value . length > 0 ) ;
125136 }
126137 assert . match ( footerConfig . copyright , / ^ C o p y r i g h t / ) ;
138+ assert . equal ( tableOfContents . some ( ( item ) => item . id === "citation" && item . label === "Cite" ) , true ) ;
127139} ) ;
0 commit comments