@@ -11,7 +11,7 @@ import { PageHeader } from '@/components/PageHeader';
1111import { config } from '@/config' ;
1212import { useAppStore } from '@/store' ;
1313
14- const TabLink = ( { dataCy , label, pathname } : { dataCy ? : string ; label : string ; pathname : string } ) => {
14+ const TabLink = ( { label, pathname, testId } : { label : string ; pathname : string ; testId ? : string } ) => {
1515 const location = useLocation ( ) ;
1616 const isActive = location . pathname === pathname ;
1717 return (
@@ -20,9 +20,9 @@ const TabLink = ({ dataCy, label, pathname }: { dataCy?: string; label: string;
2020 'grow border-b px-1 py-3 text-center font-medium' ,
2121 isActive ? 'border-sky-500 text-slate-900 dark:text-slate-100' : 'border-slate-300 dark:border-slate-700'
2222 ) }
23- data-cy = { dataCy }
2423 data-nav-url = { pathname }
2524 data-spotlight-type = "tab-link"
25+ data-testid = { testId }
2626 to = { pathname }
2727 >
2828 { label }
@@ -55,13 +55,13 @@ const RouteComponent = () => {
5555 < div className = "mb-5 flex" >
5656 { config . setup . isGatewayEnabled && (
5757 < TabLink
58- dataCy = "subject-assignment"
5958 label = { t ( 'layout.tabs.assignments' ) }
6059 pathname = { `${ basePathname } /assignments` }
60+ testId = "subject-assignment"
6161 />
6262 ) }
63- < TabLink dataCy = "subject-table" label = { t ( 'layout.tabs.table' ) } pathname = { `${ basePathname } /table` } />
64- < TabLink dataCy = "subject-graph" label = { t ( 'layout.tabs.graph' ) } pathname = { `${ basePathname } /graph` } />
63+ < TabLink label = { t ( 'layout.tabs.table' ) } pathname = { `${ basePathname } /table` } testId = "subject-table" />
64+ < TabLink label = { t ( 'layout.tabs.graph' ) } pathname = { `${ basePathname } /graph` } testId = "subject-graph" />
6565 </ div >
6666 < React . Suspense fallback = { < LoadingFallback /> } >
6767 < Outlet />
0 commit comments