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:
David
2026-09-17 11:23:59 +00:00
committed by Copybot
parent bccef96581
commit f1e3093ae3
7 changed files with 443 additions and 18 deletions
+10
View File
@@ -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, '', '/')
},
}