mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
login_to_access: Take user to web_public_compatible hash on exit.
We save the last web_public_compatible hash that user visited before the modal was shown and take user to that hash when user exits the modal.
This commit is contained in:
@@ -67,3 +67,14 @@ test("update internal hash if required", ({override}) => {
|
||||
// calls to stub.
|
||||
assert.equal(stub.num_calls, 1);
|
||||
});
|
||||
|
||||
test("web public view hash restore", () => {
|
||||
const allowed_hash = "#";
|
||||
browser_history.update(allowed_hash);
|
||||
assert.equal(location.hash, allowed_hash);
|
||||
const new_hash = "#narrow/is/private";
|
||||
browser_history.update(new_hash);
|
||||
assert.equal(location.hash, new_hash);
|
||||
browser_history.return_to_web_public_hash();
|
||||
assert.equal(location.hash, allowed_hash);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user