From 775b94b15ab39230eb3ec3c230b60d3223b4f98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Wed, 6 Sep 2023 13:37:57 +0200 Subject: [PATCH] (core) Wrong userId in the team-success endpoint when multiple accounts are logged in Summary: In browser where user is logged in multiple times, she can start creating a new site from docs org where user B is the default one, and end up on the api endpoint where user A is the default one. This resulted in wrong userId in the handler. Test Plan: New test Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D4029 --- test/nbrowser/gristUtils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/nbrowser/gristUtils.ts b/test/nbrowser/gristUtils.ts index ae1552e1..c6e337da 100644 --- a/test/nbrowser/gristUtils.ts +++ b/test/nbrowser/gristUtils.ts @@ -948,6 +948,9 @@ export async function waitForLabelInput(): Promise { * Sends UserActions using client api from the browser. */ export async function sendActions(actions: UserAction[]) { + await driver.manage().setTimeouts({ + script: 1000 * 2, /* 2 seconds, default is 0.5s */ + }); const result = await driver.executeAsyncScript(` const done = arguments[arguments.length - 1]; const prom = gristDocPageModel.gristDoc.get().docModel.docData.sendActions(${JSON.stringify(actions)});