mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(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
This commit is contained in:
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…
Reference in New Issue
Block a user