@@ -36,32 +36,42 @@ describe("HomePage", () => {
3636 renderHomePage ( ) ;
3737
3838 // Test the GitHub Actions subject card
39- const subjectTitle = screen . getByText ( "Pierwsze kroki GitHub Actions" ) ;
40- expect ( subjectTitle ) . toBeInTheDocument ( ) ;
39+ const githubActionsTitle = screen . getByText ( "Pierwsze kroki GitHub Actions" ) ;
40+ expect ( githubActionsTitle ) . toBeInTheDocument ( ) ;
4141
42- const description = screen . getByText (
42+ const githubActionsDescription = screen . getByText (
4343 "Poznaj podstawy automatyzacji przepływu pracy w GitHub z wykorzystaniem GitHub Actions" ,
4444 ) ;
45- expect ( description ) . toBeInTheDocument ( ) ;
45+ expect ( githubActionsDescription ) . toBeInTheDocument ( ) ;
4646
47- const startButton = screen . getByText ( "Start Learning" ) ;
48- expect ( startButton ) . toBeInTheDocument ( ) ;
47+ // Test the PyTorch subject card
48+ const pytorchTitle = screen . getByText ( "PyTorch Deep Learning" ) ;
49+ expect ( pytorchTitle ) . toBeInTheDocument ( ) ;
50+
51+ const pytorchDescription = screen . getByText (
52+ "Master deep learning fundamentals with PyTorch framework for research and production" ,
53+ ) ;
54+ expect ( pytorchDescription ) . toBeInTheDocument ( ) ;
55+
56+ // Check that there are 2 "Start Learning" buttons (one for each subject)
57+ const startButtons = screen . getAllByText ( "Start Learning" ) ;
58+ expect ( startButtons ) . toHaveLength ( 2 ) ;
4959 } ) ;
5060
5161 it ( "renders placeholder tiles for remaining slots" , ( ) => {
5262 renderHomePage ( ) ;
5363
54- // Since we have 1 real subject and TOTAL_TILES is 25, we should have 24 placeholder tiles
64+ // Since we have 2 real subjects and TOTAL_TILES is 25, we should have 23 placeholder tiles
5565 const placeholderDescriptions = screen . getAllByText (
5666 "Use Agentic AI to create new learning paths" ,
5767 ) ;
58- expect ( placeholderDescriptions ) . toHaveLength ( 24 ) ;
68+ expect ( placeholderDescriptions ) . toHaveLength ( 23 ) ;
5969
6070 // Check if placeholder buttons are disabled
6171 const disabledButtons = screen . getAllByRole ( "button" , {
6272 name : / S u b j e c t \d + / ,
6373 } ) ;
64- expect ( disabledButtons ) . toHaveLength ( 24 ) ;
74+ expect ( disabledButtons ) . toHaveLength ( 23 ) ;
6575 disabledButtons . forEach ( ( button ) => {
6676 expect ( button ) . toHaveAttribute ( "disabled" ) ;
6777 } ) ;
0 commit comments