Skip to content

Commit 738b58d

Browse files
committed
Added fixme for the audit log tests (#26020)
* Added fixme for the audit log tests * added comment
1 parent a17662c commit 738b58d

1 file changed

Lines changed: 61 additions & 54 deletions

File tree

openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AuditLogs.spec.ts

Lines changed: 61 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ test.describe('Audit Logs Page', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => {
398398
);
399399
});
400400

401-
test('should search audit logs', async ({ page }) => {
401+
// Audit log search api has very high latency due to which the test is getting timeout
402+
test.fixme('should search audit logs', async ({ page }) => {
402403
await test.step('Enter search term and press Enter', async () => {
403404
const searchInput = page.getByPlaceholder('Search audit logs');
404405
await searchInput.fill('admin');
@@ -438,7 +439,8 @@ test.describe('Audit Logs Page', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => {
438439
});
439440
});
440441

441-
test('should support case-insensitive search', async ({ page }) => {
442+
// Audit log search api has very high latency due to which the test is getting timeout
443+
test.fixme('should support case-insensitive search', async ({ page }) => {
442444
await test.step('Search with lowercase term', async () => {
443445
const searchInput = page.getByPlaceholder('Search audit logs');
444446
await searchInput.fill('admin');
@@ -684,7 +686,8 @@ test.describe('Audit Logs Page', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => {
684686
});
685687

686688
// Test audit log search functionality with existing data
687-
test.describe(
689+
// Audit log search api has very high latency due to which the test is getting timeout
690+
test.describe.fixme(
688691
'Audit Logs - Search Functionality',
689692
PLAYWRIGHT_BASIC_TEST_TAG_OBJ,
690693
() => {
@@ -809,70 +812,74 @@ test.describe(
809812
});
810813
});
811814

812-
test('should include filters and search in export request', async ({
813-
page,
814-
}) => {
815-
await redirectToHomePage(page);
816-
await settingClick(page, GlobalSettingOptions.AUDIT_LOGS);
815+
// Audit log search api has very high latency due to which the test is getting timeout
816+
test.fixme(
817+
'should include filters and search in export request',
818+
async ({ page }) => {
819+
await redirectToHomePage(page);
820+
await settingClick(page, GlobalSettingOptions.AUDIT_LOGS);
817821

818-
await page.getByTestId('export-audit-logs-button').waitFor({
819-
state: 'visible',
820-
});
821-
822-
await test.step('Enter a search term', async () => {
823-
const searchInput = page.getByPlaceholder('Search audit logs');
824-
await searchInput.fill('admin');
825-
826-
const auditResponse = page.waitForResponse((response) =>
827-
response.url().includes('/api/v1/audit')
828-
);
829-
await searchInput.press('Enter');
830-
await auditResponse;
831-
await page.waitForSelector('.ant-skeleton', {
832-
state: 'detached',
822+
await page.getByTestId('export-audit-logs-button').waitFor({
823+
state: 'visible',
833824
});
834-
});
835825

836-
await test.step('Open Export modal', async () => {
837-
const exportButton = page.getByTestId('export-audit-logs-button');
838-
await exportButton.click();
826+
await test.step('Enter a search term', async () => {
827+
const searchInput = page.getByPlaceholder('Search audit logs');
828+
await searchInput.fill('admin');
839829

840-
await page.waitForSelector('.ant-modal-content', {
841-
state: 'visible',
830+
const auditResponse = page.waitForResponse((response) =>
831+
response.url().includes('/api/v1/audit')
832+
);
833+
await searchInput.press('Enter');
834+
await auditResponse;
835+
await page.waitForSelector('.ant-skeleton', {
836+
state: 'detached',
837+
});
842838
});
843-
});
844839

845-
await test.step(
846-
'Select date range and verify export includes search term',
847-
async () => {
848-
const dateRangePicker = page.getByTestId('export-date-range-picker');
849-
await dateRangePicker.click();
840+
await test.step('Open Export modal', async () => {
841+
const exportButton = page.getByTestId('export-audit-logs-button');
842+
await exportButton.click();
850843

851-
await page.waitForSelector('.ant-picker-dropdown', {
844+
await page.waitForSelector('.ant-modal-content', {
852845
state: 'visible',
853846
});
847+
});
854848

855-
const todayCell = page.locator(
856-
'.ant-picker-dropdown:visible .ant-picker-cell-today'
857-
);
858-
await todayCell.click();
859-
await todayCell.click();
849+
await test.step(
850+
'Select date range and verify export includes search term',
851+
async () => {
852+
const dateRangePicker = page.getByTestId(
853+
'export-date-range-picker'
854+
);
855+
await dateRangePicker.click();
860856

861-
const exportApiCall = page.waitForRequest(
862-
(request) =>
863-
request.url().includes('/api/v1/audit/logs/export') &&
864-
request.url().includes('q=admin')
865-
);
857+
await page.waitForSelector('.ant-picker-dropdown', {
858+
state: 'visible',
859+
});
866860

867-
const exportOkButton = page.locator(
868-
'.ant-modal-footer button.ant-btn-primary'
869-
);
870-
await exportOkButton.click();
861+
const todayCell = page.locator(
862+
'.ant-picker-dropdown:visible .ant-picker-cell-today'
863+
);
864+
await todayCell.click();
865+
await todayCell.click();
871866

872-
await exportApiCall;
873-
}
874-
);
875-
});
867+
const exportApiCall = page.waitForRequest(
868+
(request) =>
869+
request.url().includes('/api/v1/audit/logs/export') &&
870+
request.url().includes('q=admin')
871+
);
872+
873+
const exportOkButton = page.locator(
874+
'.ant-modal-footer button.ant-btn-primary'
875+
);
876+
await exportOkButton.click();
877+
878+
await exportApiCall;
879+
}
880+
);
881+
}
882+
);
876883

877884
test('should validate export response structure', async ({ page }) => {
878885
await redirectToHomePage(page);

0 commit comments

Comments
 (0)