From 5a2031062ba28969420d98c016015cae60328ec9 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 20 Jan 2023 12:31:01 +0530 Subject: [PATCH] test: checkbox sort filter update Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nc-gui/utils/filterUtils.ts | 4 ++-- tests/playwright/tests/columnCheckbox.spec.ts | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui/utils/filterUtils.ts b/packages/nc-gui/utils/filterUtils.ts index bdb7e376e2..5f6ab8c414 100644 --- a/packages/nc-gui/utils/filterUtils.ts +++ b/packages/nc-gui/utils/filterUtils.ts @@ -41,13 +41,13 @@ export const comparisonOpList: { text: 'is empty', value: 'empty', ignoreVal: true, - excludedTypes: [UITypes.Checkbox], + excludedTypes: [UITypes.Checkbox, UITypes.Rating], }, { text: 'is not empty', value: 'notempty', ignoreVal: true, - excludedTypes: [UITypes.Checkbox], + excludedTypes: [UITypes.Checkbox, UITypes.Rating], }, { text: 'is null', diff --git a/tests/playwright/tests/columnCheckbox.spec.ts b/tests/playwright/tests/columnCheckbox.spec.ts index 68d348cf54..14dd0e1e42 100644 --- a/tests/playwright/tests/columnCheckbox.spec.ts +++ b/tests/playwright/tests/columnCheckbox.spec.ts @@ -2,7 +2,6 @@ import { test } from '@playwright/test'; import { DashboardPage } from '../pages/Dashboard'; import setup from '../setup'; import { ToolbarPage } from '../pages/Dashboard/common/Toolbar'; -import { isPg } from '../setup/db'; test.describe('Checkbox - cell, filter, sort', () => { let dashboard: DashboardPage, toolbar: ToolbarPage; @@ -87,10 +86,10 @@ test.describe('Checkbox - cell, filter, sort', () => { // Filter column await verifyFilter({ opType: 'is checked', result: ['1a', '1c', '1f'] }); await verifyFilter({ opType: 'is not checked', result: ['1b', '1d', '1e'] }); - await verifyFilter({ opType: 'is equal', value: '0', result: ['1b'] }); + await verifyFilter({ opType: 'is equal', value: '0', result: ['1b', '1d', '1e'] }); await verifyFilter({ opType: 'is not equal', value: '1', result: ['1b', '1d', '1e'] }); - await verifyFilter({ opType: 'is null', result: ['1d', '1e'] }); - await verifyFilter({ opType: 'is not null', result: ['1a', '1b', '1c', '1f'] }); + await verifyFilter({ opType: 'is null', result: [] }); + await verifyFilter({ opType: 'is not null', result: ['1a', '1b', '1c', '1d', '1e', '1f'] }); // Sort column await toolbar.sort.add({ @@ -98,7 +97,7 @@ test.describe('Checkbox - cell, filter, sort', () => { isAscending: true, isLocallySaved: false, }); - await validateRowArray(['1d', '1e', '1b', '1a', '1c', '1f']); + await validateRowArray(['1b', '1d', '1e', '1a', '1c', '1f']); await toolbar.sort.reset(); // sort descending & validate