mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-16 10:53:31 +00:00
fix the unit test for the DataContract (#23216)
This commit is contained in:
parent
c97078a3fe
commit
f825ce2c26
@ -14,11 +14,11 @@ import '@testing-library/jest-dom';
|
|||||||
import { act, fireEvent, render, screen } from '@testing-library/react';
|
import { act, fireEvent, render, screen } from '@testing-library/react';
|
||||||
import { EntityType } from '../../../enums/entity.enum';
|
import { EntityType } from '../../../enums/entity.enum';
|
||||||
import {
|
import {
|
||||||
ContractStatus,
|
|
||||||
DataContract,
|
DataContract,
|
||||||
SemanticsRule,
|
SemanticsRule,
|
||||||
} from '../../../generated/entity/data/dataContract';
|
} from '../../../generated/entity/data/dataContract';
|
||||||
import { Column, Table } from '../../../generated/entity/data/table';
|
import { Column, Table } from '../../../generated/entity/data/table';
|
||||||
|
import { EntityStatus } from '../../../generated/entity/domains/dataProduct';
|
||||||
import { EntityReference } from '../../../generated/entity/type';
|
import { EntityReference } from '../../../generated/entity/type';
|
||||||
import { createContract, updateContract } from '../../../rest/contractAPI';
|
import { createContract, updateContract } from '../../../rest/contractAPI';
|
||||||
import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils';
|
import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils';
|
||||||
@ -61,7 +61,7 @@ const mockContract: DataContract = {
|
|||||||
id: 'table-id',
|
id: 'table-id',
|
||||||
type: EntityType.TABLE,
|
type: EntityType.TABLE,
|
||||||
} as EntityReference,
|
} as EntityReference,
|
||||||
status: ContractStatus.Active,
|
entityStatus: EntityStatus.Approved,
|
||||||
semantics: [] as SemanticsRule[],
|
semantics: [] as SemanticsRule[],
|
||||||
qualityExpectations: [] as EntityReference[],
|
qualityExpectations: [] as EntityReference[],
|
||||||
schema: [] as Column[],
|
schema: [] as Column[],
|
||||||
@ -217,7 +217,7 @@ describe('AddDataContract', () => {
|
|||||||
id: 'table-id',
|
id: 'table-id',
|
||||||
type: EntityType.TABLE,
|
type: EntityType.TABLE,
|
||||||
},
|
},
|
||||||
status: ContractStatus.Active,
|
entityStatus: EntityStatus.Approved,
|
||||||
semantics: undefined,
|
semantics: undefined,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user