From 14ba83a42736a43323a70cad5eb285c1a1b91296 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Tue, 23 Apr 2024 12:12:51 +0530 Subject: [PATCH] cypress: fixed service ingestion cypress for test connection (#15989) * cypress: fixed service ingestion cypress for test connection * remove unwanted wait for get request --- .../main/resources/ui/cypress/common/Utils/Services.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Services.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Services.ts index b5adf59afb3..306d0120db7 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Services.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Services.ts @@ -180,7 +180,7 @@ export const testConnection = () => { 'triggerWorkflow' ); - interceptURL('GET', '/api/v1/automations/workflows/*', 'getWorkflow'); + interceptURL('DELETE', '/api/v1/automations/workflows/*', 'deleteWorkflow'); cy.get('[data-testid="test-connection-btn"]').should('exist').click(); @@ -192,11 +192,16 @@ export const testConnection = () => { responseTimeout: 120000, }); cy.get('[data-testid="test-connection-modal"]').should('exist'); + + // added extra buffer time as deleteWorkflow API can take up to 2 minute or more to send request + verifyResponseStatusCode('@deleteWorkflow', 200, { + requestTimeout: 150000, + }); cy.get('.ant-modal-footer > .ant-btn-primary') .should('exist') .contains('OK') .click(); - verifyResponseStatusCode('@getWorkflow', 200); + cy.get('[data-testid="messag-text"]').then(($message) => { if ($message.text().includes('partially successful')) { cy.contains('Test connection partially successful').should('exist');