diff --git a/webpack/farm_designer/map/__tests__/garden_map_test.tsx b/webpack/farm_designer/map/__tests__/garden_map_test.tsx index bd2d82ff2..0da720b05 100644 --- a/webpack/farm_designer/map/__tests__/garden_map_test.tsx +++ b/webpack/farm_designer/map/__tests__/garden_map_test.tsx @@ -1,7 +1,7 @@ jest.mock("../../../history", () => ({ history: { getCurrentLocation: () => { - return { pathname: "//////add" }; + return { pathname: "/app/designer/plants/crop_search/aplant/add" }; } } })); diff --git a/webpack/farm_designer/map/__tests__/grid_test.tsx b/webpack/farm_designer/map/__tests__/grid_test.tsx index 917b04c00..4152d9ed8 100644 --- a/webpack/farm_designer/map/__tests__/grid_test.tsx +++ b/webpack/farm_designer/map/__tests__/grid_test.tsx @@ -3,9 +3,15 @@ jest.mock("../../../history", () => ({ history: { push: mockHistory, getCurrentLocation: jest.fn() - .mockImplementationOnce(() => { return { pathname: "//app/plants" } }) - .mockImplementationOnce(() => { return { pathname: "//app/plants/1/edit" } }) - .mockImplementationOnce(() => { return { pathname: "//app/plants/1" } }) + .mockImplementationOnce(() => { + return { pathname: "/app/designer/plants" } + }) + .mockImplementationOnce(() => { + return { pathname: "/app/designer/plants/1/edit" } + }) + .mockImplementationOnce(() => { + return { pathname: "/app/designer/plants/1" } + }) } })); diff --git a/webpack/farm_designer/plants/__tests__/add_plant_test.tsx b/webpack/farm_designer/plants/__tests__/add_plant_test.tsx index b03ce8f85..458863229 100644 --- a/webpack/farm_designer/plants/__tests__/add_plant_test.tsx +++ b/webpack/farm_designer/plants/__tests__/add_plant_test.tsx @@ -25,7 +25,7 @@ describe("", () => { }] }; Object.defineProperty(location, "pathname", { - value: "//app/plants/crop_search/mint/add" + value: "/app/designer/plants/crop_search/mint/add" }); const wrapper = mount(); expect(wrapper.text()).toContain("Mint"); diff --git a/webpack/farm_designer/plants/__tests__/crop_info_test.tsx b/webpack/farm_designer/plants/__tests__/crop_info_test.tsx index d76a894e4..6c8cc9935 100644 --- a/webpack/farm_designer/plants/__tests__/crop_info_test.tsx +++ b/webpack/farm_designer/plants/__tests__/crop_info_test.tsx @@ -27,7 +27,7 @@ import { shallow } from "enzyme"; describe("", () => { it("renders", () => { Object.defineProperty(location, "pathname", { - value: "//app/plants/crop_search/mint" + value: "/app/designer/plants/crop_search/mint" }); const wrapper = shallow( ", () => { beforeEach(function () { jest.clearAllMocks(); Object.defineProperty(location, "pathname", { - value: "//app/plants/select" + value: "/app/designer/plants/select" }); });