@@ -1215,7 +1215,7 @@ describe("UserProfile", () => {
12151215 expect ( screen . queryByTestId ( "filter-by-CMS ID" ) ) . not . toBeInTheDocument ( ) ;
12161216 } ) ;
12171217
1218- it ( "uses ownerDisplayName sortInfo when sorting Shared Libraries by Owner " , async ( ) => {
1218+ it ( "does not make Owner sortable in Shared Libraries" , async ( ) => {
12191219 mockAdminSearchMeasures . mockResolvedValue ( pageWith ( [ ownedMeasure ] , 1 ) ) ;
12201220 mockFetchCqlLibraries
12211221 . mockResolvedValueOnce ( pageWith ( [ ] , 5 ) )
@@ -1229,32 +1229,11 @@ describe("UserProfile", () => {
12291229 await screen . findByTestId ( "library-name-lib2-content" ) ;
12301230
12311231 mockFetchCqlLibraries . mockClear ( ) ;
1232- fireEvent . click ( screen . getByRole ( "button" , { name : "Owner" } ) ) ;
1233-
1234- await waitFor ( ( ) => {
1235- expect ( mockFetchCqlLibraries ) . toHaveBeenCalledWith (
1236- "SHARED" ,
1237- 10 ,
1238- 0 ,
1239- { searchField : "" , optionalSearchProperties : [ ] } ,
1240- "ownerDisplayName,false" ,
1241- expect . any ( AbortSignal )
1242- ) ;
1243- } ) ;
1244-
1245- mockFetchCqlLibraries . mockClear ( ) ;
1246- fireEvent . click ( screen . getByRole ( "button" , { name : "Owner" } ) ) ;
1247-
1248- await waitFor ( ( ) => {
1249- expect ( mockFetchCqlLibraries ) . toHaveBeenCalledWith (
1250- "SHARED" ,
1251- 10 ,
1252- 0 ,
1253- { searchField : "" , optionalSearchProperties : [ ] } ,
1254- "ownerDisplayName,true" ,
1255- expect . any ( AbortSignal )
1256- ) ;
1257- } ) ;
1232+ expect ( screen . getByText ( "Owner" , { exact : true } ) ) . toBeInTheDocument ( ) ;
1233+ expect (
1234+ screen . queryByRole ( "button" , { name : "Owner" } )
1235+ ) . not . toBeInTheDocument ( ) ;
1236+ expect ( mockFetchCqlLibraries ) . not . toHaveBeenCalled ( ) ;
12581237 } ) ;
12591238
12601239 it ( "shows an error message when the search fails" , async ( ) => {
0 commit comments