@@ -354,6 +354,37 @@ describe('DashboardClient', () => {
354354 // 5. Assert input value is empty
355355 expect ( ( input as HTMLInputElement ) . value ) . toBe ( '' ) ;
356356 } ) ;
357+
358+ // =========================================================================
359+ // ISSUE OBJECTIVE: Verify personality tags render in compare mode
360+ // =========================================================================
361+ it ( 'renders personality tags for both profiles in compare mode' , async ( ) => {
362+ const mockFetch = vi . fn ( ) . mockResolvedValue ( {
363+ ok : true ,
364+ json : async ( ) => mockSecondData ,
365+ } ) ;
366+
367+ vi . stubGlobal ( 'fetch' , mockFetch ) ;
368+
369+ render ( < DashboardClient initialData = { mockInitialData } username = "Shivangi1515" /> ) ;
370+
371+ fireEvent . click ( screen . getByText ( 'Compare Profile' ) ) ;
372+
373+ fireEvent . change ( screen . getByPlaceholderText ( 'Enter GitHub Username' ) , {
374+ target : { value : 'JhaSourav07' } ,
375+ } ) ;
376+
377+ fireEvent . click ( screen . getByText ( 'Compare' ) ) ;
378+
379+ await waitFor ( ( ) => {
380+ expect ( screen . getByText ( 'Exit Compare Mode' ) ) . toBeDefined ( ) ;
381+ } ) ;
382+
383+ // Both profiles have stats that generate the "Consistency Beast 🔥" tag
384+ // Using Regex /.../i to match the text even if there is an emoji next to it!
385+ const tags = screen . getAllByText ( / C o n s i s t e n c y B e a s t / i) ;
386+ expect ( tags ) . toHaveLength ( 2 ) ;
387+ } ) ;
357388} ) ;
358389it ( 'shows Most Consistent badge for profile with higher peak streak in compare mode' , async ( ) => {
359390 const mockFetch = vi . fn ( ) . mockResolvedValue ( {
0 commit comments