From 4321c0f9ef311022402f61fe488f9c0260fdf4a0 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 3 May 2024 06:45:41 +0000 Subject: [PATCH] test: leave a time gap between date & time config --- .../playwright/pages/Dashboard/Grid/Column/index.ts | 4 ++++ .../tests/db/columns/columnSingleSelect.spec.ts | 5 ----- .../tests/db/columns/columnUserSelect.spec.ts | 12 ------------ 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/index.ts b/tests/playwright/pages/Dashboard/Grid/Column/index.ts index 42811b0975..8371479e9b 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/index.ts @@ -321,6 +321,10 @@ export class ColumnPageObject extends BasePage { // Date Format await this.get().locator('.nc-date-select').click(); await this.rootPage.locator('.ant-select-item').locator(`text="${dateFormat}"`).click(); + + // allow UI to update + await this.rootPage.waitForTimeout(500); + // Time Format await this.get().locator('.nc-time-select').click(); await this.rootPage.locator('.ant-select-item').locator(`text="${timeFormat}"`).click(); diff --git a/tests/playwright/tests/db/columns/columnSingleSelect.spec.ts b/tests/playwright/tests/db/columns/columnSingleSelect.spec.ts index ff9de479dc..97d098dcef 100644 --- a/tests/playwright/tests/db/columns/columnSingleSelect.spec.ts +++ b/tests/playwright/tests/db/columns/columnSingleSelect.spec.ts @@ -156,11 +156,6 @@ test.describe('Single select - filter & sort', () => { ]); await page.reload(); - // await grid.addNewRow({ index: 0, value: '1' }); - // await grid.addNewRow({ index: 1, value: '2' }); - // await grid.addNewRow({ index: 2, value: '3' }); - // await grid.addNewRow({ index: 3, value: '4' }); - await grid.cell.selectOption.select({ index: 1, columnHeader: 'SingleSelect', option: 'foo', multiSelect: false }); await grid.cell.selectOption.select({ index: 2, columnHeader: 'SingleSelect', option: 'bar', multiSelect: false }); await grid.cell.selectOption.select({ index: 3, columnHeader: 'SingleSelect', option: 'baz', multiSelect: false }); diff --git a/tests/playwright/tests/db/columns/columnUserSelect.spec.ts b/tests/playwright/tests/db/columns/columnUserSelect.spec.ts index c8ed51fa42..5a02640249 100644 --- a/tests/playwright/tests/db/columns/columnUserSelect.spec.ts +++ b/tests/playwright/tests/db/columns/columnUserSelect.spec.ts @@ -74,7 +74,6 @@ test.describe('User single select', () => { await grid.column.create({ title: 'User', type: 'User' }); - // await grid.addNewRow({ index: 0, value: 'Row 0' }); const tables = await api.dbTable.list(context.base.id); tableId = tables.list.find((table: any) => table.title === 'sheet1').id; await api.dbTableRow.bulkCreate('noco', context.base.id, tableId, [ @@ -108,7 +107,6 @@ test.describe('User single select', () => { }); // Add new row and verify default value is added in new cell - // await grid.addNewRow({ index: 1, value: 'Row 1' }); await api.dbTableRow.bulkCreate('noco', context.base.id, tableId, [ { Id: 2, @@ -155,7 +153,6 @@ test.describe('User single select', () => { for (let i = 0; i <= 4; i++) { await grid.cell.userOption.select({ index: i, columnHeader: 'User', option: users[i], multiSelect: false }); - // await grid.addNewRow({ index: i + 1, value: `Row ${i + 1}` }); } await grid.column.duplicateColumn({ @@ -200,7 +197,6 @@ test.describe('User single select', () => { // Edit, refresh and verify for (let i = 0; i <= 4; i++) { await grid.cell.userOption.select({ index: i, columnHeader: 'User', option: users[i], multiSelect: false }); - // await grid.addNewRow({ index: i + 1, value: `Row ${i + 1}` }); } // refresh page @@ -335,7 +331,6 @@ test.describe('User single select - filter, sort & GroupBy', () => { await page.reload(); for (let i = 0; i <= 4; i++) { - // await grid.addNewRow({ index: i, value: `${i}` }); await grid.cell.userOption.select({ index: i, columnHeader: 'User', option: users[i], multiSelect: false }); } }); @@ -470,7 +465,6 @@ test.describe('User multiple select', () => { }); test('Verify the default option count, select default value and verify', async () => { - // await grid.addNewRow({ index: 0, value: 'Row 0' }); await api.dbTableRow.bulkCreate('noco', context.base.id, tableId, [{ Id: 1, Title: `Row 0` }]); await grid.rootPage.reload(); @@ -491,7 +485,6 @@ test.describe('User multiple select', () => { }); // Add new row and verify default value is added in new cell - // await grid.addNewRow({ index: 1, value: 'Row 1' }); await api.dbTableRow.bulkCreate('noco', context.base.id, tableId, [{ Id: 2, Title: `Row 1` }]); await grid.rootPage.reload(); @@ -521,8 +514,6 @@ test.describe('User multiple select', () => { let counter = 1; for (let i = 0; i <= 4; i++) { - // await grid.addNewRow({ index: i, value: `Row ${i}` }); - await grid.cell.userOption.select({ index: i, columnHeader: 'User', option: users[i], multiSelect: true }); await grid.cell.userOption.select({ index: i, columnHeader: 'User', option: users[counter], multiSelect: true }); @@ -576,8 +567,6 @@ test.describe('User multiple select', () => { // Edit, refresh and verify let counter = 1; for (let i = 0; i <= 4; i++) { - // await grid.addNewRow({ index: i, value: `Row ${i}` }); - await grid.cell.userOption.select({ index: i, columnHeader: 'User', @@ -723,7 +712,6 @@ test.describe('User multiple select - filter, sort & GroupBy', () => { let counter = 2; for (let i = 0; i <= 4; i++) { - // await grid.addNewRow({ index: i, value: `${i}` }); await grid.cell.userOption.select({ index: i, columnHeader: 'User', option: users[i], multiSelect: true }); if (i !== 0) { await grid.cell.userOption.select({