From 3206ee45ba9c271d6694d434d437b83cab19347b Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 19 Jan 2023 14:54:42 +0530 Subject: [PATCH] test: checkbox - kludge to handle PG null in sort Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/tests/columnCheckbox.spec.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/playwright/tests/columnCheckbox.spec.ts b/tests/playwright/tests/columnCheckbox.spec.ts index d0dddee394..6c453a792c 100644 --- a/tests/playwright/tests/columnCheckbox.spec.ts +++ b/tests/playwright/tests/columnCheckbox.spec.ts @@ -2,7 +2,7 @@ import { test } from '@playwright/test'; import { DashboardPage } from '../pages/Dashboard'; import setup from '../setup'; import { ToolbarPage } from '../pages/Dashboard/common/Toolbar'; - +import { isPg, isSqlite } from '../setup/db'; test.describe('Checkbox - cell, filter, sort', () => { let dashboard: DashboardPage, toolbar: ToolbarPage; let context: any; @@ -97,7 +97,11 @@ test.describe('Checkbox - cell, filter, sort', () => { isAscending: true, isLocallySaved: false, }); - await validateRowArray(['1d', '1e', '1b', '1a', '1c', '1f']); + if (isPg(context.db)) { + await validateRowArray(['1b', '1a', '1c', '1f', '1d', '1e']); + } else { + await validateRowArray(['1d', '1e', '1b', '1a', '1c', '1f']); + } await toolbar.sort.resetSort(); // sort descending & validate @@ -106,7 +110,11 @@ test.describe('Checkbox - cell, filter, sort', () => { isAscending: false, isLocallySaved: false, }); - await validateRowArray(['1a', '1c', '1f', '1b', '1d', '1e']); + if (isPg(context.db)) { + await validateRowArray(['1d', '1e', '1a', '1c', '1f', '1b']); + } else { + await validateRowArray(['1a', '1c', '1f', '1b', '1d', '1e']); + } await toolbar.sort.resetSort(); // wait for 10 seconds