diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/common.js b/openmetadata-ui/src/main/resources/ui/cypress/common/common.js index 6a5a3587b29..4dd24010719 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/common.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/common.js @@ -74,28 +74,33 @@ export const handleIngestionRetry = ( } }; const checkSuccessState = () => { - testIngestionsTab(); - retryCount++; - // the latest run should be success - cy.get(`.ant-table-tbody > :nth-child(${rowIndex}) > :nth-child(4)`).then( - ($ingestionStatus) => { - if ( - ($ingestionStatus.text() === 'Running' || - $ingestionStatus.text() === 'Queued' || $ingestionStatus.text() === '--') && - retryCount <= RETRY_TIMES - ) { - // retry after waiting for 20 seconds - cy.wait(20000); - cy.reload(); - checkSuccessState(); - } else { - cy.get(`.ant-table-tbody > :nth-child(${rowIndex}) > :nth-child(4)`).should( - 'have.text', - 'Success' - ); - } - } - ); + testIngestionsTab(); + retryCount++; + cy.get('body').then(($body) => { + if ($body.find('.ant-skeleton-input').length) { + cy.wait(1000); + } + }); + + // the latest run should be success + cy.get(`.ant-table-tbody > :nth-child(${rowIndex}) > :nth-child(4)`).then( + ($ingestionStatus) => { + + if ( + $ingestionStatus.text() !== 'Success' && + retryCount <= RETRY_TIMES + ) { + // retry after waiting for 20 seconds + cy.wait(20000); + cy.reload(); + checkSuccessState(); + } else { + cy.get( + `.ant-table-tbody > :nth-child(${rowIndex}) > :nth-child(4)` + ).should('have.text', 'Success'); + } + } + ); }; checkSuccessState(); @@ -889,7 +894,6 @@ export const addTeam = (TEAM_DETAILS) => { export const retryIngestionRun = () => { let retryCount = 0; - const testIngestionsTab = () => { cy.get('[data-testid="Ingestions"]').should('be.visible'); cy.get('[data-testid="Ingestions"] >> [data-testid="filter-count"]').should( @@ -903,28 +907,31 @@ export const retryIngestionRun = () => { }; const checkSuccessState = () => { - testIngestionsTab(); - retryCount++; - // the latest run should be success - cy.get('[data-testid="pipeline-status"]').then( - ($ingestionStatus) => { - if ( - ($ingestionStatus.text() === 'Running' || - $ingestionStatus.text() === 'Queued' || $ingestionStatus.text() === '--') && - retryCount <= RETRY_TIMES - ) { - // retry after waiting for 20 seconds - cy.wait(20000); - cy.reload(); - checkSuccessState(); - } else { - cy.get('[data-testid="pipeline-status"]').should( - 'have.text', - 'Success' - ); - } - } - ); + testIngestionsTab(); + retryCount++; + cy.get('body').then(($body) => { + if ($body.find('.ant-skeleton-input').length) { + cy.wait(1000); + } + }); + + // the latest run should be success + cy.get('[data-testid="pipeline-status"]').then(($ingestionStatus) => { + if ( + $ingestionStatus.text() !== 'Success' && + retryCount <= RETRY_TIMES + ) { + // retry after waiting for 20 seconds + cy.wait(20000); + cy.reload(); + checkSuccessState(); + } else { + cy.get('[data-testid="pipeline-status"]').should( + 'have.text', + 'Success' + ); + } + }); }; checkSuccessState(); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.js index 6b99e1e902f..b1c9f8deca1 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.js @@ -75,8 +75,8 @@ describe('Data Quality and Profiler should work properly', () => { serviceName ); }); - // Todo:- profiler is not retrying to get latest status in CLI - it.skip('Add Profiler ingestion', () => { + + it('Add Profiler ingestion', () => { login(LOGIN.username, LOGIN.password); cy.goToHomePage(); goToProfilerTab(); @@ -125,8 +125,8 @@ describe('Data Quality and Profiler should work properly', () => { handleIngestionRetry('database', true, 0, 'profiler'); }); - // Todo:- skipping for now as it flaky failure, need to check for cause of failure - it.skip('Check if profiler is ingested properly or not', () => { + + it('Check if profiler is ingested properly or not', () => { login(LOGIN.username, LOGIN.password); cy.goToHomePage(); goToProfilerTab();