diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/DataInsightUtils.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/DataInsightUtils.ts index eb48e4a5e55..f172da110c3 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/DataInsightUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/DataInsightUtils.ts @@ -20,6 +20,11 @@ export const checkDataInsightSuccessStatus = ( count = 1, timer = BASE_WAIT_TIME ) => { + interceptURL( + 'GET', + '/api/v1/apps/name/DataInsightsApplication/status?*', + 'getAppStatus' + ); cy.get('[data-testid="app-run-history-table"]') .find('[data-testid="pipeline-status"]') .first() @@ -35,6 +40,7 @@ export const checkDataInsightSuccessStatus = ( cy.wait(timer); timer *= 2; cy.reload(); + verifyResponseStatusCode('@getAppStatus', 200); checkDataInsightSuccessStatus(++count, timer * 2); } else { if ($ingestionStatus.text() !== 'Success') { diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/Services/PostgresIngestionClass.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/Services/PostgresIngestionClass.ts index 0975c70e96e..2175515f9bc 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/Services/PostgresIngestionClass.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/Services/PostgresIngestionClass.ts @@ -12,6 +12,7 @@ */ import { SERVICE_TYPE } from '../../constants/constants'; import { EntityType } from '../../constants/Entity.interface'; +import { POSTGRES } from '../../constants/service.constants'; import { checkServiceFieldSectionHighlighting, interceptURL, @@ -29,7 +30,12 @@ class PostgresIngestionClass extends ServiceBaseClass { queryLogFilePath: string; constructor() { - super(Services.Database, 'cypress-Postgres', 'Postgres', 'order_items'); + super( + Services.Database, + POSTGRES.serviceName, + POSTGRES.serviceType, + POSTGRES.tableName + ); this.filterPattern = 'sales'; this.queryLogFilePath = diff --git a/openmetadata-ui/src/main/resources/ui/cypress/constants/service.constants.ts b/openmetadata-ui/src/main/resources/ui/cypress/constants/service.constants.ts index c870ae31878..c1a98c9d8cf 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/constants/service.constants.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/constants/service.constants.ts @@ -33,6 +33,12 @@ export const REDSHIFT = { description: `This is Redshift-ct-test-${uniqueID} description`, }; +export const POSTGRES = { + serviceType: 'Postgres', + serviceName: `cy-postgres-test-${uniqueID}`, + tableName: 'order_items', +}; + export const MYSQL = { serviceType: 'Mysql', serviceName: `mysql-ct-test-${uniqueID}`,