Browse Source

fix : date column test id

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

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

@ -20,7 +20,7 @@ if (!vModel.value.meta?.date_format) {
<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 [...dateFormats, ...dateMonthFormats]" :key="i" :value="format">
<div class="flex gap-2 justify-between items-center" :data-testid="`nc-${format}`">
<div class="flex gap-2 justify-between items-center" :data-testid="`nc-date-select-${format}`">
{{ format }}
<component
:is="iconMap.check"

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

@ -115,7 +115,7 @@ export class ColumnPageObject extends BasePage {
case 'Date':
// Date Format
await this.get().locator('.nc-date-select').click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-${dateFormat}"]`).click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-date-select-${dateFormat}"]`).click();
break;
case 'Formula':
await this.get().locator('.nc-formula-input').fill(formula);
@ -309,7 +309,7 @@ export class ColumnPageObject extends BasePage {
case 'Date':
// Date Format
await this.get().locator('.nc-date-select').click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-${dateFormat}"]`).click();
await this.rootPage.locator('.ant-select-item').locator(`[data-testid="nc-date-select-${dateFormat}"]`).click();
break;
case 'DateTime':
// Date Format

Loading…
Cancel
Save