@@ -12,6 +12,7 @@ import FlashPage, { metadata as flashMetadata } from "@/app/flash/page";
1212import HomePage , { metadata as homeMetadata } from "@/app/page" ;
1313import PrivacyPage , { metadata as privacyMetadata } from "@/app/privacy/page" ;
1414import SupportPage , { metadata as supportMetadata } from "@/app/support/page" ;
15+ import { SiteFooter } from "@/components/site-footer" ;
1516import { SiteHeader } from "@/components/site-header" ;
1617import { initialFirmwareTargets , navigation , siteConfig } from "@/lib/site" ;
1718
@@ -140,6 +141,41 @@ describe("public-site contract", () => {
140141 ) . not . toBeInTheDocument ( ) ;
141142 } ) ;
142143
144+ it ( "publishes the canonical MIT source repository from the home page and global footer" , ( ) => {
145+ const repositoryUrl = "https://github.com/PyBLE-dev/PyBLE" ;
146+
147+ expect ( siteConfig . repositoryUrl ) . toBe ( repositoryUrl ) ;
148+
149+ render (
150+ < >
151+ < HomePage />
152+ < SiteFooter />
153+ </ > ,
154+ ) ;
155+
156+ const sourceSection = screen . getByRole ( "region" , {
157+ name : "See how PyBLE is built." ,
158+ } ) ;
159+ expect (
160+ within ( sourceSection ) . getByText (
161+ / t a b l e t a p p , b o a r d - a g e n t f i r m w a r e , P B L E \/ 1 p r o t o c o l , t e s t s , a n d d o c u m e n t a t i o n / i,
162+ ) ,
163+ ) . toHaveTextContent ( / d e v e l o p e d i n p u b l i c u n d e r t h e M I T l i c e n s e / i) ;
164+
165+ const sourceLink = within ( sourceSection ) . getByRole ( "link" , {
166+ name : "Explore PyBLE on GitHub" ,
167+ } ) ;
168+ expect ( sourceLink ) . toHaveAttribute ( "href" , repositoryUrl ) ;
169+ expect ( sourceLink ) . toHaveAttribute ( "target" , "_blank" ) ;
170+ expect ( sourceLink ) . toHaveAttribute ( "rel" , "noopener noreferrer" ) ;
171+
172+ const footer = screen . getByRole ( "navigation" , { name : "Footer" } ) ;
173+ const footerLink = within ( footer ) . getByRole ( "link" , { name : "GitHub" } ) ;
174+ expect ( footerLink ) . toHaveAttribute ( "href" , repositoryUrl ) ;
175+ expect ( footerLink ) . toHaveAttribute ( "target" , "_blank" ) ;
176+ expect ( footerLink ) . toHaveAttribute ( "rel" , "noopener noreferrer" ) ;
177+ } ) ;
178+
143179 it ( "publishes the approved TestFlight invitation as a link and verified local QR code" , async ( ) => {
144180 const testFlightUrl = "https://testflight.apple.com/join/yU4e8s6d" ;
145181
0 commit comments