fix(ui): update default status to empty instead queued (#8716)

This commit is contained in:
Chirag Madlani 2022-11-14 21:30:16 +05:30 committed by GitHub
parent 83003a42da
commit 3b4c5d4e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 40 deletions

View File

@ -53,11 +53,11 @@ export const handleIngestionRetry = (
const rowIndex = ingestionType === 'metadata' ? 1 : 2; const rowIndex = ingestionType === 'metadata' ? 1 : 2;
interceptURL('GET', '/api/v1/services/ingestionPipelines/*/pipelineStatus?*', 'pipelineStatuses') interceptURL('GET', '/api/v1/services/ingestionPipelines/*/pipelineStatus?*', 'pipelineStatuses')
// ingestions page // ingestions page
let retryCount = count; let retryCount = count;
const testIngestionsTab = () => { const testIngestionsTab = () => {
cy.get('[data-testid="Ingestions"]').should('be.visible'); cy.get('[data-testid="Ingestions"]').should('be.visible');
cy.get('[data-testid="Ingestions"] >> [data-testid="filter-count"]').should( cy.get('[data-testid="Ingestions"] >> [data-testid="filter-count"]').should(
'have.text', 'have.text',
@ -81,7 +81,7 @@ export const handleIngestionRetry = (
($ingestionStatus) => { ($ingestionStatus) => {
if ( if (
($ingestionStatus.text() === 'Running' || ($ingestionStatus.text() === 'Running' ||
$ingestionStatus.text() === 'Queued') && $ingestionStatus.text() === 'Queued' || $ingestionStatus.text() === '--') &&
retryCount <= RETRY_TIMES retryCount <= RETRY_TIMES
) { ) {
// retry after waiting for 20 seconds // retry after waiting for 20 seconds
@ -136,7 +136,7 @@ export const testServiceCreationAndIngestion = (
cy.get('[data-testid="service-name"]').should('exist').type(serviceName); cy.get('[data-testid="service-name"]').should('exist').type(serviceName);
interceptURL('GET', 'api/v1/services/ingestionPipelines/*', 'getIngestionPipelineStatus') interceptURL('GET', 'api/v1/services/ingestionPipelines/*', 'getIngestionPipelineStatus')
cy.get('[data-testid="next-button"]').click(); cy.get('[data-testid="next-button"]').click();
verifyResponseStatusCode('@getIngestionPipelineStatus', 200) verifyResponseStatusCode('@getIngestionPipelineStatus', 200)
// Connection Details in step 3 // Connection Details in step 3
cy.get('[data-testid="add-new-service-container"]') cy.get('[data-testid="add-new-service-container"]')
.parent() .parent()
@ -163,7 +163,7 @@ verifyResponseStatusCode('@getIngestionPipelineStatus', 200)
cy.contains('Connection test was successful').should('exist'); cy.contains('Connection test was successful').should('exist');
interceptURL('GET', '/api/v1/services/ingestionPipelines/status', 'getIngestionPipelineStatus') interceptURL('GET', '/api/v1/services/ingestionPipelines/status', 'getIngestionPipelineStatus')
cy.get('[data-testid="submit-btn"]').should('exist').click(); cy.get('[data-testid="submit-btn"]').should('exist').click();
verifyResponseStatusCode('@getIngestionPipelineStatus', 200); verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
// check success // check success
cy.get('[data-testid="success-line"]').should('be.visible'); cy.get('[data-testid="success-line"]').should('be.visible');
cy.contains(`"${serviceName}"`).should('be.visible'); cy.contains(`"${serviceName}"`).should('be.visible');
@ -217,7 +217,7 @@ verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
export const deleteCreatedService = (typeOfService, service_Name, apiService) => { export const deleteCreatedService = (typeOfService, service_Name, apiService) => {
//Click on settings page //Click on settings page
cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click({force : true}); cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click({ force: true });
// Services page // Services page
interceptURL('GET', '/api/v1/services/*', 'getServices'); interceptURL('GET', '/api/v1/services/*', 'getServices');
@ -272,7 +272,7 @@ export const deleteCreatedService = (typeOfService, service_Name, apiService) =>
cy.get('[data-testid="confirm-button"]').should('be.visible').click(); cy.get('[data-testid="confirm-button"]').should('be.visible').click();
verifyResponseStatusCode('@deleteService', 200); verifyResponseStatusCode('@deleteService', 200);
//Waiting to check if myData page redirection is proper after deleting service //Waiting to check if myData page redirection is proper after deleting service
cy.get('[data-testid="tables"]').should('exist').should('be.visible'); cy.get('[data-testid="tables"]').should('exist').should('be.visible');
@ -280,10 +280,10 @@ export const deleteCreatedService = (typeOfService, service_Name, apiService) =>
toastNotification(`${typeOfService} Service deleted successfully!`) toastNotification(`${typeOfService} Service deleted successfully!`)
//Checking if the service got deleted successfully //Checking if the service got deleted successfully
interceptURL('GET', '/api/v1/teams/name/Organization?fields=users,owns,defaultRoles,policies,owner,parents,childrenCount&include=all', 'getSettingsPage') interceptURL('GET', '/api/v1/teams/name/Organization?fields=users,owns,defaultRoles,policies,owner,parents,childrenCount&include=all', 'getSettingsPage')
cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click(); cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click();
verifyResponseStatusCode('@getSettingsPage', 200) verifyResponseStatusCode('@getSettingsPage', 200)
// Services page // Services page
cy.get('[data-testid="settings-left-panel"]') cy.get('[data-testid="settings-left-panel"]')
.contains(typeOfService) .contains(typeOfService)
@ -294,12 +294,12 @@ export const deleteCreatedService = (typeOfService, service_Name, apiService) =>
}; };
export const editOwnerforCreatedService = ( export const editOwnerforCreatedService = (
service_type, service_type,
service_Name, service_Name,
api_services api_services
) => { ) => {
//Click on settings page //Click on settings page
cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click(); cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click();
// Services page // Services page
cy.get('.ant-menu-title-content') cy.get('.ant-menu-title-content')
@ -307,26 +307,26 @@ export const editOwnerforCreatedService = (
.should('be.visible') .should('be.visible')
.click(); .click();
interceptURL( interceptURL(
'GET', 'GET',
`/api/v1/services/${api_services}/name/${service_Name}?fields=owner`, `/api/v1/services/${api_services}/name/${service_Name}?fields=owner`,
'getSelectedService' 'getSelectedService'
); );
interceptURL( interceptURL(
'GET', 'GET',
`/api/v1/services/ingestionPipelines?fields=owner,pipelineStatuses&service=${service_Name}`, `/api/v1/services/ingestionPipelines?fields=owner,pipelineStatuses&service=${service_Name}`,
'waitForIngestion' 'waitForIngestion'
); );
//click on created service //click on created service
cy.get(`[data-testid="service-name-${service_Name}"]`) cy.get(`[data-testid="service-name-${service_Name}"]`)
.should('exist') .should('exist')
.should('be.visible') .should('be.visible')
.click(); .click();
verifyResponseStatusCode('@getSelectedService', 200); verifyResponseStatusCode('@getSelectedService', 200);
verifyResponseStatusCode('@waitForIngestion', 200); verifyResponseStatusCode('@waitForIngestion', 200);
interceptURL( interceptURL(
'GET', 'GET',
@ -334,12 +334,12 @@ export const editOwnerforCreatedService = (
'waitForTeams' 'waitForTeams'
); );
//Click on edit owner button //Click on edit owner button
cy.get('[data-testid="edit-Owner-icon"]') cy.get('[data-testid="edit-Owner-icon"]')
.should('exist') .should('exist')
.should('be.visible') .should('be.visible')
.trigger('mouseover') .trigger('mouseover')
.click(); .click();
verifyResponseStatusCode('@waitForTeams', 200); verifyResponseStatusCode('@waitForTeams', 200);
@ -621,7 +621,7 @@ export const restoreUser = (username) => {
.should('exist') .should('exist')
.should('be.visible') .should('be.visible')
.click(); .click();
verifyResponseStatusCode('@restoreUser', 200); verifyResponseStatusCode('@restoreUser', 200);
toastNotification('User restored successfully!'); toastNotification('User restored successfully!');
//Verifying the restored user //Verifying the restored user
@ -906,7 +906,7 @@ export const retryIngestionRun = () => {
($ingestionStatus) => { ($ingestionStatus) => {
if ( if (
($ingestionStatus.text() === 'Running' || ($ingestionStatus.text() === 'Running' ||
$ingestionStatus.text() === 'Queued') && $ingestionStatus.text() === 'Queued' || $ingestionStatus.text() === '--') &&
retryCount <= RETRY_TIMES retryCount <= RETRY_TIMES
) { ) {
// retry after waiting for 20 seconds // retry after waiting for 20 seconds

View File

@ -135,7 +135,7 @@ export const IngestionRecentRuns: FunctionComponent<Props> = ({
) : ( ) : (
status status
); );
}) ?? 'Queued' }) ?? '--'
)} )}
</Space> </Space>
); );