File tree Expand file tree Collapse file tree 5 files changed +406
-534
lines changed
Expand file tree Collapse file tree 5 files changed +406
-534
lines changed Original file line number Diff line number Diff line change 1+ // Mock for i18next
2+ const i18next = {
3+ use : function ( plugin : any ) {
4+ return this
5+ } ,
6+ init : function ( ) {
7+ return this
8+ } ,
9+ t : function ( key : string ) {
10+ const parts = key . split ( ":" )
11+ return parts . length > 1 ? parts [ 1 ] : key
12+ } ,
13+ changeLanguage : ( ) => new Promise ( ( ) => { } ) ,
14+ addResourceBundle : ( ) => { } ,
15+ }
16+
17+ export default i18next
Original file line number Diff line number Diff line change 1+ // Mock for react-i18next
2+
3+ export const initReactI18next = {
4+ type : "3rdParty" ,
5+ init : ( ) => { } ,
6+ }
7+
8+ // Mock the useTranslation hook
9+ export const useTranslation = ( ) => ( {
10+ t : ( key : string ) => {
11+ // Handle number format suffixes
12+ if ( key === "number_format.million_suffix" ) return "M"
13+ if ( key === "number_format.thousand_suffix" ) return "K"
14+
15+ // Return the key part after the colon or the whole key if no colon
16+ const parts = key . split ( ":" )
17+ return parts . length > 1 ? parts [ 1 ] : key
18+ } ,
19+ i18n : {
20+ changeLanguage : ( ) => new Promise ( ( ) => { } ) ,
21+ t : ( key : string ) => {
22+ if ( key === "number_format.million_suffix" ) return "M"
23+ if ( key === "number_format.thousand_suffix" ) return "K"
24+ const parts = key . split ( ":" )
25+ return parts . length > 1 ? parts [ 1 ] : key
26+ } ,
27+ } ,
28+ } )
29+
30+ // Mock the Trans component
31+ export const Trans = ( { children } : { children : any } ) => children
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
7171 < div className = "flex justify-between items-center gap-2" >
7272 < div
7373 className = "flex items-center cursor-pointer -ml-0.5 select-none grow min-w-0"
74- onClick = { ( ) => setIsTaskExpanded ( ! isTaskExpanded ) } >
74+ onClick = { ( ) => setIsTaskExpanded ( ! isTaskExpanded ) }
75+ data-testid = "task-header" // Added data-testid here
76+ >
7577 < div className = "flex items-center shrink-0" >
7678 < span className = { `codicon codicon-chevron-${ isTaskExpanded ? "down" : "right" } ` } > </ span >
7779 </ div >
You can’t perform that action at this time.
0 commit comments