Fix TabsAndPanelsController now that #! are removed from url

This PR https://github.com/openfoodfoundation/openfoodnetwork/pull/9729
remove #! from url. But unfortunately, AngularJs rewrite "example.com#panel"
as "example.com#/panel" thus breaking the original implementation.
This commit is contained in:
Gaetan Craig-Riou
2023-03-24 14:28:29 +11:00
parent 2e10336a47
commit e1845dddac
2 changed files with 8 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ describe('TabsAndPanelsController', () => {
const { location } = window;
const mockLocationToString = (panel) => {
// Mocking window.location.toString()
const url = `http://localhost:3000/admin/enterprises/great-shop/edit#!#${panel}`
const url = `http://localhost:3000/admin/enterprises/great-shop/edit#/${panel}`
const mockedToString = jest.fn()
mockedToString.mockImplementation(() => (url))