mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-28 10:56:02 +00:00
Cypress: Fixed data quality and profiler cypress test (#9461)
* Cypress: Fixed data quality and profiler cypress test * added API wait for data quality test
This commit is contained in:
parent
c9fac5eb8b
commit
b7ca64f6eb
@ -44,11 +44,17 @@ const serviceName = `${serviceType}-ct-test-${uuid()}`;
|
||||
const columnTestName = `${NEW_COLUMN_TEST_CASE.column}_${NEW_COLUMN_TEST_CASE.type}`;
|
||||
|
||||
const goToProfilerTab = () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/tables/name/${serviceName}.*.${TEAM_ENTITY}?fields=*&include=all`,
|
||||
'waitForPageLoad'
|
||||
);
|
||||
visitEntityDetailsPage(
|
||||
TEAM_ENTITY,
|
||||
serviceName,
|
||||
MYDATA_SUMMARY_OPTIONS.tables
|
||||
);
|
||||
verifyResponseStatusCode('@waitForPageLoad', 200);
|
||||
|
||||
cy.get('[data-testid="Profiler & Data Quality"]')
|
||||
.should('be.visible')
|
||||
@ -139,13 +145,14 @@ describe('Data Quality and Profiler should work properly', () => {
|
||||
});
|
||||
|
||||
it('Add table test case with new test suite', () => {
|
||||
const term = TEAM_ENTITY;
|
||||
goToProfilerTab();
|
||||
|
||||
interceptURL('GET', `api/v1/tables/name/${serviceName}.*.${term}?include=all`, 'addTableTestPage')
|
||||
cy.get('[data-testid="profiler-add-table-test-btn"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@addTableTestPage', 200)
|
||||
cy.get('[data-testid="create-new-test-suite"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
@ -456,8 +463,13 @@ describe('Data Quality and Profiler should work properly', () => {
|
||||
it('SQL query should be visible while editing the test case', () => {
|
||||
const { term, entity, serviceName, sqlTestCase, testSuiteName, sqlQuery } =
|
||||
DATA_QUALITY_SAMPLE_DATA_TABLE;
|
||||
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/tables/name/${serviceName}.*.${term}?fields=*&include=all`,
|
||||
'waitForPageLoad'
|
||||
);
|
||||
visitEntityDetailsPage(term, serviceName, entity);
|
||||
verifyResponseStatusCode('@waitForPageLoad', 200);
|
||||
cy.get('[data-testid="inactive-link"]').should('be.visible').contains(term);
|
||||
cy.get('[data-testid="Profiler & Data Quality"]')
|
||||
.should('be.visible')
|
||||
@ -466,10 +478,11 @@ describe('Data Quality and Profiler should work properly', () => {
|
||||
'have.class',
|
||||
'active'
|
||||
);
|
||||
|
||||
interceptURL('GET', `api/v1/tables/name/${serviceName}.*.${term}?include=all`, 'addTableTestPage')
|
||||
cy.get('[data-testid="profiler-add-table-test-btn"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
verifyResponseStatusCode('@addTableTestPage', 200)
|
||||
|
||||
// selecting existing test suite
|
||||
cy.get('#selectTestSuite_testSuiteId').should('exist').click();
|
||||
|
Loading…
x
Reference in New Issue
Block a user