mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 02:10:07 +00:00
TSK-934: redirect to last location on opening main page (#2817)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
8ffc0b683a
commit
9cb86c65b8
@ -35,7 +35,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (application === undefined) {
|
if (application === undefined) {
|
||||||
const last = localStorage.getItem(`platform_last_loc_${loc.path[1]}`)
|
let last = localStorage.getItem(`platform_last_loc_${loc.path[1]}`)
|
||||||
|
if (last === null) {
|
||||||
|
last = localStorage.getItem('platform_last_loc')
|
||||||
|
}
|
||||||
if (last !== null) {
|
if (last !== null) {
|
||||||
navigate(JSON.parse(last))
|
navigate(JSON.parse(last))
|
||||||
} else {
|
} else {
|
||||||
|
@ -51,4 +51,11 @@ test.describe('workbench tests', () => {
|
|||||||
// Click text=John Appleseed
|
// Click text=John Appleseed
|
||||||
await expect(page.locator('text=Appleseed John')).toBeVisible()
|
await expect(page.locator('text=Appleseed John')).toBeVisible()
|
||||||
})
|
})
|
||||||
|
test('check-for-last-loc', async ({ page }) => {
|
||||||
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
|
await expect(page).toHaveURL(`${PlatformURI}/workbench/sanity-ws/recruit`)
|
||||||
|
const urlToCheck = page.url()
|
||||||
|
await page.goto(`${PlatformURI}`)
|
||||||
|
await expect(page).toHaveURL(urlToCheck)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user