Browse Source

test: row-height

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5332/head
Raju Udava 2 years ago committed by mertmit
parent
commit
a0b65c43db
  1. 37
      tests/playwright/tests/undo-redo.spec.ts

37
tests/playwright/tests/undo-redo.spec.ts

@ -16,7 +16,7 @@ let dashboard: DashboardPage,
cityTable: any, cityTable: any,
countryTable: any; countryTable: any;
const validateResponse = true; const validateResponse = false;
/** /**
This change provides undo/redo on multiple actions over UI. This change provides undo/redo on multiple actions over UI.
@ -280,6 +280,41 @@ test.describe('Undo Redo', () => {
await undo({ page }); await undo({ page });
await verifyRecords({ filtered: false }); 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', () => { test.describe('Undo Redo - 2', () => {

Loading…
Cancel
Save