From 5063b341e478bdae8eee9c8b334062a07fc2a840 Mon Sep 17 00:00:00 2001
From: Abhishek Porwal <80886271+Abhishek332@users.noreply.github.com>
Date: Mon, 12 Feb 2024 15:04:37 +0530
Subject: [PATCH] added unit test for CustomPropertiesPageV1 (#15141)
---
.../CustomPropertiesPageV1.test.tsx | 179 ++++++++++++++++++
1 file changed, 179 insertions(+)
create mode 100644 openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.test.tsx
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.test.tsx
new file mode 100644
index 00000000000..3141eda2b32
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.test.tsx
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2024 Collate.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { act, render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import React from 'react';
+import { EntityTabs } from '../../enums/entity.enum';
+import { Type } from '../../generated/entity/type';
+import CustomEntityDetailV1 from './CustomPropertiesPageV1';
+
+const mockPush = jest.fn();
+
+jest.mock('react-router-dom', () => ({
+ useHistory: jest.fn().mockImplementation(() => ({
+ push: mockPush,
+ })),
+ useParams: jest.fn().mockReturnValue({
+ tab: EntityTabs.CUSTOM_PROPERTIES,
+ }),
+}));
+
+jest.mock('../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder', () =>
+ jest.fn().mockImplementation(() =>