diff --git a/test/nbrowser/TypeChange.ntest.js b/test/nbrowser/TypeChange.ntest.js index 9819e13e..1f677d88 100644 --- a/test/nbrowser/TypeChange.ntest.js +++ b/test/nbrowser/TypeChange.ntest.js @@ -116,6 +116,7 @@ describe('TypeChange.ntest', function() { // Revise formula to get text length and accept await $('.test-type-transform-revise').wait().click(); await $('.test-type-transform-formula').click(); + await gu.waitAppFocus(false); await gu.sendKeys($.SELECT_ALL, $.DELETE, 'return len($F) + 1'); // Check that updating the type conversion works @@ -126,6 +127,7 @@ describe('TypeChange.ntest', function() { // Check that applying the type conversion without first updating works // (the weird formula keeps other tests consistent with past behaviour) await $('.test-type-transform-formula').click(); + await gu.waitAppFocus(false); await gu.sendKeys($.SELECT_ALL, $.DELETE, 'return len($F.replace("0", "0.0"))'); await gu.waitForServer(); await gu.applyTypeConversion(); diff --git a/test/nbrowser/gristUtils.ts b/test/nbrowser/gristUtils.ts index 7a1ff4ac..89e789cf 100644 --- a/test/nbrowser/gristUtils.ts +++ b/test/nbrowser/gristUtils.ts @@ -22,7 +22,8 @@ import { Organization } from 'app/gen-server/entity/Organization'; import { Product } from 'app/gen-server/entity/Product'; import { create } from 'app/server/lib/create'; -import { GristWebDriverUtils, PageWidgetPickerOptions, WindowDimensions } from 'test/nbrowser/gristWebDriverUtils'; +import { GristWebDriverUtils, PageWidgetPickerOptions, + WindowDimensions as WindowDimensionsBase } from 'test/nbrowser/gristWebDriverUtils'; import { HomeUtil } from 'test/nbrowser/homeUtil'; import { server } from 'test/nbrowser/testServer'; import { Cleanup } from 'test/nbrowser/testUtils'; @@ -85,6 +86,8 @@ export const fixturesRoot: string = testUtils.fixturesRoot; // it is sometimes useful in debugging to turn off automatic cleanup of docs and workspaces. export const noCleanup = Boolean(process.env.NO_CLEANUP); +export type WindowDimensions = WindowDimensionsBase; + // Most test code uses simulateLogin through the server reference. Keep them to reduce unnecessary // code changes. server.simulateLogin = simulateLogin;