Browse Source

fix : fixed date list

pull/7181/head
musharaf-nocodb 10 months ago
parent
commit
efd34f49c9
  1. 2
      packages/nc-gui/components/smartsheet/column/DateOptions.vue
  2. 18
      tests/playwright/pages/Dashboard/Grid/Column/index.ts

2
packages/nc-gui/components/smartsheet/column/DateOptions.vue

@ -19,7 +19,7 @@ if (!vModel.value.meta?.date_format) {
<template>
<a-form-item :label="$t('labels.dateFormat')">
<a-select v-model:value="vModel.meta.date_format" class="nc-date-select" dropdown-class-name="nc-dropdown-date-format">
<a-select-option v-for="(format, i) of [...dateMonthFormats, ...dateFormats]" :key="i" :value="format">
<a-select-option v-for="(format, i) of [ ...dateFormats,...dateMonthFormats,]" :key="i" :value="format">
<div class="flex gap-2 justify-between items-center" :data-testid="`nc-date-select-${format}`">
{{ format }}
<component

18
tests/playwright/pages/Dashboard/Grid/Column/index.ts

@ -112,11 +112,16 @@ export class ColumnPageObject extends BasePage {
await this.get().locator('.nc-time-select').click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-time-${timeFormat}"]`).click();
break;
case 'Date':
case 'Date': {
// Date Format
await this.get().locator('.nc-date-select').click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-date-select-${dateFormat}"]`).click();
const result = this.rootPage
.locator('.rc-virtual-list-holder-inner')
.locator(`[data-testid="nc-date-select-${dateFormat}"]`);
await result.scrollIntoViewIfNeeded();
await result.click();
break;
}
case 'Formula':
await this.get().locator('.nc-formula-input').fill(formula);
break;
@ -306,11 +311,16 @@ export class ColumnPageObject extends BasePage {
})
.click();
break;
case 'Date':
case 'Date': {
// Date Format
await this.get().locator('.nc-date-select').click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-date-select-${dateFormat}"]`).click();
const result = this.rootPage
.locator('.rc-virtual-list-holder-inner')
.locator(`[data-testid="nc-date-select-${dateFormat}"]`);
await result.scrollIntoViewIfNeeded();
await result.click();
break;
}
case 'DateTime':
// Date Format
await this.get().locator('.nc-date-select').click();

Loading…
Cancel
Save