Skip to content

Commit a87cb93

Browse files
committed
fix: tests
1 parent 56fd626 commit a87cb93

File tree

3 files changed

+0
-87
lines changed

3 files changed

+0
-87
lines changed

tests/suites/tenant/diagnostics/tabs/access.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ test.describe('Diagnostics Access tab', async () => {
7272
database: '/local',
7373
tenantPage: 'diagnostics',
7474
diagnosticsTab: 'access',
75-
summaryTab: 'acl',
7675
};
7776
const tenantPage = new TenantPage(page);
7877
await tenantPage.goto(pageQueryParams);
@@ -91,7 +90,6 @@ test.describe('Diagnostics Access tab', async () => {
9190
database: '/local',
9291
tenantPage: 'diagnostics',
9392
diagnosticsTab: 'access',
94-
summaryTab: 'acl',
9593
};
9694
const tenantPage = new TenantPage(page);
9795
await tenantPage.goto(pageQueryParams);

tests/suites/tenant/summary/ObjectSummary.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {RowTableAction} from './types';
88

99
export enum ObjectSummaryTab {
1010
Overview = 'Overview',
11-
ACL = 'ACL',
1211
Schema = 'Schema',
1312
}
1413
export class ObjectSummary {
@@ -113,37 +112,6 @@ export class ObjectSummary {
113112
await this.createDirectoryModal.waitFor({state: 'hidden', timeout: VISIBILITY_TIMEOUT});
114113
}
115114

116-
async waitForAclVisible() {
117-
// In the new UI, the ACL tab shows a redirect message instead of the actual ACL content
118-
const redirectMessage = this.page.locator('text=Section was moved to Diagnostics');
119-
await redirectMessage.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
120-
return true;
121-
}
122-
123-
async getRedirectMessage(): Promise<string | null> {
124-
const redirectMessage = this.page.locator('text=Section was moved to Diagnostics');
125-
if (await redirectMessage.isVisible()) {
126-
return redirectMessage.textContent();
127-
}
128-
return null;
129-
}
130-
131-
async hasOpenInDiagnosticsButton(): Promise<boolean> {
132-
try {
133-
const diagnosticsButton = this.page.getByRole('button', {name: 'Open in Diagnostics'});
134-
await diagnosticsButton.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
135-
return true;
136-
} catch (error) {
137-
console.error('Open in Diagnostics button not visible:', error);
138-
return false;
139-
}
140-
}
141-
142-
async clickOpenInDiagnosticsButton(): Promise<void> {
143-
const diagnosticsButton = this.page.getByRole('button', {name: 'Open in Diagnostics'});
144-
await diagnosticsButton.click();
145-
}
146-
147115
async isTreeVisible() {
148116
await this.tree.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
149117
return true;

tests/suites/tenant/summary/objectSummary.test.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -269,57 +269,4 @@ test.describe('Object Summary', async () => {
269269
await objectSummary.expandSummary();
270270
await expect(objectSummary.isSummaryCollapsed()).resolves.toBe(false);
271271
});
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',
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',
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-
});
325272
});

0 commit comments

Comments
 (0)