chore: removed critical norm from UI
This commit is contained in:
@@ -49,10 +49,12 @@ export default function NormNode(props: NodeProps<NormNode>) {
|
||||
const setValue = (value: string) => {
|
||||
updateNodeData(props.id, {norm: value});
|
||||
}
|
||||
//this function is commented out, because of lack of backend implementation.
|
||||
//If you wish to set critical norms, in the UI side, you can uncomment and use this function.
|
||||
|
||||
const setCritical = (value: boolean) => {
|
||||
updateNodeData(props.id, {...data, critical: value});
|
||||
}
|
||||
// const setCritical = (value: boolean) => {
|
||||
// updateNodeData(props.id, {...data, critical: value});
|
||||
// }
|
||||
useEffect(() => {
|
||||
const normText = data.norm || "";
|
||||
|
||||
|
||||
@@ -699,15 +699,12 @@ describe('NormNode', () => {
|
||||
/>
|
||||
);
|
||||
|
||||
const checkbox = screen.getByLabelText('Critical:');
|
||||
await user.click(checkbox);
|
||||
|
||||
await waitFor(() => {
|
||||
const state = useFlowStore.getState();
|
||||
expect(state.nodes).toHaveLength(1);
|
||||
expect(state.nodes[0].id).toBe('norm-1');
|
||||
expect(state.nodes[0].data.norm).toBe('');
|
||||
expect(state.nodes[0].data.critical).toBe(true);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user