Cypress: Fixed failing cypress test in main and glossary search localization (#9730)

This commit is contained in:
Shailesh Parmar 2023-01-16 12:21:24 +05:30 committed by GitHub
parent 3785ea8515
commit 9d08cf7eb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View File

@ -173,7 +173,6 @@ export const goToAdvanceSearch = () => {
.should('exist') .should('exist')
.and('be.visible') .and('be.visible')
.click(); .click();
verifyResponseStatusCode('@explorePage', 200);
cy.get('[data-testid="tables-tab"]') cy.get('[data-testid="tables-tab"]')
.scrollIntoView() .scrollIntoView()

View File

@ -40,7 +40,6 @@ const service_name = MYSQL.serviceName;
describe('Advance search should work properly for all fields', () => { describe('Advance search should work properly for all fields', () => {
beforeEach(() => { beforeEach(() => {
cy.login(); cy.login();
cy.get('[data-testid="appbar-item-explore"]').and('be.visible').click();
}); });
it('Pre-requisite for advance search', () => { it('Pre-requisite for advance search', () => {
@ -115,12 +114,15 @@ describe('Advance search should work properly for all fields', () => {
}); });
}); });
}); });
after(() => {
Cypress.session.clearAllSavedSessions();
});
}); });
describe('Advance search should work properly for Add Group functionality', () => { describe('Advance search should work properly for Add Group functionality', () => {
beforeEach(() => { beforeEach(() => {
cy.login(); cy.login();
cy.get('[data-testid="appbar-item-explore"]').and('be.visible').click();
}); });
Object.values(OPERATOR).forEach((operator) => { Object.values(OPERATOR).forEach((operator) => {
@ -194,12 +196,14 @@ describe('Advance search should work properly for Add Group functionality', () =
}); });
}); });
}); });
after(() => {
Cypress.session.clearAllSavedSessions();
});
}); });
describe('Advance search should work properly for Add Rule functionality', () => { describe('Advance search should work properly for Add Rule functionality', () => {
beforeEach(() => { beforeEach(() => {
cy.login(); cy.login();
cy.get('[data-testid="appbar-item-explore"]').and('be.visible').click();
}); });
Object.values(OPERATOR).forEach((operator) => { Object.values(OPERATOR).forEach((operator) => {
@ -280,4 +284,8 @@ describe('Advance search should work properly for Add Rule functionality', () =>
API_SERVICE.databaseServices API_SERVICE.databaseServices
); );
}); });
after(() => {
Cypress.session.clearAllSavedSessions();
});
}); });

View File

@ -101,11 +101,13 @@ describe('Data Quality and Profiler should work properly', () => {
.should('be.visible') .should('be.visible')
.click(); .click();
cy.intercept('/api/v1/services/ingestionPipelines?*').as('ingestionData'); cy.intercept('/api/v1/services/ingestionPipelines?*').as('ingestionData');
interceptURL('GET', '/api/v1/config/airflow', 'airflow');
cy.get(`[data-testid="service-name-${serviceName}"]`) cy.get(`[data-testid="service-name-${serviceName}"]`)
.should('exist') .should('exist')
.click(); .click();
cy.get('[data-testid="tabs"]').should('exist'); cy.get('[data-testid="tabs"]').should('exist');
cy.wait('@ingestionData'); cy.wait('@ingestionData');
verifyResponseStatusCode('@airflow', 200);
cy.get('[data-testid="Ingestions"]') cy.get('[data-testid="Ingestions"]')
.scrollIntoView() .scrollIntoView()
.should('be.visible') .should('be.visible')

View File

@ -332,8 +332,9 @@ const GlossaryV1 = ({
<p className="tw-text-grey-muted tw-text-center"> <p className="tw-text-grey-muted tw-text-center">
{searchText ? ( {searchText ? (
<span> <span>
{t('label.no-glossary-found-for-searchText', { {t('message.no-entity-found-for-name', {
searchText, entity: t('label.glossary-term'),
name: searchText,
})} })}
</span> </span>
) : ( ) : (