cypress: fixed service ingestion cypress for test connection (#15989)

* cypress: fixed service ingestion cypress for test connection

* remove unwanted wait for get request
This commit is contained in:
Shailesh Parmar 2024-04-23 12:12:51 +05:30 committed by GitHub
parent 2ee0d6f847
commit 14ba83a427
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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');