From a0b65c43dba9bbd743ea3df0feb8ae8607c896c5 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 24 Mar 2023 12:49:54 +0530 Subject: [PATCH] test: row-height Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/tests/undo-redo.spec.ts | 37 +++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/playwright/tests/undo-redo.spec.ts b/tests/playwright/tests/undo-redo.spec.ts index f0a367915d..8144dd6496 100644 --- a/tests/playwright/tests/undo-redo.spec.ts +++ b/tests/playwright/tests/undo-redo.spec.ts @@ -16,7 +16,7 @@ let dashboard: DashboardPage, cityTable: any, countryTable: any; -const validateResponse = true; +const validateResponse = false; /** This change provides undo/redo on multiple actions over UI. @@ -280,6 +280,41 @@ test.describe('Undo Redo', () => { await undo({ page }); await verifyRecords({ filtered: false }); }); + + test('Row height', async ({ page }) => { + async function verifyRowHeight({ height }: { height: string }) { + await dashboard.grid.rowPage.getRecordHeight(0).then(readValue => { + expect(readValue).toBe(height); + }); + } + + // close 'Team & Auth' tab + await dashboard.closeTab({ title: 'Team & Auth' }); + await dashboard.treeView.openTable({ title: 'numberBased' }); + + const timeOut = 200; + + await verifyRowHeight({ height: '1.5rem' }); + + // set row height & verify + await toolbar.clickRowHeight(); + await toolbar.rowHeight.click({ title: 'Tall' }); + await new Promise(resolve => setTimeout(resolve, timeOut)); + await verifyRowHeight({ height: '6rem' }); + + await toolbar.clickRowHeight(); + await toolbar.rowHeight.click({ title: 'Medium' }); + await new Promise(resolve => setTimeout(resolve, timeOut)); + await verifyRowHeight({ height: '3rem' }); + + await undo({ page }); + await new Promise(resolve => setTimeout(resolve, timeOut)); + await verifyRowHeight({ height: '6rem' }); + + await undo({ page }); + await new Promise(resolve => setTimeout(resolve, timeOut)); + await verifyRowHeight({ height: '1.5rem' }); + }); }); test.describe('Undo Redo - 2', () => {