mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #35268 from overleaf/dp-frontend-routing
[web] store project dashboard navigation state in the URL GitOrigin-RevId: 76d95c5706fc196dac7c362e186c66c5334f35ac
This commit is contained in:
+10
@@ -122,3 +122,13 @@ Object.defineProperty(navigator, 'onLine', {
|
||||
configurable: true,
|
||||
get: () => true,
|
||||
})
|
||||
|
||||
// Reset the URL after each test. Some features (e.g. the project dashboard)
|
||||
// push navigation state into the URL via history.pushState; because the jsdom
|
||||
// window is shared across the whole run, a dirty path would otherwise leak into
|
||||
// the next test's initial state and into the `page` field of analytics events.
|
||||
exports.mochaHooks = {
|
||||
afterEach() {
|
||||
window.history.replaceState(null, '', '/')
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user