mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
Cypress: Updated condition for service page (#8822)
* Cypress: Updated condition for service page * added wait for skeleton load * condition fixed at retry of ingetion
This commit is contained in:
parent
8c67e0f627
commit
e74ec6f7e2
@ -76,12 +76,18 @@ export const handleIngestionRetry = (
|
||||
const checkSuccessState = () => {
|
||||
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() === 'Running' ||
|
||||
$ingestionStatus.text() === 'Queued' || $ingestionStatus.text() === '--') &&
|
||||
$ingestionStatus.text() !== 'Success' &&
|
||||
retryCount <= RETRY_TIMES
|
||||
) {
|
||||
// retry after waiting for 20 seconds
|
||||
@ -89,10 +95,9 @@ export const handleIngestionRetry = (
|
||||
cy.reload();
|
||||
checkSuccessState();
|
||||
} else {
|
||||
cy.get(`.ant-table-tbody > :nth-child(${rowIndex}) > :nth-child(4)`).should(
|
||||
'have.text',
|
||||
'Success'
|
||||
);
|
||||
cy.get(
|
||||
`.ant-table-tbody > :nth-child(${rowIndex}) > :nth-child(4)`
|
||||
).should('have.text', 'Success');
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -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(
|
||||
@ -905,12 +909,16 @@ export const retryIngestionRun = () => {
|
||||
const checkSuccessState = () => {
|
||||
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) => {
|
||||
cy.get('[data-testid="pipeline-status"]').then(($ingestionStatus) => {
|
||||
if (
|
||||
($ingestionStatus.text() === 'Running' ||
|
||||
$ingestionStatus.text() === 'Queued' || $ingestionStatus.text() === '--') &&
|
||||
$ingestionStatus.text() !== 'Success' &&
|
||||
retryCount <= RETRY_TIMES
|
||||
) {
|
||||
// retry after waiting for 20 seconds
|
||||
@ -923,8 +931,7 @@ export const retryIngestionRun = () => {
|
||||
'Success'
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
checkSuccessState();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user