@@ -20,11 +20,10 @@ describe('PathAwareBreadcrumbs', () => {
2020 cy . mount ( < PathAwareBreadcrumbs useNavigate = { fakeUseNavigate } useParams = { fakeUseParams } /> ) ;
2121
2222 // Check that all breadcrumbs are rendered
23- cy . get ( "[data-testid='breadcrumb-item']" ) . should ( 'have.length' , 4 ) ;
23+ cy . get ( "[data-testid='breadcrumb-item']" ) . should ( 'have.length' , 3 ) ;
2424 cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 0 ) . should ( 'contain' , '[LOCAL] Projects' ) ;
2525 cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 1 ) . should ( 'contain' , 'my-project' ) ;
2626 cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 2 ) . should ( 'contain' , 'my-workspace' ) ;
27- cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 3 ) . should ( 'contain' , 'my-control-plane' ) ;
2827 } ) ;
2928
3029 it ( 'navigates when clicking breadcrumbs for all path parameters' , ( ) => {
@@ -47,12 +46,6 @@ describe('PathAwareBreadcrumbs', () => {
4746 cy . wrap ( null ) . then ( ( ) => {
4847 expect ( lastNavigatedPath ) . to . equal ( '/mcp/projects/my-project' ) ;
4948 } ) ;
50-
51- // Click on 'my-control-plane' > Navigate to 'my-control-plane'
52- cy . contains ( 'my-control-plane' ) . click ( ) ;
53- cy . wrap ( null ) . then ( ( ) => {
54- expect ( lastNavigatedPath ) . to . equal ( '/mcp/projects/my-project/workspaces/my-workspace/mcps/my-control-plane' ) ;
55- } ) ;
5649 } ) ;
5750
5851 it ( 'renders only home breadcrumb when there are no path parameters' , ( ) => {
@@ -66,18 +59,17 @@ describe('PathAwareBreadcrumbs', () => {
6659 it ( 'handles partial route parameters' , ( ) => {
6760 const fakeUseParams = ( ( ) => ( {
6861 projectName : 'my-project' ,
69- workspaceName : 'my-workspace' ,
62+ // No workspaceName
7063 // No controlPlaneName
7164 } ) ) as typeof useParams ;
7265
7366 cy . mount ( < PathAwareBreadcrumbs useNavigate = { fakeUseNavigate } useParams = { fakeUseParams } /> ) ;
7467
7568 // Should show 3 breadcrumbs
76- cy . get ( "[data-testid='breadcrumb-item']" ) . should ( 'have.length' , 3 ) ;
69+ cy . get ( "[data-testid='breadcrumb-item']" ) . should ( 'have.length' , 2 ) ;
7770
7871 // Verify data-target attributes
7972 cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 0 ) . should ( 'contain' , '[LOCAL] Projects' ) ;
8073 cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 1 ) . should ( 'contain' , 'my-project' ) ;
81- cy . get ( "[data-testid='breadcrumb-item']" ) . eq ( 2 ) . should ( 'contain' , 'my-workspace' ) ;
8274 } ) ;
8375} ) ;
0 commit comments