Browse Source

test: anomaly fix for handling multi select dropdown

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5233/head
Raju Udava 2 years ago
parent
commit
a54f0e5535
  1. 3
      packages/nc-gui/components/cell/MultiSelect.vue
  2. 1
      packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue
  3. 2
      tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts

3
packages/nc-gui/components/cell/MultiSelect.vue

@ -32,6 +32,7 @@ interface Props {
modelValue?: string | string[]
rowIndex?: number
disableOptionCreation?: boolean
location?: 'cell' | 'filter'
}
const { modelValue, disableOptionCreation } = defineProps<Props>()
@ -336,7 +337,7 @@ useEventListener(document, 'click', handleClose, true)
v-for="op of options"
:key="op.id || op.title"
:value="op.title"
:data-testid="`select-option-${column.title}-${rowIndex}`"
:data-testid="`select-option-${column.title}-${location === 'filter' ? 'filter' : rowIndex}`"
:class="`nc-select-option-${column.title}-${op.title}`"
@click.stop
>

1
packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue

@ -193,6 +193,7 @@ const hasExtraPadding = $computed(() => {
:column="column"
class="flex"
v-bind="componentProps"
location="filter"
/>
</div>
</template>

2
tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts

@ -123,7 +123,7 @@ export class ToolbarFilterPage extends BasePage {
for (let i = 0; i < v.length; i++) {
await this.rootPage
.locator(`.nc-dropdown-multi-select-cell`)
.locator(`.nc-select-option-MultiSelect-${v[i]}`)
.locator(`[data-testid="select-option-MultiSelect-filter"].nc-select-option-MultiSelect-${v[i]}`)
.click();
}
break;

Loading…
Cancel
Save