From 8f1889d2d74b3ba110af9b30c03f830abfffff90 Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Wed, 23 Feb 2022 14:41:00 -0800 Subject: [PATCH] (core) Fix staging test that would timeout Summary: Removes code from simulateLogin that's no longer needed, and increases the timeout on the util function that checks if we're on the Grist sign-up page. Test Plan: N/A (fixing test) Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3287 --- test/nbrowser/homeUtil.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/test/nbrowser/homeUtil.ts b/test/nbrowser/homeUtil.ts index 28655609..bbf03ce1 100644 --- a/test/nbrowser/homeUtil.ts +++ b/test/nbrowser/homeUtil.ts @@ -91,9 +91,6 @@ export class HomeUtil { if (!(await this.isWelcomePage()) && (options.freshAccount || options.isFirstLogin)) { await this._recreateCurrentUser(email, org); } - if (isFirstLogin === false) { - await this._fillWelcomePageIfPresent(name); - } } if (options.freshAccount) { this._apiKey.delete(email); @@ -276,7 +273,7 @@ export class HomeUtil { /** * Waits for browser to navigate to Grist login page. */ - public async checkGristLoginPage(waitMs: number = 2000) { + public async checkGristLoginPage(waitMs: number = 4000) { await this.driver.wait(this.isOnGristLoginPage.bind(this), waitMs); } @@ -335,20 +332,6 @@ export class HomeUtil { } } - // Get past the user welcome page if it is present. - private async _fillWelcomePageIfPresent(name?: string) { - // TODO: check treatment of welcome/team page when necessary. - if (await this.isWelcomePage()) { - if (name) { - await this.setValue(await this.driver.findWait('input[name="username"]', 4000), name); - } - const url = await this.driver.getCurrentUrl(); - await this.driver.findWait('button.test-continue-button', 4000).click(); - // Wait for the navigation to take place. - await this.driver.wait(async () => (await this.driver.getCurrentUrl()) !== url, 4000); - } - } - // Make a home api instance with the given api key, for the specified org. // If no api key given, work anonymously. private _createHomeApiUsingApiKey(apiKey: string|null, org?: string): UserAPIImpl {