mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +00:00
ui: worked on skip test of the cypress (#12430)
* ui: worked on skip test of the cypress * fixed data quality skip test * fixed failing cypress - redshiftWithDBT - DataQuality
This commit is contained in:
parent
15a0c85b79
commit
4e217aa00f
@ -46,7 +46,7 @@ export const DATA_QUALITY_SAMPLE_DATA_TABLE = {
|
||||
entity: MYDATA_SUMMARY_OPTIONS.tables,
|
||||
serviceName: 'sample_data',
|
||||
testCaseName: 'column_value_max_to_be_between',
|
||||
testSuiteName: 'critical_metrics_suite',
|
||||
sqlTestCaseName: 'my_sql_test_case_cypress',
|
||||
sqlTestCase: 'Custom SQL Query',
|
||||
sqlQuery: 'Select * from dim_address',
|
||||
};
|
||||
@ -170,6 +170,7 @@ export const NEW_TEST_SUITE = {
|
||||
};
|
||||
|
||||
export const NEW_TABLE_TEST_CASE = {
|
||||
name: 'table_column_name_to_exist_in_id',
|
||||
label: 'Table Column Name To Exist',
|
||||
type: 'tableColumnNameToExist',
|
||||
field: 'id',
|
||||
@ -177,6 +178,7 @@ export const NEW_TABLE_TEST_CASE = {
|
||||
};
|
||||
|
||||
export const NEW_COLUMN_TEST_CASE = {
|
||||
name: 'id_column_value_lengths_to_be_between',
|
||||
column: 'id',
|
||||
type: 'columnValueLengthsToBeBetween',
|
||||
label: 'Column Value Lengths To Be Between',
|
||||
@ -186,6 +188,7 @@ export const NEW_COLUMN_TEST_CASE = {
|
||||
};
|
||||
|
||||
export const NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE = {
|
||||
name: 'id_column_values_to_be_not_null',
|
||||
column: 'id',
|
||||
type: 'columnValuesToBeNotNull',
|
||||
label: 'Column Values To Be Not Null',
|
||||
|
||||
@ -92,9 +92,7 @@ describe('RedShift Ingestion', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// skipping as backend flow is changed https://github.com/open-metadata/OpenMetadata/pull/11836,
|
||||
// Todo: unskip once it is fixed from ingestion side https://github.com/open-metadata/OpenMetadata/issues/11592
|
||||
it.skip('Add DBT ingestion', () => {
|
||||
it('Add DBT ingestion', () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
'api/v1/teams/name/Organization?fields=*',
|
||||
@ -174,7 +172,8 @@ describe('RedShift Ingestion', () => {
|
||||
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
|
||||
|
||||
// Add DBT ingestion
|
||||
cy.get('[data-testid="dbt-source"]').should('be.visible').click();
|
||||
cy.get('[data-testid="dbt-source"]').scrollIntoView().should('be.visible');
|
||||
cy.get('[data-testid="dbt-source"]').click();
|
||||
cy.get('.ant-select-item-option-content')
|
||||
.contains('HTTP Config Source')
|
||||
.click();
|
||||
@ -218,9 +217,7 @@ describe('RedShift Ingestion', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// skipping as backend flow is changed https://github.com/open-metadata/OpenMetadata/pull/11836,
|
||||
// Todo: unskip once it is fixed from ingestion side https://github.com/open-metadata/OpenMetadata/issues/11592
|
||||
it.skip('Validate DBT is ingested properly', () => {
|
||||
it('Validate DBT is ingested properly', () => {
|
||||
// Verify DBT tags
|
||||
interceptURL(
|
||||
'GET',
|
||||
@ -263,7 +260,7 @@ describe('RedShift Ingestion', () => {
|
||||
|
||||
cy.get('[data-testid="lineage"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="lineage-entity"]').should(
|
||||
cy.get('[data-testid="entity-header-display-name"]').should(
|
||||
'contain',
|
||||
DBT.dbtLineageNodeLabel
|
||||
);
|
||||
|
||||
@ -41,7 +41,7 @@ const ENTITIES = {
|
||||
const glossary = 'GlossaryOwnerTest';
|
||||
const glossaryTerm = 'GlossaryTermOwnerTest';
|
||||
|
||||
const OWNER = 'Aaron Johnson';
|
||||
const OWNER = 'Aaron Singh';
|
||||
const TIER = 'Tier1';
|
||||
|
||||
const addRemoveOwner = () => {
|
||||
@ -49,7 +49,7 @@ const addRemoveOwner = () => {
|
||||
|
||||
cy.get('.ant-tabs [id*=tab-users]').click();
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
cy.get(`.ant-tabs [title="${OWNER}"]`).click();
|
||||
cy.get(`.ant-popover [title="${OWNER}"]`).click();
|
||||
verifyResponseStatusCode('@patchOwner', 200);
|
||||
cy.get('[data-testid="owner-link"]').should('contain', OWNER);
|
||||
cy.get('[data-testid="edit-owner"]').click();
|
||||
@ -168,14 +168,12 @@ describe('Add and Remove Owner and Tier', () => {
|
||||
addRemoveOwner();
|
||||
});
|
||||
|
||||
// skipping as backend flow is changed https://github.com/open-metadata/OpenMetadata/pull/11836,
|
||||
// Todo: unskip once its implemented in UI https://github.com/open-metadata/OpenMetadata/issues/11592
|
||||
it.skip('Test suite details page', () => {
|
||||
it('Test suite details page', () => {
|
||||
interceptURL('PATCH', '/api/v1/dataQuality/testSuites/*', 'patchOwner');
|
||||
interceptURL('GET', '/api/v1/dataQuality/testSuites?*', 'testSuites');
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/dataQuality/testSuites/name/critical_metrics_suite?fields=*',
|
||||
'/api/v1/dataQuality/testSuites/name/myLogicalTestSuite?fields=*',
|
||||
'testSuiteDetails'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/dataQuality/testCases?*', 'testCases');
|
||||
@ -183,8 +181,12 @@ describe('Add and Remove Owner and Tier', () => {
|
||||
.should('be.visible')
|
||||
.click();
|
||||
verifyResponseStatusCode('@testSuites', 200);
|
||||
cy.get('[data-testid="test-suite-critical_metrics_suite"]')
|
||||
.should('be.visible')
|
||||
|
||||
cy.get('[data-testid="by-test-suites"]').click();
|
||||
verifyResponseStatusCode('@testSuites', 200);
|
||||
|
||||
cy.get('[data-testid="test-suite-container"]')
|
||||
.contains('myLogicalTestSuite')
|
||||
.click();
|
||||
verifyResponseStatusCode('@entityPermission', 200);
|
||||
verifyResponseStatusCode('@testSuiteDetails', 200);
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// / <reference types="cypress" />
|
||||
// eslint-disable-next-line spaced-comment
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import {
|
||||
deleteCreatedService,
|
||||
@ -42,8 +43,6 @@ import {
|
||||
|
||||
const serviceType = 'Mysql';
|
||||
const serviceName = `${serviceType}-ct-test-${uuid()}`;
|
||||
const columnTestName = `${NEW_COLUMN_TEST_CASE.column}_${NEW_COLUMN_TEST_CASE.type}`;
|
||||
const nonTeamTypeColumnTestName = `${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.column}_${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.type}`;
|
||||
|
||||
const goToProfilerTab = () => {
|
||||
interceptURL(
|
||||
@ -61,9 +60,7 @@ const goToProfilerTab = () => {
|
||||
cy.get('[data-testid="profiler"]').should('be.visible').click();
|
||||
};
|
||||
|
||||
// skipping as backend flow is changed https://github.com/open-metadata/OpenMetadata/pull/11836,
|
||||
// Todo: unskip once its implemented in UI https://github.com/open-metadata/OpenMetadata/issues/11592
|
||||
describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
describe('Data Quality and Profiler should work properly', () => {
|
||||
beforeEach(() => {
|
||||
cy.login();
|
||||
});
|
||||
@ -149,12 +146,12 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('Check if profiler is ingested properly or not', () => {
|
||||
it('Verifying profiler ingestion', () => {
|
||||
goToProfilerTab();
|
||||
cy.get('[data-testid="no-profiler-placeholder"]').should('not.exist');
|
||||
});
|
||||
|
||||
it('Add table test case with new test suite', () => {
|
||||
it('Add table test case', () => {
|
||||
const term = TEAM_ENTITY;
|
||||
goToProfilerTab();
|
||||
interceptURL(
|
||||
@ -162,34 +159,16 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
`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();
|
||||
|
||||
// creating new test suite
|
||||
cy.get('[data-testid="new-test-title"]')
|
||||
.should('be.visible')
|
||||
.contains('New Test Suite');
|
||||
cy.get('[data-testid="test-suite-name"]')
|
||||
.scrollIntoView()
|
||||
.type(NEW_TEST_SUITE.name);
|
||||
cy.get(descriptionBox).scrollIntoView().type(NEW_TEST_SUITE.description);
|
||||
cy.get('[data-testid="next-button"]').scrollIntoView().click();
|
||||
cy.get('[data-testid="profiler-add-table-test-btn"]').click();
|
||||
cy.get('[data-testid="table"]').click();
|
||||
|
||||
// creating new test case
|
||||
cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
|
||||
cy.contains(NEW_TABLE_TEST_CASE.label).should('be.visible').click();
|
||||
cy.get('#tableTestForm_params_columnName')
|
||||
.should('be.visible')
|
||||
.type(NEW_TABLE_TEST_CASE.field);
|
||||
cy.get(descriptionBox)
|
||||
.scrollIntoView()
|
||||
.type(NEW_TABLE_TEST_CASE.description);
|
||||
cy.get('#tableTestForm_testName').type(NEW_TABLE_TEST_CASE.name);
|
||||
cy.get('#tableTestForm_params_columnName').type(NEW_TABLE_TEST_CASE.field);
|
||||
cy.get(descriptionBox).scrollIntoView();
|
||||
cy.get(descriptionBox).type(NEW_TABLE_TEST_CASE.description);
|
||||
|
||||
cy.get('[data-testid="submit-test"]')
|
||||
.scrollIntoView()
|
||||
@ -206,9 +185,6 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
.scrollIntoView()
|
||||
.should('be.visible');
|
||||
|
||||
// wait for ingestion to run
|
||||
cy.clock();
|
||||
cy.wait(10000);
|
||||
interceptURL('GET', '/api/v1/dataQuality/testCases?fields=*', 'testCase');
|
||||
cy.get('[data-testid="view-service-button"]')
|
||||
.should('be.visible')
|
||||
@ -217,40 +193,41 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
verifyResponseStatusCode('@getEntityDetails', 200);
|
||||
|
||||
verifyResponseStatusCode('@testCase', 200);
|
||||
cy.contains(`${TEAM_ENTITY}_${NEW_TABLE_TEST_CASE.type}`).should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Data Quality')
|
||||
.click();
|
||||
cy.contains(NEW_TABLE_TEST_CASE.name).should('be.visible');
|
||||
});
|
||||
|
||||
it('Edit Test Case should work properly', () => {
|
||||
const testName = `${TEAM_ENTITY}_${NEW_TABLE_TEST_CASE.type}`;
|
||||
it('Edit table test case', () => {
|
||||
goToProfilerTab();
|
||||
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Data Quality')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get(`[data-testid="${testName}"]`).should('be.visible');
|
||||
cy.get(`[data-testid="edit-${testName}"]`).should('be.visible').click();
|
||||
cy.get(`[data-testid="${NEW_TABLE_TEST_CASE.name}"]`).should('be.visible');
|
||||
cy.get(`[data-testid="edit-${NEW_TABLE_TEST_CASE.name}"]`).click();
|
||||
cy.get('#tableTestForm_params_columnName')
|
||||
.scrollIntoView()
|
||||
.clear()
|
||||
.wait(200)
|
||||
.type('test');
|
||||
cy.get('#tableTestForm_params_columnName').type('test');
|
||||
interceptURL('PATCH', '/api/v1/dataQuality/testCases/*', 'updateTest');
|
||||
cy.get('.ant-modal-footer').contains('Submit').click();
|
||||
verifyResponseStatusCode('@updateTest', 200);
|
||||
cy.get('.Toastify__toast-body')
|
||||
.contains('Test case updated successfully.')
|
||||
.should('be.visible');
|
||||
|
||||
cy.get(`[data-testid="${NEW_TABLE_TEST_CASE.name}"]`)
|
||||
.should('be.visible')
|
||||
.wait(200);
|
||||
cy.get(`[data-testid="${testName}"]`).should('be.visible').click();
|
||||
.click();
|
||||
cy.contains('columnName: test').scrollIntoView().should('exist');
|
||||
});
|
||||
|
||||
it('Delete Test Case should work properly', () => {
|
||||
const testName = `${TEAM_ENTITY}_${NEW_TABLE_TEST_CASE.type}`;
|
||||
it('Delete table test case', () => {
|
||||
const testName = NEW_TABLE_TEST_CASE.name;
|
||||
|
||||
goToProfilerTab();
|
||||
|
||||
@ -277,54 +254,35 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
.click();
|
||||
verifyResponseStatusCode('@deleteTest', 200);
|
||||
verifyResponseStatusCode('@getTestCase', 200);
|
||||
toastNotification('Test Case deleted successfully!');
|
||||
cy.get('[data-testid="no-data-placeholder"]')
|
||||
.should('exist')
|
||||
.should('be.visible');
|
||||
});
|
||||
|
||||
it('Add Column test case should work properly', () => {
|
||||
it('Add Column test case with min max params', () => {
|
||||
goToProfilerTab();
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Column Profile')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get('[data-testid="add-test-id"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
// selecting existing test suite
|
||||
cy.get('#selectTestSuite_testSuiteId').should('exist').click();
|
||||
cy.contains(NEW_TEST_SUITE.name).should('be.visible').click();
|
||||
cy.get('[data-testid="next-button"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/tables/name/${serviceName}.*.${TEAM_ENTITY}?include=all`,
|
||||
'addTableTestPage'
|
||||
);
|
||||
cy.get('[data-testid="profiler-add-table-test-btn"]').click();
|
||||
cy.get('[data-testid="column"]').click();
|
||||
|
||||
// creating new test case
|
||||
cy.get('#tableTestForm_column').click();
|
||||
cy.get(`[title="${NEW_COLUMN_TEST_CASE.column}"]`).scrollIntoView().click();
|
||||
cy.get('#tableTestForm_testName').type(NEW_COLUMN_TEST_CASE.name);
|
||||
cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
|
||||
cy.get(`[title="${NEW_COLUMN_TEST_CASE.label}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get(`[title="${NEW_COLUMN_TEST_CASE.label}"]`).scrollIntoView().click();
|
||||
cy.get('#tableTestForm_params_minLength')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.type(NEW_COLUMN_TEST_CASE.min);
|
||||
cy.get('#tableTestForm_params_maxLength')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.type(NEW_COLUMN_TEST_CASE.max);
|
||||
cy.get(descriptionBox)
|
||||
.scrollIntoView()
|
||||
.type(NEW_COLUMN_TEST_CASE.description);
|
||||
|
||||
cy.get('[data-testid="submit-test"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="submit-test"]').scrollIntoView().click();
|
||||
|
||||
cy.get('[data-testid="success-line"]')
|
||||
.scrollIntoView()
|
||||
@ -333,45 +291,40 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
)
|
||||
.should('be.visible');
|
||||
cy.get('[data-testid="view-service-button"]').scrollIntoView().click();
|
||||
cy.get('.ant-table-row').should(
|
||||
'contain',
|
||||
'id_columnValueLengthsToBeBetween'
|
||||
);
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Data Quality')
|
||||
.click();
|
||||
cy.contains(NEW_COLUMN_TEST_CASE.name).should('be.visible');
|
||||
});
|
||||
|
||||
it('Add column test case for columnValuesToBeNotNull', () => {
|
||||
// Creating new test case and selecting Null team type
|
||||
|
||||
goToProfilerTab();
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Column Profile')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/tables/name/${serviceName}.*.${TEAM_ENTITY}?include=all`,
|
||||
'addTableTestPage'
|
||||
);
|
||||
cy.get('[data-testid="profiler-add-table-test-btn"]').click();
|
||||
cy.get('[data-testid="column"]').click();
|
||||
|
||||
cy.get('[data-testid="add-test-id"]')
|
||||
cy.get('#tableTestForm_column').click();
|
||||
cy.get(`[title="${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.column}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
// selecting existing test suite
|
||||
cy.get('#selectTestSuite_testSuiteId').should('exist').click();
|
||||
cy.contains(NEW_TEST_SUITE.name).should('be.visible').click();
|
||||
cy.get('[data-testid="next-button"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
|
||||
cy.get(`[title="${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.label}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('#tableTestForm_testName').type(
|
||||
NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.name
|
||||
);
|
||||
cy.get('#tableTestForm_testTypeId').type(
|
||||
NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.type
|
||||
);
|
||||
cy.get(`[title="${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.label}"]`).click();
|
||||
cy.get(descriptionBox)
|
||||
.scrollIntoView()
|
||||
.type(NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.description);
|
||||
|
||||
cy.get('[data-testid="submit-test"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="submit-test"]').scrollIntoView().click();
|
||||
|
||||
cy.get('[data-testid="success-line"]')
|
||||
.contains(
|
||||
@ -379,7 +332,10 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
)
|
||||
.should('be.visible');
|
||||
cy.get('[data-testid="view-service-button"]').scrollIntoView().click();
|
||||
cy.get('.ant-table-row').should('contain', 'id_columnValuesToBeNotNull');
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Data Quality')
|
||||
.click();
|
||||
cy.contains(NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.name).should('be.visible');
|
||||
});
|
||||
|
||||
it('Edit column test case should work properly', () => {
|
||||
@ -388,14 +344,13 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
verifyResponseStatusCode('@testCase', 200);
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Column Profile')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="id-test-count"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get(`[data-testid="${columnTestName}"]`).should('be.visible');
|
||||
cy.get(`[data-testid="edit-${columnTestName}"]`)
|
||||
cy.get(`[data-testid="${NEW_COLUMN_TEST_CASE.name}"]`).should('be.visible');
|
||||
cy.get(`[data-testid="edit-${NEW_COLUMN_TEST_CASE.name}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
@ -409,14 +364,18 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
verifyResponseStatusCode('@updateTest', 200);
|
||||
cy.get('.Toastify__toast-body')
|
||||
.contains('Test case updated successfully.')
|
||||
.should('be.visible');
|
||||
|
||||
cy.get(`[data-testid="${NEW_COLUMN_TEST_CASE.name}"]`)
|
||||
.should('be.visible')
|
||||
.wait(200);
|
||||
cy.get(`[data-testid="${columnTestName}"]`).should('be.visible').click();
|
||||
.click();
|
||||
cy.contains('minLength: 4').scrollIntoView().should('exist');
|
||||
|
||||
// Editing Non Team Type Test Case
|
||||
cy.get(`[data-testid="${nonTeamTypeColumnTestName}"]`).should('be.visible');
|
||||
cy.get(`[data-testid="edit-${nonTeamTypeColumnTestName}"]`)
|
||||
cy.get(
|
||||
`[data-testid="${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.name}"]`
|
||||
).should('be.visible');
|
||||
cy.get(`[data-testid="edit-${NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.name}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
@ -436,113 +395,134 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
[columnTestName, nonTeamTypeColumnTestName].map((test) => {
|
||||
cy.get(`[data-testid="${test}"]`).scrollIntoView().should('be.visible');
|
||||
cy.get(`[data-testid="delete-${test}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="hard-delete-option"]').should('be.visible').click();
|
||||
cy.get('[data-testid="confirmation-text-input"]')
|
||||
.should('be.visible')
|
||||
.type(DELETE_TERM);
|
||||
interceptURL(
|
||||
'DELETE',
|
||||
'/api/v1/dataQuality/testCases/*?hardDelete=true&recursive=false',
|
||||
'deleteTest'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/dataQuality/testCases?*', 'getTestCase');
|
||||
cy.get('[data-testid="confirm-button"]')
|
||||
.should('be.visible')
|
||||
.should('not.be.disabled')
|
||||
.click();
|
||||
verifyResponseStatusCode('@deleteTest', 200);
|
||||
verifyResponseStatusCode('@getTestCase', 200);
|
||||
toastNotification('Test Case deleted successfully!');
|
||||
});
|
||||
|
||||
cy.get('[data-testid="no-data-placeholder"]')
|
||||
.should('exist')
|
||||
.should('be.visible');
|
||||
});
|
||||
|
||||
it('Soft Delete Test suite should work properly', () => {
|
||||
cy.get('[data-testid="appbar-item-data-quality"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get(`[data-testid="test-suite-${NEW_TEST_SUITE.name}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get('[data-testid="manage-button"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="delete-button"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="soft-delete-option"]')
|
||||
.should('contain', NEW_TEST_SUITE.name)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get('[data-testid="confirm-button"]')
|
||||
.should('exist')
|
||||
.should('be.disabled');
|
||||
|
||||
cy.get('[data-testid="confirmation-text-input"]')
|
||||
.should('be.visible')
|
||||
.type(DELETE_TERM);
|
||||
interceptURL(
|
||||
'DELETE',
|
||||
'/api/v1/dataQuality/testSuites/*?hardDelete=false&recursive=true',
|
||||
'deleteTestSuite'
|
||||
[NEW_COLUMN_TEST_CASE.name, NEW_COLUMN_TEST_CASE_WITH_NULL_TYPE.name].map(
|
||||
(test) => {
|
||||
cy.get(`[data-testid="${test}"]`).scrollIntoView().should('be.visible');
|
||||
cy.get(`[data-testid="delete-${test}"]`)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="hard-delete-option"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="confirmation-text-input"]')
|
||||
.should('be.visible')
|
||||
.type(DELETE_TERM);
|
||||
interceptURL(
|
||||
'DELETE',
|
||||
'/api/v1/dataQuality/testCases/*?hardDelete=true&recursive=false',
|
||||
'deleteTest'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/dataQuality/testCases?*', 'getTestCase');
|
||||
cy.get('[data-testid="confirm-button"]')
|
||||
.should('be.visible')
|
||||
.should('not.be.disabled')
|
||||
.click();
|
||||
verifyResponseStatusCode('@deleteTest', 200);
|
||||
verifyResponseStatusCode('@getTestCase', 200);
|
||||
toastNotification('Test Case deleted successfully!');
|
||||
}
|
||||
);
|
||||
cy.get('[data-testid="confirm-button"]')
|
||||
.should('be.visible')
|
||||
.should('not.be.disabled')
|
||||
.click();
|
||||
verifyResponseStatusCode('@deleteTestSuite', 200);
|
||||
toastNotification('Test Suite deleted successfully!');
|
||||
});
|
||||
|
||||
it('Restore Test suite should work properly', () => {
|
||||
cy.get('[data-testid="appbar-item-data-quality"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
it('Create logical test suite', () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/dataQuality/testSuites?fields=*&testSuiteType=logical',
|
||||
'testSuite'
|
||||
);
|
||||
cy.get('[data-testid="appbar-item-data-quality"]').click();
|
||||
cy.get('[data-testid="by-test-suites"]').click();
|
||||
verifyResponseStatusCode('@testSuite', 200);
|
||||
cy.get('[data-testid="add-test-suite-btn"]').click();
|
||||
|
||||
cy.get('[data-testid="switch-deleted"]').should('exist').click();
|
||||
// creating test suite
|
||||
cy.get('[data-testid="test-suite-name"]').type(NEW_TEST_SUITE.name);
|
||||
cy.get(descriptionBox).scrollIntoView().type(NEW_TEST_SUITE.description);
|
||||
|
||||
cy.get(`[data-testid="test-suite-${NEW_TEST_SUITE.name}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="submit-button"]').click();
|
||||
|
||||
cy.get('[data-testid="deleted-badge"]').should('be.visible');
|
||||
cy.get('[data-testid="column_value_max_to_be_between"]').click();
|
||||
cy.get('[data-testid="submit"]').scrollIntoView().click();
|
||||
|
||||
cy.get('[data-testid="manage-button"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="restore-button"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="restore-modal-body"]')
|
||||
.contains(`Are you sure you want to restore ${NEW_TEST_SUITE.name}`)
|
||||
.should('be.visible');
|
||||
cy.get('[data-testid="success-line"]').should(
|
||||
'contain',
|
||||
'has been created successfully'
|
||||
);
|
||||
});
|
||||
|
||||
it('Add test case to logical test suite', () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/dataQuality/testSuites?fields=*&testSuiteType=logical',
|
||||
'testSuite'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/dataQuality/testCases?fields=*', 'testCase');
|
||||
interceptURL(
|
||||
'PUT',
|
||||
'/api/v1/dataQuality/testSuites/restore',
|
||||
'restoreTestSuite'
|
||||
'/api/v1/dataQuality/testCases/logicalTestCases',
|
||||
'putTestCase'
|
||||
);
|
||||
cy.get('[data-testid="appbar-item-data-quality"]').click();
|
||||
cy.get('[data-testid="by-test-suites"]').click();
|
||||
verifyResponseStatusCode('@testSuite', 200);
|
||||
cy.get('[data-testid="test-suite-container"]')
|
||||
.contains(NEW_TEST_SUITE.name)
|
||||
.click();
|
||||
|
||||
cy.get('.ant-modal-footer').contains('Restore').click();
|
||||
|
||||
verifyResponseStatusCode('@restoreTestSuite', 200);
|
||||
toastNotification('Test Suite restored successfully');
|
||||
cy.get('[data-testid="add-test-case-btn"]').click();
|
||||
verifyResponseStatusCode('@testCase', 200);
|
||||
cy.get('[data-testid="column_values_to_be_between"]').click();
|
||||
cy.get('[data-testid="submit"]').scrollIntoView().click();
|
||||
verifyResponseStatusCode('@putTestCase', 200);
|
||||
});
|
||||
|
||||
it('Hard Delete Test suite should work properly', () => {
|
||||
cy.get('[data-testid="appbar-item-data-quality"]')
|
||||
.should('be.visible')
|
||||
it('Remove test case from logical test suite', () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/dataQuality/testSuites?fields=*&testSuiteType=logical',
|
||||
'testSuite'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/dataQuality/testCases?fields=*', 'testCase');
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/permissions/testSuite/name/mysql_matrix',
|
||||
'testSuitePermission'
|
||||
);
|
||||
interceptURL(
|
||||
'DELETE',
|
||||
'/api/v1/dataQuality/testCases/logicalTestCases/*/*',
|
||||
'removeTestCase'
|
||||
);
|
||||
cy.get('[data-testid="appbar-item-data-quality"]').click();
|
||||
cy.get('[data-testid="by-test-suites"]').click();
|
||||
verifyResponseStatusCode('@testSuite', 200);
|
||||
cy.get('[data-testid="test-suite-container"]')
|
||||
.contains(NEW_TEST_SUITE.name)
|
||||
.click();
|
||||
cy.get(`[data-testid="test-suite-${NEW_TEST_SUITE.name}"]`)
|
||||
.should('be.visible')
|
||||
verifyResponseStatusCode('@testSuitePermission', 200);
|
||||
verifyResponseStatusCode('@testCase', 200);
|
||||
|
||||
cy.get('[data-testid="remove-column_values_to_be_between"]').click();
|
||||
cy.get('[data-testid="save-button"]').click();
|
||||
verifyResponseStatusCode('@removeTestCase', 200);
|
||||
|
||||
cy.get('[data-testid="remove-column_value_max_to_be_between"]').click();
|
||||
cy.get('[data-testid="save-button"]').click();
|
||||
verifyResponseStatusCode('@removeTestCase', 200);
|
||||
});
|
||||
|
||||
it('Delete test suite', () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/dataQuality/testSuites?fields=*&testSuiteType=logical',
|
||||
'testSuite'
|
||||
);
|
||||
cy.get('[data-testid="appbar-item-data-quality"]').click();
|
||||
cy.get('[data-testid="by-test-suites"]').click();
|
||||
verifyResponseStatusCode('@testSuite', 200);
|
||||
cy.get('[data-testid="test-suite-container"]')
|
||||
.contains(NEW_TEST_SUITE.name)
|
||||
.click();
|
||||
|
||||
cy.get('[data-testid="manage-button"]').should('be.visible').click();
|
||||
@ -589,18 +569,19 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
DATA_QUALITY_SAMPLE_DATA_TABLE;
|
||||
visitEntityDetailsPage(term, serviceName, entity);
|
||||
cy.get('[data-testid="entity-header-display-name"]')
|
||||
.should('be.visible')
|
||||
.contains(term);
|
||||
.contains(term)
|
||||
.should('be.visible');
|
||||
|
||||
cy.get('[data-testid="profiler"]').should('be.visible').click();
|
||||
interceptURL('GET', '/api/v1/tables/*/columnProfile?*', 'getProfilerInfo');
|
||||
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Column Profile')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-row-key="shop_id"] > :nth-child(1) > a')
|
||||
|
||||
cy.get('[data-row-key="shop_id"]')
|
||||
.contains('shop_id')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
verifyResponseStatusCode('@getProfilerInfo', 200);
|
||||
|
||||
@ -615,12 +596,11 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
'/api/v1/dataQuality/testCases/*/testCaseResult?*',
|
||||
'getTestResult'
|
||||
);
|
||||
cy.get('[data-testid="profiler-switch"]')
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Data Quality')
|
||||
.scrollIntoView()
|
||||
.click();
|
||||
verifyResponseStatusCode('@getTestCaseInfo', 200);
|
||||
cy.get(`[data-testid="${testCaseName}"]`).should('be.visible').click();
|
||||
|
||||
cy.get(`[data-testid="${testCaseName}"]`).click();
|
||||
verifyResponseStatusCode('@getTestResult', 200);
|
||||
cy.get(`[id="${testCaseName}_graph"]`)
|
||||
.scrollIntoView()
|
||||
@ -628,8 +608,14 @@ describe.skip('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;
|
||||
const {
|
||||
term,
|
||||
entity,
|
||||
serviceName,
|
||||
sqlTestCase,
|
||||
sqlQuery,
|
||||
sqlTestCaseName,
|
||||
} = DATA_QUALITY_SAMPLE_DATA_TABLE;
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/tables/name/${serviceName}.*.${term}?fields=*&include=all`,
|
||||
@ -641,25 +627,13 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
.should('be.visible')
|
||||
.contains(term);
|
||||
cy.get('[data-testid="profiler"]').should('be.visible').click();
|
||||
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();
|
||||
cy.contains(testSuiteName).should('be.visible').click();
|
||||
cy.get('[data-testid="next-button"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="table"]').click();
|
||||
|
||||
// creating new test case
|
||||
cy.get('#tableTestForm_testName').type(sqlTestCaseName);
|
||||
cy.get('#tableTestForm_testTypeId').scrollIntoView().click();
|
||||
cy.contains(sqlTestCase).should('be.visible').click();
|
||||
cy.get('.CodeMirror-scroll')
|
||||
@ -684,12 +658,14 @@ describe.skip('Data Quality and Profiler should work properly', () => {
|
||||
.scrollIntoView()
|
||||
.should('be.visible');
|
||||
cy.get('[data-testid="view-service-button"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="profiler-tab-left-panel"]')
|
||||
.contains('Data Quality')
|
||||
.click();
|
||||
verifyResponseStatusCode('@testCase', 200);
|
||||
cy.get('[data-testid="dim_address_tableCustomSQLQuery"]').should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.get('[data-testid="edit-dim_address_tableCustomSQLQuery"]')
|
||||
cy.get('[data-testid="my_sql_test_case_cypress"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible');
|
||||
cy.get('[data-testid="edit-my_sql_test_case_cypress"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
|
||||
@ -285,6 +285,7 @@ const TestCaseForm: React.FC<TestCaseFormProps> = ({
|
||||
},
|
||||
]}>
|
||||
<Select
|
||||
showSearch
|
||||
options={testDefinitions.map((suite) => ({
|
||||
label: getEntityName(suite),
|
||||
value: suite.fullyQualifiedName,
|
||||
|
||||
@ -230,10 +230,14 @@ export const AddTestCaseList = ({
|
||||
</List>
|
||||
</Col>
|
||||
<Col className="d-flex justify-end items-center p-y-xss" span={24}>
|
||||
<Button type="link" onClick={onCancel}>
|
||||
<Button data-testid="cancel" type="link" onClick={onCancel}>
|
||||
{cancelText ?? t('label.cancel')}
|
||||
</Button>
|
||||
<Button loading={isLoading} type="primary" onClick={handleSubmit}>
|
||||
<Button
|
||||
data-testid="submit"
|
||||
loading={isLoading}
|
||||
type="primary"
|
||||
onClick={handleSubmit}>
|
||||
{submitText ?? t('label.submit')}
|
||||
</Button>
|
||||
</Col>
|
||||
|
||||
@ -10,12 +10,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { PagingResponse } from 'Models';
|
||||
import { Col, Row } from 'antd';
|
||||
import { AxiosError } from 'axios';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import Searchbar from 'components/common/searchbar/Searchbar';
|
||||
import { usePermissionProvider } from 'components/PermissionProvider/PermissionProvider';
|
||||
import DataQualityTab from 'components/ProfilerDashboard/component/DataQualityTab';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import Searchbar from 'components/common/searchbar/Searchbar';
|
||||
import { INITIAL_PAGING_VALUE, PAGE_SIZE } from 'constants/constants';
|
||||
import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum';
|
||||
import { SearchIndex } from 'enums/search.enum';
|
||||
@ -26,16 +27,15 @@ import {
|
||||
TestCaseSearchSource,
|
||||
} from 'interface/search.interface';
|
||||
import { isString } from 'lodash';
|
||||
import { PagingResponse } from 'Models';
|
||||
import { DataQualityPageTabs } from 'pages/DataQuality/DataQualityPage.interface';
|
||||
import QueryString from 'qs';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useHistory, useLocation, useParams } from 'react-router-dom';
|
||||
import { searchQuery } from 'rest/searchAPI';
|
||||
import {
|
||||
ListTestCaseParams,
|
||||
getListTestCase,
|
||||
getTestCaseById,
|
||||
ListTestCaseParams,
|
||||
} from 'rest/testAPI';
|
||||
import { showErrorToast } from 'utils/ToastUtils';
|
||||
import { DataQualitySearchParams } from '../DataQuality.interface';
|
||||
@ -209,6 +209,7 @@ export const TestCases = () => {
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<DataQualityTab
|
||||
afterDeleteAction={fetchTestCases}
|
||||
isLoading={isLoading}
|
||||
pagingData={{
|
||||
paging: testCase.paging,
|
||||
|
||||
@ -74,6 +74,7 @@ const DataQualityTab: React.FC<DataQualityTabProps> = ({
|
||||
onTestCaseResultUpdate,
|
||||
removeFromTestSuite,
|
||||
showTableColumn = true,
|
||||
afterDeleteAction,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { permissions } = usePermissionProvider();
|
||||
@ -150,7 +151,7 @@ const DataQualityTab: React.FC<DataQualityTabProps> = ({
|
||||
selectedTestCase?.data.id ?? '',
|
||||
removeFromTestSuite.testSuite?.id ?? ''
|
||||
);
|
||||
onTestUpdate?.();
|
||||
afterDeleteAction?.();
|
||||
setSelectedTestCase(undefined);
|
||||
} catch (error) {
|
||||
showErrorToast(error as AxiosError);
|
||||
@ -469,7 +470,7 @@ const DataQualityTab: React.FC<DataQualityTabProps> = ({
|
||||
/>
|
||||
) : (
|
||||
<DeleteWidgetModal
|
||||
afterDeleteAction={onTestUpdate}
|
||||
afterDeleteAction={afterDeleteAction}
|
||||
allowSoftDelete={false}
|
||||
entityId={selectedTestCase?.data?.id ?? ''}
|
||||
entityName={selectedTestCase?.data?.name ?? ''}
|
||||
|
||||
@ -101,6 +101,7 @@ export interface ProfilerSummaryCardProps {
|
||||
export interface DataQualityTabProps {
|
||||
testCases: TestCase[];
|
||||
onTestUpdate?: (testCase?: TestCase) => void;
|
||||
afterDeleteAction?: () => void;
|
||||
showTableColumn?: boolean;
|
||||
isLoading?: boolean;
|
||||
onTestCaseResultUpdate?: (data: TestCase) => void;
|
||||
|
||||
@ -27,6 +27,7 @@ export const QualityTab = ({
|
||||
onTestUpdate,
|
||||
testSuite,
|
||||
showTableColumn,
|
||||
afterDeleteAction,
|
||||
}: QualityTabProps) => {
|
||||
const { t } = useTranslation();
|
||||
const tabs = useMemo(
|
||||
@ -37,6 +38,7 @@ export const QualityTab = ({
|
||||
children: (
|
||||
<div className="p-t-md">
|
||||
<DataQualityTab
|
||||
afterDeleteAction={afterDeleteAction}
|
||||
isLoading={isLoading}
|
||||
showTableColumn={showTableColumn}
|
||||
testCases={testCases}
|
||||
|
||||
@ -28,11 +28,12 @@ import { DefaultOptionType } from 'antd/lib/select';
|
||||
import { ReactComponent as DropDownIcon } from 'assets/svg/DropDown.svg';
|
||||
import { AxiosError } from 'axios';
|
||||
import classNames from 'classnames';
|
||||
import { SummaryCard } from 'components/common/SummaryCard/SummaryCard.component';
|
||||
import { SummaryCardProps } from 'components/common/SummaryCard/SummaryCard.interface';
|
||||
import DatePickerMenu from 'components/DatePickerMenu/DatePickerMenu.component';
|
||||
import { DateRangeObject } from 'components/ProfilerDashboard/component/TestSummary';
|
||||
import TabsLabel from 'components/TabsLabel/TabsLabel.component';
|
||||
import { useTourProvider } from 'components/TourProvider/TourProvider';
|
||||
import { SummaryCard } from 'components/common/SummaryCard/SummaryCard.component';
|
||||
import { SummaryCardProps } from 'components/common/SummaryCard/SummaryCard.interface';
|
||||
import { mockDatasetData } from 'constants/mockTourData.constants';
|
||||
import { Column } from 'generated/entity/data/container';
|
||||
import {
|
||||
@ -57,18 +58,18 @@ import React, {
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useHistory, useLocation, useParams } from 'react-router-dom';
|
||||
import { getLatestTableProfileByFqn } from 'rest/tableAPI';
|
||||
import { getListTestCase, ListTestCaseParams } from 'rest/testAPI';
|
||||
import { ListTestCaseParams, getListTestCase } from 'rest/testAPI';
|
||||
import { ReactComponent as ColumnProfileIcon } from '../../assets/svg/column-profile.svg';
|
||||
import { ReactComponent as DataQualityIcon } from '../../assets/svg/data-quality.svg';
|
||||
import { ReactComponent as SettingIcon } from '../../assets/svg/ic-settings-primery.svg';
|
||||
import { ReactComponent as NoDataIcon } from '../../assets/svg/no-data-icon.svg';
|
||||
import { ReactComponent as TableProfileIcon } from '../../assets/svg/table-profile.svg';
|
||||
import { API_RES_MAX_SIZE } from '../../constants/constants';
|
||||
import { PAGE_HEADERS } from '../../constants/PageHeaders.constant';
|
||||
import { API_RES_MAX_SIZE } from '../../constants/constants';
|
||||
import {
|
||||
allowedServiceForOperationGraph,
|
||||
DEFAULT_RANGE_DATA,
|
||||
INITIAL_TEST_RESULT_SUMMARY,
|
||||
allowedServiceForOperationGraph,
|
||||
} from '../../constants/profiler.constant';
|
||||
import { ProfilerDashboardType } from '../../enums/table.enum';
|
||||
import { ProfileSampleType, Table } from '../../generated/entity/data/table';
|
||||
@ -78,8 +79,8 @@ import { updateTestResults } from '../../utils/DataQualityAndProfilerUtils';
|
||||
import { getAddDataQualityTableTestPath } from '../../utils/RouterUtils';
|
||||
import { generateEntityLink } from '../../utils/TableUtils';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
import PageHeader from '../header/PageHeader.component';
|
||||
import { TableProfilerTab } from '../ProfilerDashboard/profilerDashboard.interface';
|
||||
import PageHeader from '../header/PageHeader.component';
|
||||
import ColumnPickerMenu from './Component/ColumnPickerMenu';
|
||||
import ColumnProfileTable from './Component/ColumnProfileTable';
|
||||
import ColumnSummary from './Component/ColumnSummary';
|
||||
@ -289,12 +290,12 @@ const TableProfilerV1: FC<TableProfilerProps> = ({
|
||||
|
||||
const addButtonContent = [
|
||||
{
|
||||
label: t('label.table'),
|
||||
label: <TabsLabel id="table" name={t('label.table')} />,
|
||||
key: '1',
|
||||
onClick: () => handleAddTestClick(ProfilerDashboardType.TABLE),
|
||||
},
|
||||
{
|
||||
label: t('label.column'),
|
||||
label: <TabsLabel id="column" name={t('label.column')} />,
|
||||
key: '2',
|
||||
onClick: () => handleAddTestClick(ProfilerDashboardType.COLUMN),
|
||||
},
|
||||
@ -641,6 +642,7 @@ const TableProfilerV1: FC<TableProfilerProps> = ({
|
||||
|
||||
{isDataQuality && (
|
||||
<QualityTab
|
||||
afterDeleteAction={fetchAllTests}
|
||||
isLoading={isTestCaseLoading}
|
||||
showTableColumn={false}
|
||||
testCases={getFilterTestCase()}
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
*/
|
||||
|
||||
import { Col, Row, Tabs, TabsProps, Typography } from 'antd';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
import { TestCases } from 'components/DataQuality/TestCases/TestCases.component';
|
||||
import { TestSuites } from 'components/DataQuality/TestSuites/TestSuites.component';
|
||||
import TabsLabel from 'components/TabsLabel/TabsLabel.component';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
@ -29,17 +30,34 @@ const DataQualityPage = () => {
|
||||
const tabDetails = useMemo(() => {
|
||||
const tab: TabsProps['items'] = [
|
||||
{
|
||||
label: t('label.by-entity', { entity: t('label.table-plural') }),
|
||||
label: (
|
||||
<TabsLabel
|
||||
id="by-tables"
|
||||
name={t('label.by-entity', { entity: t('label.table-plural') })}
|
||||
/>
|
||||
),
|
||||
children: <TestSuites />,
|
||||
key: DataQualityPageTabs.TABLES,
|
||||
},
|
||||
{
|
||||
label: t('label.by-entity', { entity: t('label.test-case-plural') }),
|
||||
label: (
|
||||
<TabsLabel
|
||||
id="by-test-cases"
|
||||
name={t('label.by-entity', { entity: t('label.test-case-plural') })}
|
||||
/>
|
||||
),
|
||||
key: DataQualityPageTabs.TEST_CASES,
|
||||
children: <TestCases />,
|
||||
},
|
||||
{
|
||||
label: t('label.by-entity', { entity: t('label.test-suite-plural') }),
|
||||
label: (
|
||||
<TabsLabel
|
||||
id="by-test-suites"
|
||||
name={t('label.by-entity', {
|
||||
entity: t('label.test-suite-plural'),
|
||||
})}
|
||||
/>
|
||||
),
|
||||
key: DataQualityPageTabs.TEST_SUITES,
|
||||
children: <TestSuites />,
|
||||
},
|
||||
|
||||
@ -44,11 +44,7 @@ import {
|
||||
} from 'rest/testAPI';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import { getDataQualityPagePath } from 'utils/RouterUtils';
|
||||
import {
|
||||
INITIAL_PAGING_VALUE,
|
||||
PAGE_SIZE,
|
||||
pagingObject,
|
||||
} from '../../constants/constants';
|
||||
import { INITIAL_PAGING_VALUE, pagingObject } from '../../constants/constants';
|
||||
import { ACTION_TYPE, ERROR_PLACEHOLDER_TYPE } from '../../enums/common.enum';
|
||||
import { TestCase } from '../../generated/tests/testCase';
|
||||
import { TestSuite } from '../../generated/tests/testSuite';
|
||||
@ -120,15 +116,12 @@ const TestSuiteDetailsPage = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const fetchTestCases = async (param?: ListTestCaseParams, limit?: number) => {
|
||||
const fetchTestCases = async (param?: ListTestCaseParams) => {
|
||||
setIsTestCaseLoading(true);
|
||||
try {
|
||||
const response = await getListTestCase({
|
||||
fields: 'testCaseResult,testDefinition,testSuite',
|
||||
testSuiteId: testSuiteId,
|
||||
limit: limit || PAGE_SIZE,
|
||||
before: param && param.before,
|
||||
after: param && param.after,
|
||||
...param,
|
||||
});
|
||||
|
||||
@ -349,6 +342,7 @@ const TestSuiteDetailsPage = () => {
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<DataQualityTab
|
||||
afterDeleteAction={fetchTestCases}
|
||||
isLoading={isTestCaseLoading}
|
||||
pagingData={{
|
||||
currentPage,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user