mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-17 11:22:29 +00:00
Minor: fixed data quality page type issue (#16556)
This commit is contained in:
parent
9fbc37839d
commit
6c510a567b
@ -164,9 +164,9 @@ export const TestSuites = ({ summaryPanel }: { summaryPanel: ReactNode }) => {
|
|||||||
title: `${t('label.success')} %`,
|
title: `${t('label.success')} %`,
|
||||||
dataIndex: 'summary',
|
dataIndex: 'summary',
|
||||||
key: 'success',
|
key: 'success',
|
||||||
render: (value: TestSummary) => {
|
render: (value: TestSuite['summary']) => {
|
||||||
const percent =
|
const percent =
|
||||||
value.total && value.success ? value.success / value.total : 0;
|
value?.total && value?.success ? value.success / value.total : 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProfilerProgressWidget
|
<ProfilerProgressWidget
|
||||||
|
|||||||
@ -33,6 +33,34 @@ const mockLocation = {
|
|||||||
search: '',
|
search: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const mockList = {
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
id: 'id',
|
||||||
|
name: 'sample_data.ecommerce_db.shopify.dim_address.testSuite',
|
||||||
|
fullyQualifiedName:
|
||||||
|
'sample_data.ecommerce_db.shopify.dim_address.testSuite',
|
||||||
|
description: 'This is an executable test suite linked to an entity',
|
||||||
|
serviceType: 'TestSuite',
|
||||||
|
href: 'href',
|
||||||
|
deleted: false,
|
||||||
|
executable: true,
|
||||||
|
executableEntityReference: {
|
||||||
|
id: 'id1',
|
||||||
|
type: 'table',
|
||||||
|
name: 'dim_address',
|
||||||
|
fullyQualifiedName: 'sample_data.ecommerce_db.shopify.dim_address',
|
||||||
|
},
|
||||||
|
testCaseResultSummary: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
paging: {
|
||||||
|
offset: 0,
|
||||||
|
limit: 15,
|
||||||
|
total: 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
jest.mock('../../../../context/PermissionProvider/PermissionProvider', () => ({
|
jest.mock('../../../../context/PermissionProvider/PermissionProvider', () => ({
|
||||||
usePermissionProvider: jest.fn().mockImplementation(() => ({
|
usePermissionProvider: jest.fn().mockImplementation(() => ({
|
||||||
permissions: {
|
permissions: {
|
||||||
@ -45,9 +73,7 @@ jest.mock('../../../../rest/testAPI', () => {
|
|||||||
...jest.requireActual('../../../../rest/testAPI'),
|
...jest.requireActual('../../../../rest/testAPI'),
|
||||||
getListTestSuitesBySearch: jest
|
getListTestSuitesBySearch: jest
|
||||||
.fn()
|
.fn()
|
||||||
.mockImplementation(() =>
|
.mockImplementation(() => Promise.resolve(mockList)),
|
||||||
Promise.resolve({ data: [], paging: { total: 0 } })
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
jest.mock('react-router-dom', () => {
|
jest.mock('react-router-dom', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user