@@ -81,7 +81,7 @@ describe('ServiceCard', () => {
8181 expect ( screen . getByTestId ( 'service-info' ) ) . toBeInTheDocument ( ) ;
8282 } ) ;
8383
84- it ( 'shows storage tab as active by default' , ( ) => {
84+ it ( 'shows info tab as active by default' , ( ) => {
8585 const serviceData = createMockServiceData ( ) ;
8686
8787 render (
@@ -92,10 +92,9 @@ describe('ServiceCard', () => {
9292 />
9393 ) ;
9494
95- const storageTab = screen . getByRole ( 'tab' , { name : / a ₛ S t o r a g e / } ) ;
95+ const storageTab = screen . getByRole ( 'tab' , { name : / a I n f o / } ) ;
9696 expect ( storageTab ) . toHaveAttribute ( 'aria-selected' , 'true' ) ;
97- expect ( screen . getByTestId ( 'storage-input' ) ) . toBeInTheDocument ( ) ;
98- expect ( screen . getByTestId ( 'storage-results' ) ) . toBeInTheDocument ( ) ;
97+ expect ( screen . getByTestId ( 'service-info' ) ) . toBeInTheDocument ( ) ;
9998 } ) ;
10099
101100 it ( 'switches to preimages tab when clicked' , ( ) => {
@@ -236,7 +235,8 @@ describe('ServiceCard', () => {
236235 />
237236 ) ;
238237
239- // Initially storage input should be visible
238+ // Switch to storage
239+ fireEvent . click ( screen . getByRole ( 'tab' , { name : / a ₛ S t o r a g e / } ) ) ;
240240 expect ( screen . getByTestId ( 'storage-input' ) ) . toBeInTheDocument ( ) ;
241241 expect ( screen . queryByTestId ( 'preimage-input' ) ) . not . toBeInTheDocument ( ) ;
242242 expect ( screen . queryByTestId ( 'lookup-input' ) ) . not . toBeInTheDocument ( ) ;
@@ -266,7 +266,11 @@ describe('ServiceCard', () => {
266266 />
267267 ) ;
268268
269- // Check that storage tab is active initially
269+ // Check that info tab is active initially
270+ expect ( screen . getByTestId ( 'service-info' ) ) . toBeInTheDocument ( ) ;
271+
272+ // Switch tabs to storage and verify content changes
273+ fireEvent . click ( screen . getByRole ( 'tab' , { name : / a ₛ S t o r a g e / } ) ) ;
270274 expect ( screen . getByTestId ( 'storage-input' ) ) . toBeInTheDocument ( ) ;
271275 expect ( screen . getByTestId ( 'storage-results' ) ) . toBeInTheDocument ( ) ;
272276
0 commit comments