(core) Add check for test login page in homeUtil.ts

Summary:
The old regex for login pages, /gristlogin/, used to handle
test login pages too, matching on a query param set in the
URL. A recent change to make the regex more specific broke this.

This fixes that regression by adding an additional check to
isOnLoginPage for the presence of the test login page.

Test Plan: N/A (fixing test)

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3300
pull/165/head
George Gevoian 2 years ago
parent 8f5ce9d610
commit 10097c5423

@ -253,10 +253,11 @@ export class HomeUtil {
}
/**
* Returns whether we are currently on the Cognito login page.
* Returns whether we are currently on the Cognito or test login page.
*/
public async isOnLoginPage() {
return /^https:\/\/gristlogin/.test(await this.driver.getCurrentUrl());
const url = await this.driver.getCurrentUrl();
return /^https:\/\/gristlogin/.test(url) || await this.isOnTestLoginPage();
}
/**

Loading…
Cancel
Save