From c70b427483689c365aa8d7a1f945c1ed0251d895 Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Fri, 15 Jul 2022 10:24:11 -0700 Subject: [PATCH] (core) Fix error when filtering empty choice and choice list columns Summary: A client error should no longer be thrown when filtering an empty Choice or Choice List column. Test Plan: Browser tests. Reviewers: alexmojaki Reviewed By: alexmojaki Subscribers: alexmojaki Differential Revision: https://phab.getgrist.com/D3528 --- app/client/ui/ColumnFilterMenu.ts | 2 +- test/nbrowser/gristUtils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/client/ui/ColumnFilterMenu.ts b/app/client/ui/ColumnFilterMenu.ts index a87fa4d2..b8006144 100644 --- a/app/client/ui/ColumnFilterMenu.ts +++ b/app/client/ui/ColumnFilterMenu.ts @@ -342,7 +342,7 @@ function getEmptyCountMap(fieldOrColumn: ViewFieldRec|ColumnRec): Map [v, {label: String(v), count: 0, displayValue: v}])); } diff --git a/test/nbrowser/gristUtils.ts b/test/nbrowser/gristUtils.ts index bebeec62..c42b1204 100644 --- a/test/nbrowser/gristUtils.ts +++ b/test/nbrowser/gristUtils.ts @@ -1371,7 +1371,7 @@ export async function setType(type: RegExp, options: {skipWait?: boolean} = {}) await toggleSidePanel('right', 'open'); await driver.find('.test-right-tab-field').click(); await driver.find('.test-fbuilder-type-select').click(); - await driver.findContentWait('.test-select-menu .test-select-row', type, 200).click(); + await driver.findContentWait('.test-select-menu .test-select-row', type, 500).click(); if (!options.skipWait) { await waitForServer(); } } @@ -1949,7 +1949,7 @@ export async function addColumn(name: string) { // If we are on a summary table, we could be see a menu helper const menu = (await driver.findAll('.grist-floating-menu'))[0]; if (menu) { - await menu.findContent("li", name).click(); + await menu.findContent("li", "Add Column").click(); } await waitForServer(); await waitAppFocus(false);