mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
1605e18f66
Summary: - Add showGristTour preference, and trigger tour automatically. - Tour is only triggered for new and anonymous users on a personal org, with edit permission. - Automatically open the right panel at tour start. - Don't show tours on mobile, since that's not ready (popups are cut off and can't be dismissed) - Cancel previous tour if a new one is somehow started. - Remove #repeat- trigger hash tags from the URL when the tour starts. - Ensure Help Center popup is positioned even when left panel is collapsed. - Polish up the content of the last two cards in the tour. Test Plan: Added test case for triggering and opening right panel. Reviewers: alexmojaki, paulfitz Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D2955
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
/**
|
|
*
|
|
* This is a minimal test to make sure documents can be created, edited, and
|
|
* reopened. Grist has a very extensive test set that has not yet been ported
|
|
* to the grist-core.
|
|
*
|
|
*/
|
|
|
|
import { assert, driver } from 'mocha-webdriver';
|
|
import { server, setupTestSuite } from 'test/nbrowser/testUtils';
|
|
import * as gu from 'test/nbrowser/gristUtils';
|
|
|
|
async function openMainPage() {
|
|
await driver.get(`${server.getHost()}`);
|
|
while (true) { // eslint-disable-line no-constant-condition
|
|
try {
|
|
const url = await driver.getCurrentUrl();
|
|
if (url.match(/welcome\//)) {
|
|
await driver.findContent('button', /Continue/).click();
|
|
}
|
|
if (await driver.findContent('button', /Create Empty Document/).isPresent()) {
|
|
return;
|
|
}
|
|
} catch (e) {
|
|
// don't worry about transients.
|
|
}
|
|
await driver.sleep(10);
|
|
}
|
|
}
|
|
|
|
describe("Smoke", function() {
|
|
this.timeout(20000);
|
|
setupTestSuite();
|
|
|
|
it('can create, edit, and reopen a document', async function() {
|
|
this.timeout(20000);
|
|
await openMainPage();
|
|
await driver.findContent('button', /Create Empty Document/).click();
|
|
await gu.waitForDocToLoad(20000);
|
|
await gu.dismissWelcomeTourIfNeeded();
|
|
await gu.getCell('A', 1).click();
|
|
await gu.enterCell('123');
|
|
await driver.navigate().refresh();
|
|
await gu.waitForDocToLoad();
|
|
assert.equal(await gu.getCell('A', 1).getText(), '123');
|
|
});
|
|
});
|