mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix for tests failures
Summary: - DocApi test for Allowed Origin was using a home server endpoint - Fixing waitForServer, as gristApp can be unavailable for a moment when browser is refreshed - Fixing MergedOrgs tests typing issue Test Plan: Updated Reviewers: cyprien, paulfitz Reviewed By: cyprien, paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3648
This commit is contained in:
@@ -831,7 +831,7 @@ export async function waitAppFocus(yesNo: boolean = true): Promise<void> {
|
||||
*/
|
||||
export async function waitForServer(optTimeout: number = 2000) {
|
||||
await driver.wait(() => driver.executeScript(
|
||||
"return (!window.gristApp.comm || !window.gristApp.comm.hasActiveRequests())"
|
||||
"return window.gristApp && (!window.gristApp.comm || !window.gristApp.comm.hasActiveRequests())"
|
||||
+ " && window.gristApp.testNumPendingApiRequests() === 0",
|
||||
optTimeout,
|
||||
"Timed out waiting for server requests to complete"
|
||||
|
||||
Reference in New Issue
Block a user