From 323408b73dc7f885d74454c9b62fcb9c69851af1 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:40 +0000 Subject: [PATCH 01/11] fix: multiselect type field expand btn overlap issue --- packages/nc-gui/components/cell/MultiSelect.vue | 2 +- packages/nc-gui/components/cell/User.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index 08fe8192e9..0295a8ef6f 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -567,7 +567,7 @@ const onFocus = () => { } :deep(.ant-select-selector) { - @apply !px-0; + @apply !pl-0; } :deep(.ant-select-selection-search-input) { diff --git a/packages/nc-gui/components/cell/User.vue b/packages/nc-gui/components/cell/User.vue index 70647cbc3b..982ec4b7b6 100644 --- a/packages/nc-gui/components/cell/User.vue +++ b/packages/nc-gui/components/cell/User.vue @@ -437,7 +437,7 @@ const filterOption = (input: string, option: any) => { } :deep(.ant-select-selector) { - @apply !px-0; + @apply !pl-0; } :deep(.ant-select-selection-search-input) { From d8bd3f5cddbb584b3ebb92c63d24870f1cbf9aff Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:40 +0000 Subject: [PATCH 02/11] fix: NULL display in cell isn't uniform nocodb/nocodb/issues/7344 --- packages/nc-gui/components/cell/DatePicker.vue | 2 +- packages/nc-gui/components/cell/DateTimePicker.vue | 2 +- packages/nc-gui/components/cell/Decimal.vue | 2 +- packages/nc-gui/components/cell/Duration.vue | 2 +- packages/nc-gui/components/cell/Percent.vue | 2 +- packages/nc-gui/components/cell/TimePicker.vue | 2 +- packages/nc-gui/components/cell/Url.vue | 2 +- packages/nc-gui/components/cell/YearPicker.vue | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/nc-gui/components/cell/DatePicker.vue b/packages/nc-gui/components/cell/DatePicker.vue index 39d807774b..f137d7ef63 100644 --- a/packages/nc-gui/components/cell/DatePicker.vue +++ b/packages/nc-gui/components/cell/DatePicker.vue @@ -104,7 +104,7 @@ const placeholder = computed(() => { if (isEditColumn.value && (modelValue === '' || modelValue === null)) { return t('labels.optional') } else if (modelValue === null && showNull.value) { - return t('general.null') + return t('general.null').toUpperCase() } else if (isDateInvalid.value) { return t('msg.invalidDate') } else { diff --git a/packages/nc-gui/components/cell/DateTimePicker.vue b/packages/nc-gui/components/cell/DateTimePicker.vue index 321b42adae..381feff1bb 100644 --- a/packages/nc-gui/components/cell/DateTimePicker.vue +++ b/packages/nc-gui/components/cell/DateTimePicker.vue @@ -157,7 +157,7 @@ const placeholder = computed(() => { if (isEditColumn.value && (modelValue === '' || modelValue === null)) { return t('labels.optional') } else if (modelValue === null && showNull.value) { - return t('general.null') + return t('general.null').toUpperCase() } else if (isDateInvalid.value) { return t('msg.invalidDate') } else { diff --git a/packages/nc-gui/components/cell/Decimal.vue b/packages/nc-gui/components/cell/Decimal.vue index aad130039f..9e02452f04 100644 --- a/packages/nc-gui/components/cell/Decimal.vue +++ b/packages/nc-gui/components/cell/Decimal.vue @@ -112,7 +112,7 @@ watch(isExpandedFormOpen, () => { @selectstart.capture.stop @mousedown.stop /> - {{ $t('general.null') }} + {{ $t('general.null') }} {{ displayValue }} diff --git a/packages/nc-gui/components/cell/Duration.vue b/packages/nc-gui/components/cell/Duration.vue index b4bf77263c..cde8bdf2ee 100644 --- a/packages/nc-gui/components/cell/Duration.vue +++ b/packages/nc-gui/components/cell/Duration.vue @@ -111,7 +111,7 @@ const focus: VNodeRef = (el) => @mousedown.stop /> - {{ $t('general.null') }} + {{ $t('general.null') }} {{ localState }} diff --git a/packages/nc-gui/components/cell/Percent.vue b/packages/nc-gui/components/cell/Percent.vue index 94acc9186a..3ae6d120fd 100644 --- a/packages/nc-gui/components/cell/Percent.vue +++ b/packages/nc-gui/components/cell/Percent.vue @@ -143,7 +143,7 @@ const onTabPress = (e: KeyboardEvent) => { @selectstart.capture.stop @mousedown.stop /> - {{ $t('general.null') }} + {{ $t('general.null') }}
{ if (isEditColumn.value && (modelValue === '' || modelValue === null)) { return t('labels.optional') } else if (modelValue === null && showNull.value) { - return t('general.null') + return t('general.null').toUpperCase() } else if (isTimeInvalid.value) { return t('msg.invalidTime') } else { diff --git a/packages/nc-gui/components/cell/Url.vue b/packages/nc-gui/components/cell/Url.vue index b624417e93..f5f5f06a1d 100644 --- a/packages/nc-gui/components/cell/Url.vue +++ b/packages/nc-gui/components/cell/Url.vue @@ -108,7 +108,7 @@ watch( @mousedown.stop /> - $t('general.null') + {{$t('general.null')}} { if (isEditColumn.value && (modelValue === '' || modelValue === null)) { return t('labels.optional') } else if (modelValue === null && showNull.value) { - return t('general.null') + return t('general.null').toUpperCase() } else if (isYearInvalid.value) { return t('msg.invalidTime') } else { From 8c2ef853f8d699930d09af0fa4f0487a5aa7e3b3 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:40 +0000 Subject: [PATCH 03/11] fix: lint error --- packages/nc-gui/components/cell/Url.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/components/cell/Url.vue b/packages/nc-gui/components/cell/Url.vue index f5f5f06a1d..8aa39bac32 100644 --- a/packages/nc-gui/components/cell/Url.vue +++ b/packages/nc-gui/components/cell/Url.vue @@ -108,7 +108,7 @@ watch( @mousedown.stop /> - {{$t('general.null')}} + {{ $t('general.null') }} Date: Thu, 4 Jan 2024 06:16:40 +0000 Subject: [PATCH 04/11] fix: single select expand/clear btn overflow & option alignment issue --- packages/nc-gui/components/cell/SingleSelect.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 708b59d4c0..8ba832c267 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -322,7 +322,8 @@ const onFocus = () => { :disabled="readOnly || !editAllowed" :show-search="!isMobileMode && isOpen && active" :show-arrow="hasEditRoles && !readOnly && active && (vModel === null || vModel === undefined)" - :dropdown-class-name="`nc-dropdown-single-select-cell ${isOpen && active ? 'active' : ''}`" + :dropdown-class-name="`nc-dropdown-single-select-cell !min-w-200px ${isOpen && active ? 'active' : ''}`" + :dropdown-match-select-width="true" @select="onSelect" @keydown="onKeydown($event)" @search="search" @@ -399,7 +400,12 @@ const onFocus = () => { } :deep(.ant-select-selector) { - @apply !px-0; + @apply !pl-0 !pr-4; +} + +:deep(.ant-select-selector .ant-select-selection-item) { + @apply flex items-center; + text-overflow: clip; } :deep(.ant-select-selection-search-input) { From a80ac5b0330e5263f4ba9b5f084250e5ca57f8c8 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:40 +0000 Subject: [PATCH 05/11] rebase fix --- packages/nc-gui/components/cell/User.vue | 40 +++++++++++++++++++----- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui/components/cell/User.vue b/packages/nc-gui/components/cell/User.vue index 982ec4b7b6..4025149940 100644 --- a/packages/nc-gui/components/cell/User.vue +++ b/packages/nc-gui/components/cell/User.vue @@ -280,7 +280,7 @@ const filterOption = (input: string, option: any) => { }" > @@ -310,7 +324,7 @@ const filterOption = (input: string, option: any) => { :open="isOpen && editAllowed" :disabled="readOnly || !editAllowed" :class="{ 'caret-transparent': !hasEditRoles }" - :dropdown-class-name="`nc-dropdown-user-select-cell ${isOpen ? 'active' : ''}`" + :dropdown-class-name="`nc-dropdown-user-select-cell !min-w-200px ${isOpen ? 'active' : ''}`" :filter-option="filterOption" @search="search" @keydown.stop @@ -326,7 +340,7 @@ const filterOption = (input: string, option: any) => { :class="`nc-select-option-${column.title}-${op.email}`" @click.stop > - + - - {{ op.display_name?.length ? op.display_name : op.email }} - + + + + {{ op.display_name?.length ? op.display_name : op.email }} + + From 387217374f91c310e5c6527e7a44fd720493c09f Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:40 +0000 Subject: [PATCH 06/11] fix: multiselect type fields playwright test fail issue --- .../pages/Dashboard/common/Cell/SelectOptionCell.ts | 6 ++++-- .../pages/Dashboard/common/Cell/UserOptionCell.ts | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index d8f6a2e6c7..74be504902 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -49,8 +49,10 @@ export class SelectOptionCellPageObject extends BasePage { await selectOption.click(); } - if (multiSelect) await this.get({ index, columnHeader }).click(); - + if (multiSelect) { + // Press `Escape` to close the dropdown + await this.rootPage.keyboard.press('Escape'); + } await this.rootPage .getByTestId(`select-option-${columnHeader}-${index}`) .getByText(option) diff --git a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts index 8b6398f5c6..8fe005492c 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts @@ -47,7 +47,10 @@ export class UserOptionCellPageObject extends BasePage { await selectOption.click(); } - if (multiSelect) await this.get({ index, columnHeader }).click(); + if (multiSelect) { + // Press `Escape` to close the dropdown + await this.rootPage.keyboard.press('Escape'); + } await this.rootPage .getByTestId(`select-option-${columnHeader}-${index}`) From 5b7d7302b536f51ff66bb17b1c73713f16206aef Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:41 +0000 Subject: [PATCH 07/11] fix: add new row playwright test case fail issue --- tests/playwright/pages/Dashboard/Grid/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index 019b0d7f87..0de41eb84b 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -124,7 +124,7 @@ export class GridPage extends BasePage { await this.get().locator('.nc-grid-add-new-cell').click(); // wait for insert row response - await this.rootPage.waitForTimeout(400); + await this.rootPage.waitForTimeout(1000); const rowCount = index + 1; await expect(this.get().locator('.nc-grid-row')).toHaveCount(rowCount); From dbec256cb06afe54da6f33d3fd7ed8c0304845c1 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:41 +0000 Subject: [PATCH 08/11] fix: groupBy hidden & select field playwright test case fail issue --- .../Dashboard/Grid/Column/UserOptionColumn.ts | 7 ++++++- tests/playwright/pages/Dashboard/Grid/Group.ts | 1 + .../Dashboard/common/Cell/SelectOptionCell.ts | 17 +++++++++++------ .../Dashboard/common/Cell/UserOptionCell.ts | 11 +++++------ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/UserOptionColumn.ts b/tests/playwright/pages/Dashboard/Grid/Column/UserOptionColumn.ts index c58d661a85..a123823f3e 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/UserOptionColumn.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/UserOptionColumn.ts @@ -51,6 +51,8 @@ export class UserOptionColumnPageObject extends BasePage { const selector = this.column.get().locator('.nc-user-select >> .ant-select-selector'); await selector.click(); + await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'visible' }); + if (multiSelect) { const optionsToSelect = Array.isArray(option) ? option : [option]; @@ -60,11 +62,12 @@ export class UserOptionColumnPageObject extends BasePage { // Press `Escape` to close the dropdown await this.rootPage.keyboard.press('Escape'); - await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'hidden' }); } else if (!Array.isArray(option)) { await this.selectOption({ option }); } + await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'hidden' }); + await this.column.save({ isUpdated: true }); } @@ -91,6 +94,8 @@ export class UserOptionColumnPageObject extends BasePage { await this.column.get().locator('.nc-cell-user > .nc-user-select').click(); + await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'visible' }); + expect(await this.rootPage.getByTestId(`select-option-${columnTitle}-undefined`).count()).toEqual(totalCount); await this.column.get().locator('.nc-cell-user').click(); diff --git a/tests/playwright/pages/Dashboard/Grid/Group.ts b/tests/playwright/pages/Dashboard/Grid/Group.ts index 8fe3e0c6ba..30caf5f942 100644 --- a/tests/playwright/pages/Dashboard/Grid/Group.ts +++ b/tests/playwright/pages/Dashboard/Grid/Group.ts @@ -74,6 +74,7 @@ export class GroupPageObject extends BasePage { value: string; }) { const gridWrapper = this.get({ indexMap }); + await gridWrapper.scrollIntoViewIfNeeded(); await gridWrapper .locator(`.nc-group-table .nc-grid-row:nth-child(${rowIndex + 1}) [data-title="${columnHeader}"]`) .scrollIntoViewIfNeeded(); diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index 74be504902..44d1ee7ba6 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -39,24 +39,29 @@ export class SelectOptionCellPageObject extends BasePage { await selectCell.click(); + if (multiSelect) { + await this.rootPage.locator('.nc-dropdown-multi-select-cell').waitFor({ state: 'visible' }); + } else { + await this.rootPage.locator('.nc-dropdown-single-select-cell').waitFor({ state: 'visible' }); + } + if (index === -1) { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } else { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } if (multiSelect) { // Press `Escape` to close the dropdown await this.rootPage.keyboard.press('Escape'); + await this.rootPage.locator('.nc-dropdown-multi-select-cell').waitFor({ state: 'hidden' }); + } else { + await this.rootPage.locator('.nc-dropdown-single-select-cell').waitFor({ state: 'hidden' }); } - await this.rootPage - .getByTestId(`select-option-${columnHeader}-${index}`) - .getByText(option) - .waitFor({ state: 'hidden' }); } async clear({ index, columnHeader, multiSelect }: { index: number; columnHeader: string; multiSelect?: boolean }) { diff --git a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts index 8fe005492c..56e84ab968 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts @@ -37,13 +37,15 @@ export class UserOptionCellPageObject extends BasePage { await selectCell.click(); + await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'visible' }); + if (index === -1) { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } else { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } @@ -52,10 +54,7 @@ export class UserOptionCellPageObject extends BasePage { await this.rootPage.keyboard.press('Escape'); } - await this.rootPage - .getByTestId(`select-option-${columnHeader}-${index}`) - .getByText(option) - .waitFor({ state: 'hidden' }); + await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'hidden' }); } async clear({ index, columnHeader, multiSelect }: { index: number; columnHeader: string; multiSelect?: boolean }) { From 76fe191ff8688b91812d898cdc17f96bff2a3ad4 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:41 +0000 Subject: [PATCH 09/11] fix: playwright AddNewRow waiting issue --- tests/playwright/pages/Dashboard/Grid/Group.ts | 8 ++++++++ tests/playwright/pages/Dashboard/Grid/index.ts | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Group.ts b/tests/playwright/pages/Dashboard/Grid/Group.ts index 30caf5f942..fba9a740e0 100644 --- a/tests/playwright/pages/Dashboard/Grid/Group.ts +++ b/tests/playwright/pages/Dashboard/Grid/Group.ts @@ -110,6 +110,14 @@ export class GroupPageObject extends BasePage { await this.get({ indexMap }).locator('.nc-grid-add-new-row').click(); const rowCount = index + 1; + + const isRowSaving = this.get({ indexMap }).getByTestId(`row-save-spinner-${rowCount}`); + // if required field is present then isRowSaving will be hidden (not present in DOM) + await isRowSaving?.waitFor({ state: 'hidden' }); + + // fallback + await this.rootPage.waitForTimeout(400); + await expect(this.get({ indexMap }).locator('.nc-grid-row')).toHaveCount(rowCount); await this._fillRow({ indexMap, index, columnHeader, value: rowValue }); diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index 0de41eb84b..35e00af4f2 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -123,10 +123,15 @@ export class GridPage extends BasePage { await this.get().locator('.nc-grid-add-new-cell').click(); - // wait for insert row response - await this.rootPage.waitForTimeout(1000); - const rowCount = index + 1; + + const isRowSaving = this.rootPage.getByTestId(`row-save-spinner-${rowCount}`); + // if required field is present then isRowSaving will be hidden (not present in DOM) + await isRowSaving?.waitFor({ state: 'hidden' }); + + // fallback + await this.rootPage.waitForTimeout(400); + await expect(this.get().locator('.nc-grid-row')).toHaveCount(rowCount); await this._fillRow({ index, columnHeader, value: rowValue }); From c12d868a4303184627816c77545bf8d7dc7fe444 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:41 +0000 Subject: [PATCH 10/11] fix: playwright test case fail issue --- .../pages/Dashboard/common/Cell/SelectOptionCell.ts | 4 ++-- .../playwright/pages/Dashboard/common/Cell/UserOptionCell.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index 44d1ee7ba6..a0ba68158b 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -47,11 +47,11 @@ export class SelectOptionCellPageObject extends BasePage { if (index === -1) { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); - await selectOption.scrollIntoViewIfNeeded(); + await selectOption.waitFor({ state: 'visible' }); await selectOption.click(); } else { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); - await selectOption.scrollIntoViewIfNeeded(); + await selectOption.waitFor({ state: 'visible' }); await selectOption.click(); } diff --git a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts index 56e84ab968..d24ba322cd 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts @@ -41,11 +41,11 @@ export class UserOptionCellPageObject extends BasePage { if (index === -1) { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); - await selectOption.scrollIntoViewIfNeeded(); + await selectOption.waitFor({ state: 'visible' }); await selectOption.click(); } else { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); - await selectOption.scrollIntoViewIfNeeded(); + await selectOption.waitFor({ state: 'visible' }); await selectOption.click(); } From e0a1d227ee4c13ecc210c128ac8a7767457a05be Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 4 Jan 2024 06:16:41 +0000 Subject: [PATCH 11/11] fix: playwright form view select field dblClick issue --- .../pages/Dashboard/common/Cell/SelectOptionCell.ts | 4 ++-- .../playwright/pages/Dashboard/common/Cell/UserOptionCell.ts | 4 ++-- tests/playwright/tests/db/views/viewForm.spec.ts | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index a0ba68158b..44d1ee7ba6 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -47,11 +47,11 @@ export class SelectOptionCellPageObject extends BasePage { if (index === -1) { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } else { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } diff --git a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts index d24ba322cd..56e84ab968 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts @@ -41,11 +41,11 @@ export class UserOptionCellPageObject extends BasePage { if (index === -1) { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } else { const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); - await selectOption.waitFor({ state: 'visible' }); + await selectOption.scrollIntoViewIfNeeded(); await selectOption.click(); } diff --git a/tests/playwright/tests/db/views/viewForm.spec.ts b/tests/playwright/tests/db/views/viewForm.spec.ts index 747613db70..82fc2db602 100644 --- a/tests/playwright/tests/db/views/viewForm.spec.ts +++ b/tests/playwright/tests/db/views/viewForm.spec.ts @@ -478,6 +478,7 @@ test.describe('Form view', () => { columnHeader: 'SingleSelect', option: 'jan', multiSelect: false, + ignoreDblClick: true, }); // Click on multi select options