mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Direct users to last visited site when possible
Summary: When clicking the logo in the top-left corner, or finishing a tutorial, we now direct users to the site they last visited, if possible. If unknown, a new redirect endpoint, /welcome/home, is used instead, which directs users to a sensible location based on the number of sites they have. Test Plan: Browser tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3878
This commit is contained in:
@@ -520,10 +520,14 @@ describe('DocTutorial', function () {
|
||||
assert.deepEqual(await gu.getPageNames(), ['Page 1', 'Page 2', 'NewTable']);
|
||||
});
|
||||
|
||||
it('redirects to the doc menu when finished', async function() {
|
||||
await driver.find('.test-doc-tutorial-popup-slide-13').click();
|
||||
it('redirects to the last visited site when finished', async function() {
|
||||
const otherSession = await gu.session().personalSite.user('user1').addLogin();
|
||||
await otherSession.loadDocMenu('/');
|
||||
await session.loadDoc(`/doc/${doc.id}`);
|
||||
await driver.findWait('.test-doc-tutorial-popup-slide-13', 2000).click();
|
||||
await driver.find('.test-doc-tutorial-popup-next').click();
|
||||
await driver.findWait('.test-dm-doclist', 2000);
|
||||
await gu.waitForDocMenuToLoad();
|
||||
assert.match(await driver.getCurrentUrl(), /o\/docs\/$/);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user