From 959b8a0f1fc9f015b3f22d5b22373f310a53ff4f Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Fri, 26 Apr 2024 21:13:37 +0530 Subject: [PATCH] Minor: Observability and ActivityFeed cypress fixes (#16061) * Modify Observability cypress test to eliminate flakiness * revert the cypress config changes --- .../ui/cypress/e2e/Features/ActivityFeed.spec.ts | 4 +++- .../cypress/e2e/Flow/ObservabilityAlerts.spec.ts | 14 +++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/ActivityFeed.spec.ts b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/ActivityFeed.spec.ts index 42722e62070..4a61379d318 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/ActivityFeed.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/ActivityFeed.spec.ts @@ -43,7 +43,9 @@ const reactOnFeed = (feedSelector: string, reaction: string) => { const table1 = generateRandomTable(); const table2 = DATABASE_SERVICE.entity; -describe('Activity feed', () => { +// Temporarily skipping the test +// TODO: Update the test with Activity Feed Revamp feature +describe.skip('Activity feed', () => { before(() => { cy.login(); cy.getAllLocalStorage().then((data) => { diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/ObservabilityAlerts.spec.ts b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/ObservabilityAlerts.spec.ts index 4f03520c634..a2a2970e375 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/ObservabilityAlerts.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/ObservabilityAlerts.spec.ts @@ -67,7 +67,6 @@ describe( user: { id: '', displayName: '', - id: '', }, domain: { name: '', @@ -404,14 +403,19 @@ describe( .click(); // Search and select filter input value - interceptURL('GET', `/api/v1/search/query?q=*`, 'getSearchResult'); + interceptURL( + 'GET', + `/api/v1/search/query?q=*`, + `search${filter.name}` + ); cy.get(`[data-testid="${filter.inputSelector}"]`) .click() .type(filter.inputValue); - // Adding manual wait here as as safe since debounced API is not being detected in the cypress - cy.wait(500); - verifyResponseStatusCode('@getSearchResult', 200); + cy.wait(`@search${filter.name}`, { + requestTimeout: 10000, + }); + cy.get(`[title="${filter.inputValue}"]`) .filter(':visible') .scrollIntoView()