From ceeba672a8f5f0ab49fa6da5213adce859269bb2 Mon Sep 17 00:00:00 2001
From: Abhishek Porwal <80886271+Abhishek332@users.noreply.github.com>
Date: Mon, 12 Feb 2024 10:41:39 +0530
Subject: [PATCH] added unit test for ApplicationPage component (#15124)
---
.../Application/ApplicationPage.test.tsx | 167 ++++++++++++++++++
1 file changed, 167 insertions(+)
create mode 100644 openmetadata-ui/src/main/resources/ui/src/pages/Application/ApplicationPage.test.tsx
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Application/ApplicationPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Application/ApplicationPage.test.tsx
new file mode 100644
index 00000000000..07acae61c67
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/Application/ApplicationPage.test.tsx
@@ -0,0 +1,167 @@
+/*
+ * 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 { ROUTES } from '../../constants/constants';
+import { CursorType } from '../../enums/pagination.enum';
+import ApplicationPage from './ApplicationPage';
+
+const mockPush = jest.fn();
+
+jest.mock('react-router-dom', () => ({
+ useHistory: jest.fn().mockImplementation(() => ({
+ push: mockPush,
+ })),
+}));
+
+jest.mock(
+ '../../components/Applications/ApplicationCard/ApplicationCard.component',
+ () =>
+ jest.fn(({ onClick }) => )
+);
+
+jest.mock('../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder', () =>
+ jest.fn().mockImplementation(() =>