diff --git a/app/client/src/pages/UserProfile/index.test.tsx b/app/client/src/pages/UserProfile/index.test.tsx
index aa57ee2d919a..f9e6ffe3653d 100644
--- a/app/client/src/pages/UserProfile/index.test.tsx
+++ b/app/client/src/pages/UserProfile/index.test.tsx
@@ -1,6 +1,6 @@
import "@testing-library/jest-dom/extend-expect";
import React from "react";
-import { render, screen, fireEvent } from "@testing-library/react";
+import { render } from "@testing-library/react";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";
import { lightTheme } from "selectors/themeSelectors";
@@ -87,15 +87,6 @@ jest.mock("actions/gitSyncActions", () => ({
fetchGlobalGitConfigInit: jest.fn(),
}));
-const mockHistoryPush = jest.fn();
-
-jest.mock("react-router-dom", () => ({
- ...jest.requireActual("react-router-dom"),
- useHistory: () => ({
- push: mockHistoryPush,
- }),
-}));
-
const mockStore = configureStore([]);
describe("Git config ", () => {
// TODO: Fix this the next time the file is edited
@@ -137,22 +128,6 @@ describe("Git config ", () => {
expect(getAllByText("Sign in to your account")).toBeInTheDocument;
});
- it("should call history push when user goes back to applications", () => {
- store = mockStore(defaultStoreState);
- render(
-
-
-
-
-
-
- ,
- );
- const backButton = screen.getByText("Back");
- fireEvent.click(backButton);
- expect(mockHistoryPush).toHaveBeenCalledWith("/applications");
- });
-
afterAll(() => {
jest.clearAllMocks();
store.clearActions();
diff --git a/app/client/src/pages/UserProfile/index.tsx b/app/client/src/pages/UserProfile/index.tsx
index bf7de701ef78..2cfb2fee9fb3 100644
--- a/app/client/src/pages/UserProfile/index.tsx
+++ b/app/client/src/pages/UserProfile/index.tsx
@@ -56,7 +56,7 @@ function UserProfile() {
return (
-
+
{tabs.map((tab) => {
diff --git a/app/client/src/pages/workspace/__tests__/settings.test.tsx b/app/client/src/pages/workspace/__tests__/settings.test.tsx
index 3e488f3fb4c4..fdcbea9eb15e 100644
--- a/app/client/src/pages/workspace/__tests__/settings.test.tsx
+++ b/app/client/src/pages/workspace/__tests__/settings.test.tsx
@@ -1,17 +1,9 @@
import React from "react";
import "@testing-library/jest-dom";
import Router from "react-router-dom";
-import { BrowserRouter } from "react-router-dom";
import { render, screen } from "test/testUtils";
-import {
- render as testRender,
- screen as testScreen,
-} from "@testing-library/react";
-import { fireEvent } from "@testing-library/react";
import Settings from "../settings";
import * as reactRedux from "react-redux";
-import configureStore from "redux-mock-store";
-import { Provider } from "react-redux";
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -159,16 +151,9 @@ const mockWorkspaceData = {
new: false,
};
-const mockHistoryPush = jest.fn();
-
-const mockStore = configureStore([]);
-
jest.mock("react-router-dom", () => ({
...jest.requireActual("react-router-dom"),
useParams: jest.fn(),
- useHistory: () => ({
- push: mockHistoryPush,
- }),
}));
function renderComponent() {
@@ -205,19 +190,4 @@ describe("", () => {
expect(tabList.length).toBeGreaterThanOrEqual(2);
expect(tabList.length).toBeLessThanOrEqual(3);
});
-
- it("should redirect to workspace page if user wants to go back", () => {
- testRender(
-
-
-
-
- ,
- );
- const backBtn = testScreen.getByText("Back");
- fireEvent.click(backBtn);
- expect(mockHistoryPush).toHaveBeenCalledWith(
- `/applications?workspaceId=${mockWorkspaceData.id}`,
- );
- });
});
diff --git a/app/client/src/pages/workspace/settings.tsx b/app/client/src/pages/workspace/settings.tsx
index 1c5ab878d554..0d4567c9325d 100644
--- a/app/client/src/pages/workspace/settings.tsx
+++ b/app/client/src/pages/workspace/settings.tsx
@@ -127,7 +127,7 @@ export default function Settings() {
<>
-
+