From 4c0e429b76b64ad86b5071b94daf38ca88cd3e15 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 27 Sep 2023 16:32:54 +0530 Subject: [PATCH] test: playwright test correction Signed-off-by: Pranav C --- tests/playwright/startPlayWrightServer.sh | 4 ++-- .../tests/db/general/groupCRUD.spec.ts | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/playwright/startPlayWrightServer.sh b/tests/playwright/startPlayWrightServer.sh index e70d585d96..c68a4542d4 100755 --- a/tests/playwright/startPlayWrightServer.sh +++ b/tests/playwright/startPlayWrightServer.sh @@ -2,10 +2,10 @@ if ! curl --output /dev/null --silent --head --fail http://localhost:31000 then echo "Starting PlayWright Server" - PWDEBUG=console pnpm dlx playwright run-server --port 31000 & + PWDEBUG=console pnpm exec playwright run-server --port 31000 & # Wait for server to start while ! curl --output /dev/null --silent --head --fail http://localhost:31000; do sleep 0.2 done -fi \ No newline at end of file +fi diff --git a/tests/playwright/tests/db/general/groupCRUD.spec.ts b/tests/playwright/tests/db/general/groupCRUD.spec.ts index 23afa960cb..d9fa817160 100644 --- a/tests/playwright/tests/db/general/groupCRUD.spec.ts +++ b/tests/playwright/tests/db/general/groupCRUD.spec.ts @@ -30,7 +30,7 @@ test.describe('GroupBy CRUD Operations', () => { let context: any; test.beforeEach(async ({ page }) => { - context = await setup({ page, isEmptyProject: true }); + context = await setup({ page, isEmptyProject: false }); dashboard = new DashboardPage(page, context.project); toolbar = dashboard.grid.toolbar; topbar = dashboard.grid.topbar; @@ -252,19 +252,17 @@ test.describe('GroupBy CRUD Operations', () => { test('Single GroupBy CRUD Operations - Links', async ({ page }) => { await dashboard.treeView.openTable({ title: 'Film' }); - await toolbar.sort.add({ title: 'Actors', ascending: true, locallySaved: false }); - await toolbar.clickGroupBy(); await toolbar.groupBy.add({ title: 'Actors', ascending: false, locallySaved: false }); - await dashboard.grid.groupPage.openGroup({ indexMap: [0] }); + await dashboard.grid.groupPage.openGroup({ indexMap: [2] }); - await dashboard.grid.groupPage.addNewRow({ - indexMap: [0], - index: 10, - columnHeader: 'Item', - value: 'Aaaaaaaaaaaaaaaaaaaa', + await dashboard.grid.groupPage.validateFirstRow({ + indexMap: [2], + rowIndex: 0, + columnHeader: 'Title', + value: 'ARABIA DOGMA', }); }); });