From 14b14f116e6dc92b81601d8df3a8a3b22b45be9c Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Mon, 24 Jul 2023 12:21:46 -0400 Subject: [PATCH] (core) export WindowDimensions from gristUtils after refactor Summary: WindowDimensions from gristUtils needs exporting after it got moved to another file. Test Plan: existing tests should pass Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D3971 --- test/nbrowser/TypeChange.ntest.js | 2 ++ test/nbrowser/gristUtils.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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;