mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
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:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user