@@ -158,31 +158,6 @@ test.describe('Object Summary', async () => {
158
158
expect ( vslotsColumns ) . not . toEqual ( storagePoolsColumns ) ;
159
159
} ) ;
160
160
161
- test ( 'ACL tab shows correct access rights' , async ( { page} ) => {
162
- const pageQueryParams = {
163
- schema : '/local/.sys_health' ,
164
- database : '/local' ,
165
- summaryTab : 'acl' ,
166
- tenantPage : 'query' ,
167
- } ;
168
- const tenantPage = new TenantPage ( page ) ;
169
- await tenantPage . goto ( pageQueryParams ) ;
170
-
171
- const objectSummary = new ObjectSummary ( page ) ;
172
- await objectSummary . waitForAclVisible ( ) ;
173
-
174
- // Check Access Rights
175
- const accessRights = await objectSummary . getAccessRights ( ) ;
176
- expect ( accessRights ) . toEqual ( [ { user : 'root@builtin' , rights : 'Owner' } ] ) ;
177
-
178
- // Check Effective Access Rights
179
- const effectiveRights = await objectSummary . getEffectiveAccessRights ( ) ;
180
- expect ( effectiveRights ) . toEqual ( [
181
- { group : 'Access' , permissions : [ 'Manage' ] } ,
182
- { group : 'Inheritance type' , permissions : [ 'Inherit' ] } ,
183
- ] ) ;
184
- } ) ;
185
-
186
161
test ( 'Copy path copies correct path to clipboard' , async ( { page} ) => {
187
162
const pageQueryParams = {
188
163
schema : dsVslotsSchema ,
@@ -294,4 +269,57 @@ test.describe('Object Summary', async () => {
294
269
await objectSummary . expandSummary ( ) ;
295
270
await expect ( objectSummary . isSummaryCollapsed ( ) ) . resolves . toBe ( false ) ;
296
271
} ) ;
272
+
273
+ test ( 'ACL tab shows redirect message and link to Diagnostics' , async ( { page} ) => {
274
+ // Define the URL parameters
275
+ const pageQueryParams = {
276
+ schema : '/local/.sys_health' ,
277
+ database : '/local' ,
278
+ summaryTab : 'acl' ,
279
+ tenantPage : 'query' ,
280
+ } ;
281
+
282
+ // Navigate to the page
283
+ const tenantPage = new TenantPage ( page ) ;
284
+ await tenantPage . goto ( pageQueryParams ) ;
285
+
286
+ // Get the ObjectSummary instance
287
+ const objectSummary = new ObjectSummary ( page ) ;
288
+
289
+ // Verify the ACL tab is selected
290
+ await objectSummary . clickTab ( ObjectSummaryTab . ACL ) ;
291
+
292
+ // Wait for the ACL content to be visible
293
+ await objectSummary . waitForAclVisible ( ) ;
294
+
295
+ // Check for the redirect message
296
+ const redirectMessage = await objectSummary . getRedirectMessage ( ) ;
297
+ expect ( redirectMessage ) . toContain ( 'Section was moved to Diagnostics' ) ;
298
+
299
+ // Check for the "Open in Diagnostics" button
300
+ const hasButton = await objectSummary . hasOpenInDiagnosticsButton ( ) ;
301
+ expect ( hasButton ) . toBe ( true ) ;
302
+
303
+ // Click the button and verify the URL
304
+ await objectSummary . clickOpenInDiagnosticsButton ( ) ;
305
+
306
+ // Verify the URL contains the expected parameters
307
+ const expectedUrlParams = new URLSearchParams ( {
308
+ tenantPage : 'diagnostics' ,
309
+ diagnosticsTab : 'access' ,
310
+ summaryTab : 'acl' ,
311
+ schema : '/local/.sys_health' ,
312
+ database : '/local' ,
313
+ } ) ;
314
+
315
+ // Get the current URL and parse its parameters
316
+ const currentUrl = page . url ( ) ;
317
+ const currentUrlObj = new URL ( currentUrl ) ;
318
+ const currentParams = currentUrlObj . searchParams ;
319
+
320
+ // Verify each expected parameter is in the URL
321
+ for ( const [ key , value ] of expectedUrlParams . entries ( ) ) {
322
+ expect ( currentParams . get ( key ) ) . toBe ( value ) ;
323
+ }
324
+ } ) ;
297
325
} ) ;
0 commit comments