(core) Skip showing empty doc tours

Summary: Empty doc tours are now skipped. Before, an error was shown instead.

Test Plan: Browser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4204
This commit is contained in:
George Gevoian
2024-03-04 17:48:40 -05:00
parent ca8ac806db
commit a5099fc598
2 changed files with 34 additions and 8 deletions

View File

@@ -218,4 +218,23 @@ describe("DuplicateDocument", function() {
await driver.find(".test-bc-workspace").click();
await gu.removeDoc(`DuplicateTest2 ${name} Copy`);
});
it("should not auto-start tour if a document with a tour is copied as a template", async function() {
const session = await gu.session().teamSite.login();
await session.tempDoc(cleanup, 'doctour.grist');
await session.tempWorkspace(cleanup, 'Test Workspace');
assert.isTrue(await driver.findWait('.test-onboarding-popup', 1000).isPresent());
await driver.find('.test-onboarding-close').click();
await gu.waitForServer();
await driver.find('.test-tb-share').click();
await driver.find('.test-save-copy').click();
await driver.findWait('.test-modal-dialog', 1000);
await driver.find('.test-save-as-template').click();
await gu.completeCopy({destName: 'DuplicateTest3', destWorkspace: 'Test Workspace'});
// Give it a second, just to be sure the tour doesn't appear.
await driver.sleep(1000);
assert.isFalse(await driver.find('.test-onboarding-popup').isPresent());
});
});