mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add new Grist sign-up page
Summary: Available at login.getgrist.com/signup, the new sign-up page includes similar options available on the hosted Cognito sign-up page, such as support for registering with Google. All previous redirects to Cognito for sign-up should now redirect to the new Grist sign-up page. Login is still handled with the hosted Cognito login page, and there is a link to go there from the new sign-up page. Test Plan: Browser, project and server tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3249
This commit is contained in:
@@ -77,11 +77,18 @@ export class HomeUtil {
|
||||
await this.driver.get('about:blank');
|
||||
// When running against an external server, we log in through Cognito.
|
||||
await this.driver.get(this.server.getUrl(org, ""));
|
||||
if (!(await this.isOnLoginPage())) {
|
||||
// Check if we got redirected to the Grist sign-up page.
|
||||
if (await this.isOnSignupPage()) {
|
||||
await this.driver.findWait('a[href*="login?"]', 4000).click();
|
||||
} else if (!(await this.isOnLoginPage())) {
|
||||
// Explicitly click sign-in link if necessary.
|
||||
await this.driver.findWait('.test-user-signin', 4000).click();
|
||||
await this.driver.findContentWait('.grist-floating-menu a', 'Sign in', 500).click();
|
||||
}
|
||||
// Check if we need to switch to Cognito login from the Grist sign-up page.
|
||||
if (await this.isOnSignupPage()) {
|
||||
await this.driver.findWait('a[href*="login?"]', 4000).click();
|
||||
}
|
||||
await this.checkLoginPage();
|
||||
await this.fillLoginForm(email);
|
||||
if (!(await this.isWelcomePage()) && (options.freshAccount || options.isFirstLogin)) {
|
||||
@@ -255,6 +262,13 @@ export class HomeUtil {
|
||||
return /gristlogin/.test(await this.driver.getCurrentUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether we are currently on the Grist sign-up page.
|
||||
*/
|
||||
public async isOnSignupPage() {
|
||||
return /login(-s)?\.getgrist\.com\/signup/.test(await this.driver.getCurrentUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for browser to navigate to Cognito login page.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user