@@ -99,8 +99,12 @@ describe("public-site contract", () => {
9999 } ) ;
100100
101101 const publicDirectory = join ( process . cwd ( ) , "public" ) ;
102- const [ socialPng , qrCardPng , qrCardSvg ] = await Promise . all ( [
102+ const [ socialPng , socialSvg , qrCardPng , qrCardSvg ] = await Promise . all ( [
103103 readFile ( join ( publicDirectory , "social" , "pyble-beta-og-1200x630.png" ) ) ,
104+ readFile (
105+ join ( publicDirectory , "social" , "pyble-beta-og-1200x630.svg" ) ,
106+ "utf8" ,
107+ ) ,
104108 readFile ( join ( publicDirectory , "social" , "pyble-testflight-qr-1080.png" ) ) ,
105109 readFile (
106110 join ( publicDirectory , "social" , "pyble-testflight-qr-1080.svg" ) ,
@@ -110,6 +114,13 @@ describe("public-site contract", () => {
110114 expect ( [ socialPng . readUInt32BE ( 16 ) , socialPng . readUInt32BE ( 20 ) ] ) . toEqual ( [
111115 1200 , 630 ,
112116 ] ) ;
117+ expect ( socialSvg ) . toContain ( "One-time USB setup." ) ;
118+ expect ( socialSvg ) . toContain ( "Everyday coding over BLE." ) ;
119+ expect ( socialSvg ) . toContain ( "FIRMWARE HIL PENDING" ) ;
120+ expect ( socialSvg ) . not . toContain ( "WEB FLASHER" ) ;
121+ expect ( createHash ( "sha256" ) . update ( socialPng ) . digest ( "hex" ) ) . not . toBe (
122+ "c6ff10039c00780909b79b0e557c46b843d9994bc0d545a9a098488c3157ff1d" ,
123+ ) ;
113124 expect ( [ qrCardPng . readUInt32BE ( 16 ) , qrCardPng . readUInt32BE ( 20 ) ] ) . toEqual ( [
114125 1080 , 1080 ,
115126 ] ) ;
@@ -138,7 +149,7 @@ describe("public-site contract", () => {
138149 ) ;
139150 } ) ;
140151
141- it ( "states the vendor-neutral vision and separates it from initial firmware support " , ( ) => {
152+ it ( "states the vendor-neutral vision and the truthful pre-activation firmware state " , ( ) => {
142153 render ( < HomePage /> ) ;
143154
144155 expect (
@@ -152,11 +163,9 @@ describe("public-site contract", () => {
152163 / d e s i g n e d f o r b o a r d s t h a t r u n M i c r o P y t h o n a n d s u p p o r t B l u e t o o t h L o w E n e r g y / i,
153164 ) ,
154165 ) . toBeInTheDocument ( ) ;
155- expect (
156- screen . getByText (
157- / c u r r e n t f i r m w a r e r e l e a s e s u p p o r t s q u a l i f i e d c l a s s i c E S P 3 2 a n d E S P 3 2 - S 3 m o d u l e p r o f i l e s / i,
158- ) ,
159- ) . toBeInTheDocument ( ) ;
166+ expect ( screen . getByText ( / v 0 \. 4 \. 2 f i r m w a r e c a n d i d a t e / i) ) . toHaveTextContent (
167+ / p u b l i c b r o w s e r i n s t a l l e r s t a y s u n a v a i l a b l e u n t i l b o t h e x a c t p r o f i l e s p a s s H I L / i,
168+ ) ;
160169 expect (
161170 screen . getByText (
162171 / E S P 3 2 - C 3 a n d m o r e m i c r o c o n t r o l l e r f a m i l i e s r e m a i n p l a n n e d / i,
@@ -304,17 +313,39 @@ describe("public-site contract", () => {
304313 expect ( capture . readUInt32BE ( 20 ) ) . toBe ( 2732 ) ;
305314 } ) ;
306315
307- it ( "distinguishes current firmware families from the planned ESP32-C3 target " , ( ) => {
316+ it ( "names every exact profile, memory constraint, and qualification state " , ( ) => {
308317 expect ( initialFirmwareTargets ) . toEqual ( [
309- { name : "ESP32" , availability : "Released profile" } ,
310- { name : "ESP32-S3" , availability : "Released profile" } ,
311- { name : "ESP32-C3" , availability : "Planned profile" } ,
318+ {
319+ id : "esp32-4mb" ,
320+ target : "Classic ESP32" ,
321+ constraint : "4 MiB external SPI flash · no PSRAM assumed" ,
322+ status : "v0.4.2 HIL pending · installer unavailable" ,
323+ planned : false ,
324+ } ,
325+ {
326+ id : "esp32-s3-n16r8" ,
327+ target : "ESP32-S3 N16R8" ,
328+ constraint : "16 MiB flash · 8 MiB Octal PSRAM" ,
329+ status : "v0.4.2 HIL pending · installer unavailable" ,
330+ planned : false ,
331+ } ,
332+ {
333+ id : "esp32-c3-4mb" ,
334+ target : "ESP32-C3" ,
335+ constraint : "4 MiB external SPI flash · no PSRAM assumed" ,
336+ status : "Planned · installer unavailable pending exact-profile HIL" ,
337+ planned : true ,
338+ } ,
312339 ] ) ;
313340
314341 render ( < HomePage /> ) ;
315342
316- const esp32C3Target = screen . getByText ( "ESP32-C3" ) . closest ( "div" ) ;
317- expect ( esp32C3Target ) . toHaveTextContent ( "Planned profile" ) ;
343+ for ( const target of initialFirmwareTargets ) {
344+ const targetCard = screen . getByText ( target . id ) . closest ( "div" ) ;
345+ expect ( targetCard ) . toHaveTextContent ( target . target ) ;
346+ expect ( targetCard ) . toHaveTextContent ( target . constraint ) ;
347+ expect ( targetCard ) . toHaveTextContent ( target . status ) ;
348+ }
318349 } ) ;
319350
320351 it ( "keeps the public installer unavailable while explaining exact profiles, BLE use, and recovery" , ( ) => {
@@ -472,16 +503,30 @@ describe("public-site contract", () => {
472503 expect ( screen . getByText ( / o r d i n a r y r e q u e s t d a t a / i) ) . toBeInTheDocument ( ) ;
473504 } ) ;
474505
475- it ( "gives beta users a concrete support checklist and contact " , ( ) => {
506+ it ( "gives beta users an exact installer intake and preferred bug template " , ( ) => {
476507 render ( < SupportPage /> ) ;
477508
478509 expect (
479510 screen . getByRole ( "heading" , { level : 1 , name : "Support" } ) ,
480511 ) . toBeInTheDocument ( ) ;
481- expect ( screen . getByText ( "Board and chip family" ) ) . toBeInTheDocument ( ) ;
512+ expect (
513+ screen . getByText ( / e x a c t i n s t a l l e r p r o f i l e I D / i) ,
514+ ) . toBeInTheDocument ( ) ;
515+ expect (
516+ screen . getByText ( / e x a c t b o a r d m o d e l a n d m o d u l e m a r k i n g / i) ,
517+ ) . toBeInTheDocument ( ) ;
518+ expect (
519+ screen . getByText ( / f l a s h c a p a c i t y , P S R A M c a p a c i t y , a n d P S R A M t y p e / i) ,
520+ ) . toBeInTheDocument ( ) ;
521+ expect (
522+ screen . getByText ( / b r o w s e r n a m e \/ v e r s i o n a n d d e s k t o p O S n a m e \/ v e r s i o n / i) ,
523+ ) . toBeInTheDocument ( ) ;
524+ expect (
525+ screen . getByText ( / f a i l e d i n s t a l l e r s t a g e a n d r e d a c t e d e r r o r t e x t / i) ,
526+ ) . toBeInTheDocument ( ) ;
482527 expect (
483528 screen . getByText (
484- / p u b l i c i n s t a l l e r s u p p o r t s o n l y e s p 3 2 - 4 m b a n d e s p 3 2 - s 3 - n 1 6 r 8 / i,
529+ / p u b l i c i n s t a l l e r i s u n a v a i l a b l e w h i l e v 0 \. 4 \. 2 H I L r u n s f o r e s p 3 2 - 4 m b a n d e s p 3 2 - s 3 - n 1 6 r 8 / i,
485530 ) ,
486531 ) . toBeInTheDocument ( ) ;
487532 expect (
@@ -495,8 +540,14 @@ describe("public-site contract", () => {
495540 expect (
496541 screen . getByText ( "PyBLE app and agent versions" ) ,
497542 ) . toBeInTheDocument ( ) ;
498- expect (
499- screen . getByRole ( "link" , { name : "viwat.v@chula.ac.th" } ) ,
500- ) . toHaveAttribute ( "href" , "mailto:viwat.v@chula.ac.th" ) ;
543+ expect ( siteConfig . bugReportUrl ) . toBe (
544+ "https://github.com/PyBLE-dev/PyBLE/issues/new?template=bug.yml" ,
545+ ) ;
546+ const preferredReport = screen . getByRole ( "link" , {
547+ name : "Open the GitHub bug template" ,
548+ } ) ;
549+ expect ( preferredReport ) . toHaveAttribute ( "href" , siteConfig . bugReportUrl ) ;
550+ expect ( preferredReport ) . toHaveAttribute ( "target" , "_blank" ) ;
551+ expect ( preferredReport ) . toHaveAttribute ( "rel" , "noopener noreferrer" ) ;
501552 } ) ;
502553} ) ;
0 commit comments