From dd99060f0423f2f4f01edae5173afc8cc2a200a0 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:06 +0000 Subject: [PATCH] test: use API to prep beforeEach work --- .../tests/db/columns/columnMultiSelect.spec.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts b/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts index 1b81f11289..f737a52518 100644 --- a/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts +++ b/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts @@ -244,6 +244,8 @@ test.describe('Multi select - filters', () => { options: ['foo', 'bar', 'baz'], }); + const selectOptions = ['', 'foo', 'bar', 'baz', 'foo,bar', 'foo,bar,baz']; + try { const tables = await api.dbTable.list(context.base.id); const rowAttributes = []; @@ -251,6 +253,7 @@ test.describe('Multi select - filters', () => { const row = { Id: i + 1, Title: `${i + 1}`, + MultiSelect: selectOptions[i], }; rowAttributes.push(row); } @@ -263,15 +266,6 @@ test.describe('Multi select - filters', () => { // page reload await page.reload(); - - await grid.cell.selectOption.select({ index: 1, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true }); - await grid.cell.selectOption.select({ index: 2, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true }); - await grid.cell.selectOption.select({ index: 3, columnHeader: 'MultiSelect', option: 'baz', multiSelect: true }); - await grid.cell.selectOption.select({ index: 4, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true }); - await grid.cell.selectOption.select({ index: 4, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true }); - await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true }); - await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true }); - await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'baz', multiSelect: true }); }); test.afterEach(async () => {