mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 11:39:12 +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')} %`,
|
||||
dataIndex: 'summary',
|
||||
key: 'success',
|
||||
render: (value: TestSummary) => {
|
||||
render: (value: TestSuite['summary']) => {
|
||||
const percent =
|
||||
value.total && value.success ? value.success / value.total : 0;
|
||||
value?.total && value?.success ? value.success / value.total : 0;
|
||||
|
||||
return (
|
||||
<ProfilerProgressWidget
|
||||
|
||||
@ -33,6 +33,34 @@ const mockLocation = {
|
||||
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', () => ({
|
||||
usePermissionProvider: jest.fn().mockImplementation(() => ({
|
||||
permissions: {
|
||||
@ -45,9 +73,7 @@ jest.mock('../../../../rest/testAPI', () => {
|
||||
...jest.requireActual('../../../../rest/testAPI'),
|
||||
getListTestSuitesBySearch: jest
|
||||
.fn()
|
||||
.mockImplementation(() =>
|
||||
Promise.resolve({ data: [], paging: { total: 0 } })
|
||||
),
|
||||
.mockImplementation(() => Promise.resolve(mockList)),
|
||||
};
|
||||
});
|
||||
jest.mock('react-router-dom', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user