Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions src/containers/Tenant/Acl/Acl.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/containers/Tenant/Acl/i18n/en.json

This file was deleted.

7 changes: 0 additions & 7 deletions src/containers/Tenant/Acl/i18n/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/containers/Tenant/ObjectSummary/ObjectSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
formatSecondsToHours,
} from '../../../utils/dataFormatters/dataFormatters';
import {useTypedDispatch, useTypedSelector} from '../../../utils/hooks';
import {Acl} from '../Acl/Acl';
import {EntityTitle} from '../EntityTitle/EntityTitle';
import {SchemaViewer} from '../Schema/SchemaViewer/SchemaViewer';
import {useCurrentSchema} from '../TenantContext';
Expand Down Expand Up @@ -366,9 +365,6 @@ export function ObjectSummary({

const renderTabContent = () => {
switch (summaryTab) {
case TENANT_SUMMARY_TABS_IDS.acl: {
return <Acl />;
}
case TENANT_SUMMARY_TABS_IDS.schema: {
return <SchemaViewer type={type} path={path} tenantName={tenantName} />;
}
Expand Down
4 changes: 0 additions & 4 deletions src/containers/Tenant/TenantPages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ export const TENANT_INFO_TABS = [
id: TENANT_SUMMARY_TABS_IDS.overview,
title: 'Overview',
},
{
id: TENANT_SUMMARY_TABS_IDS.acl,
title: 'ACL',
},
];

export const TENANT_SCHEMA_TAB = [
Expand Down
1 change: 0 additions & 1 deletion src/store/reducers/tenant/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const TENANT_DIAGNOSTICS_TABS_IDS = {

export const TENANT_SUMMARY_TABS_IDS = {
overview: 'overview',
acl: 'acl',
schema: 'schema',
} as const;

Expand Down
2 changes: 0 additions & 2 deletions tests/suites/tenant/diagnostics/tabs/access.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ test.describe('Diagnostics Access tab', async () => {
database: '/local',
tenantPage: 'diagnostics',
diagnosticsTab: 'access',
summaryTab: 'acl',
};
const tenantPage = new TenantPage(page);
await tenantPage.goto(pageQueryParams);
Expand All @@ -91,7 +90,6 @@ test.describe('Diagnostics Access tab', async () => {
database: '/local',
tenantPage: 'diagnostics',
diagnosticsTab: 'access',
summaryTab: 'acl',
};
const tenantPage = new TenantPage(page);
await tenantPage.goto(pageQueryParams);
Expand Down
32 changes: 0 additions & 32 deletions tests/suites/tenant/summary/ObjectSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type {RowTableAction} from './types';

export enum ObjectSummaryTab {
Overview = 'Overview',
ACL = 'ACL',
Schema = 'Schema',
}
export class ObjectSummary {
Expand Down Expand Up @@ -113,37 +112,6 @@ export class ObjectSummary {
await this.createDirectoryModal.waitFor({state: 'hidden', timeout: VISIBILITY_TIMEOUT});
}

async waitForAclVisible() {
// In the new UI, the ACL tab shows a redirect message instead of the actual ACL content
const redirectMessage = this.page.locator('text=Section was moved to Diagnostics');
await redirectMessage.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
return true;
}

async getRedirectMessage(): Promise<string | null> {
const redirectMessage = this.page.locator('text=Section was moved to Diagnostics');
if (await redirectMessage.isVisible()) {
return redirectMessage.textContent();
}
return null;
}

async hasOpenInDiagnosticsButton(): Promise<boolean> {
try {
const diagnosticsButton = this.page.getByRole('button', {name: 'Open in Diagnostics'});
await diagnosticsButton.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
return true;
} catch (error) {
console.error('Open in Diagnostics button not visible:', error);
return false;
}
}

async clickOpenInDiagnosticsButton(): Promise<void> {
const diagnosticsButton = this.page.getByRole('button', {name: 'Open in Diagnostics'});
await diagnosticsButton.click();
}

async isTreeVisible() {
await this.tree.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
return true;
Expand Down
53 changes: 0 additions & 53 deletions tests/suites/tenant/summary/objectSummary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,57 +269,4 @@ test.describe('Object Summary', async () => {
await objectSummary.expandSummary();
await expect(objectSummary.isSummaryCollapsed()).resolves.toBe(false);
});

test('ACL tab shows redirect message and link to Diagnostics', async ({page}) => {
// Define the URL parameters
const pageQueryParams = {
schema: '/local',
database: '/local',
summaryTab: 'acl',
tenantPage: 'query',
};

// Navigate to the page
const tenantPage = new TenantPage(page);
await tenantPage.goto(pageQueryParams);

// Get the ObjectSummary instance
const objectSummary = new ObjectSummary(page);

// Verify the ACL tab is selected
await objectSummary.clickTab(ObjectSummaryTab.ACL);

// Wait for the ACL content to be visible
await objectSummary.waitForAclVisible();

// Check for the redirect message
const redirectMessage = await objectSummary.getRedirectMessage();
expect(redirectMessage).toContain('Section was moved to Diagnostics');

// Check for the "Open in Diagnostics" button
const hasButton = await objectSummary.hasOpenInDiagnosticsButton();
expect(hasButton).toBe(true);

// Click the button and verify the URL
await objectSummary.clickOpenInDiagnosticsButton();

// Verify the URL contains the expected parameters
const expectedUrlParams = new URLSearchParams({
tenantPage: 'diagnostics',
diagnosticsTab: 'access',
summaryTab: 'acl',
schema: '/local',
database: '/local',
});

// Get the current URL and parse its parameters
const currentUrl = page.url();
const currentUrlObj = new URL(currentUrl);
const currentParams = currentUrlObj.searchParams;

// Verify each expected parameter is in the URL
for (const [key, value] of expectedUrlParams.entries()) {
expect(currentParams.get(key)).toBe(value);
}
});
});
Loading