fixed kafka cypress test (#11313)

* fixed kafka cypress test

* added API wait for dbt

* added wait on database

* reverting cypress.config changes
This commit is contained in:
Shailesh Parmar 2023-04-27 19:30:45 +05:30 committed by GitHub
parent 6c94f37ee1
commit 33c429f67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 4 deletions

View File

@ -110,12 +110,13 @@ export const handleIngestionRetry = (
testIngestionsTab(); testIngestionsTab();
if (retryCount !== 0) { if (retryCount !== 0) {
verifyResponseStatusCode('@serviceDetails', 200);
verifyResponseStatusCode('@ingestionPipelines', 200); verifyResponseStatusCode('@ingestionPipelines', 200);
verifyResponseStatusCode('@airflow', 200);
verifyResponseStatusCode('@pipelineStatuses', 200, { verifyResponseStatusCode('@pipelineStatuses', 200, {
responseTimeout: 50000, responseTimeout: 50000,
}); });
verifyResponseStatusCode('@ingestionPermissions', 200); verifyResponseStatusCode('@ingestionPermissions', 200);
verifyResponseStatusCode('@airflow', 200);
} }
retryCount++; retryCount++;
@ -134,7 +135,6 @@ export const handleIngestionRetry = (
cy.wait(timer); cy.wait(timer);
timer *= 2; timer *= 2;
cy.reload(); cy.reload();
verifyResponseStatusCode('@serviceDetails', 200);
checkSuccessState(); checkSuccessState();
} else { } else {
cy.get('@checkRun').should('have.text', 'Success'); cy.get('@checkRun').should('have.text', 'Success');
@ -301,9 +301,9 @@ export const testServiceCreationAndIngestion = (
interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails'); interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails');
cy.get('[data-testid="view-service-button"]').should('be.visible').click(); cy.get('[data-testid="view-service-button"]').should('be.visible').click();
verifyResponseStatusCode('@serviceDetails', 200);
verifyResponseStatusCode('@getIngestionPipelineStatus', 200); verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
verifyResponseStatusCode('@ingestionPipelines', 200); verifyResponseStatusCode('@ingestionPipelines', 200);
verifyResponseStatusCode('@serviceDetails', 200);
handleIngestionRetry(type, testIngestionButton); handleIngestionRetry(type, testIngestionButton);
}; };

View File

@ -131,6 +131,7 @@ describe('RedShift Ingestion', () => {
'ingestionPermissions' 'ingestionPermissions'
); );
interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails'); interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails');
interceptURL('GET', '/api/v1/databases?*', 'databases');
cy.get(`[data-testid="service-name-${REDSHIFT.serviceName}"]`) cy.get(`[data-testid="service-name-${REDSHIFT.serviceName}"]`)
.should('exist') .should('exist')
.click(); .click();
@ -140,6 +141,7 @@ describe('RedShift Ingestion', () => {
}); });
verifyResponseStatusCode('@serviceDetails', 200); verifyResponseStatusCode('@serviceDetails', 200);
verifyResponseStatusCode('@airflow', 200); verifyResponseStatusCode('@airflow', 200);
verifyResponseStatusCode('@databases', 200);
cy.get('[data-testid="tabs"]').should('exist'); cy.get('[data-testid="tabs"]').should('exist');
cy.get('[data-testid="Ingestions"]') cy.get('[data-testid="Ingestions"]')
.scrollIntoView() .scrollIntoView()
@ -181,11 +183,24 @@ describe('RedShift Ingestion', () => {
scheduleIngestion(); scheduleIngestion();
cy.wait('@deployIngestion').then(() => { cy.wait('@deployIngestion').then(() => {
interceptURL(
'GET',
'/api/v1/services/ingestionPipelines?*',
'ingestionPipelines'
);
interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails');
interceptURL(
'GET',
'/api/v1/services/ingestionPipelines/status',
'getIngestionPipelineStatus'
);
cy.get('[data-testid="view-service-button"]') cy.get('[data-testid="view-service-button"]')
.scrollIntoView() .scrollIntoView()
.should('be.visible') .should('be.visible')
.click(); .click();
verifyResponseStatusCode('@serviceDetails', 200);
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
verifyResponseStatusCode('@ingestionPipelines', 200);
handleIngestionRetry('database', true, 0, 'dbt'); handleIngestionRetry('database', true, 0, 'dbt');
}); });
}); });