mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 09:57:21 +00:00
* feat(nocodb): add support for limiting selection to specific views * test: fix failing tests * fix: failing playwright tests * feat: allow updating static view filter from both sides * fix: remove console logs * refactor: rename migration name * fix: corrections in ui and update api * fix: apply same behaviour for LTAR column(bt) * refactor: rename view id column in relation to avoid confusion * fix: option to disable view filter(switch) * refactor: some minor ui spacing corrections * fix: avoid setting target view id for bt relation when creating hm relation * feat: links - record selection based on custom filters * fix: corrections * feat: add edit support for conditions * feat: option to switch between dynamic and static value * fix: backend corrections * feat: apis for links filter * feat: filter api integration with ui * feat: filter with save and update * feat: dynamic filter * feat: shared form filter * feat: expanded form * fix: missing imports and corrections * fix: pass correct column list * fix: nested filter bug * fix: corrections in actions and swagger * fix: missing add button menu * fix: expanded form bug * test: playwright test - WIP * test: playwright - link with filters/view * chore: lint * refactor: ui corrections * fix: remove unnecessary filtering from hm/mm list and count * fix: filter ui correction * fix: lable correction * fix: skip view filter for rollup * fix: ui corrections * fix: extract correct column id * fix: duplicate LTAR - missing target view * feat: add duplicate support for link with filters/view * fix: height issue and nested filter creation bug * fix: pass metadata to nested filter component * fix: filter on column creation * fix: filter getting cloned under group * fix: exclude deleted filters when deciding locked state * fix: update state when switching to dynamic filter * fix: unlink view on delete and handle undefined values as null * fix: filter based on unsaved data * fix: handle overflow * fix: multi-field editor - filter UI correction * fix: duplicate link column with dynamic field ref * fix: remove virtual column support * fix: add support to link filter in normal list method * fix: apply filter on count query * fix: pass correct column list * feat: add link filter support in multifield column creation * feat: add link filter support in multifield column creation * Merge branch 'develop' into feat/links-view-filter * fix: dynamic value column export * fix: review comments * test: kludge for groupby tests * fix: extract updated status correctly * test: try waitFor for links * test: kludge * refactor: exclude attachment & rating from dynamic filter and treat float and integer as number * test: label correction * refactor: replace try...catch and use if condition * fix: apply conditions only if enabled * fix: MFE bugs * refactor: show radio button active border only when focused * fix: proper state handling * fix: view delete - unlink from link column * fix: duplicate Link with filter view id * refactor: column filter section padding * fix: exclude system columns * fix: dynamic column filter logic correction * refactor: cleanup * test: kludge with delay for groupby test * refactor: add missing placeholder method * docs: limit link record selection * refactor: add missing placeholder method * chore: lint --------- Co-authored-by: DarkPhoenix2704 <anbarasun123@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com>
62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
import { ColumnPageObject } from '.';
|
|
import BasePage from '../../../Base';
|
|
import { expect } from '@playwright/test';
|
|
import { LTARFilterPage } from './LTARFilterOption';
|
|
|
|
export class LTAROptionColumnPageObject extends BasePage {
|
|
readonly column: ColumnPageObject;
|
|
readonly filter: LTARFilterPage;
|
|
|
|
constructor(column: ColumnPageObject) {
|
|
super(column.rootPage);
|
|
this.column = column;
|
|
this.filter = new LTARFilterPage(this.rootPage);
|
|
}
|
|
|
|
get() {
|
|
return this.column.get();
|
|
}
|
|
|
|
// add multiple options at once after column creation is completed
|
|
//
|
|
async addFilters(filters: Parameters<typeof LTARFilterPage.prototype.add>[0][]) {
|
|
await this.get().getByTestId('nc-limit-record-filters').click();
|
|
|
|
for (let i = 0; i < filters.length; i++) {
|
|
await this.filter.add(filters[i]);
|
|
}
|
|
}
|
|
|
|
async editFilter({
|
|
columnTitle,
|
|
...filterUpdateParams
|
|
}: { columnTitle: string } & Parameters<typeof LTARFilterPage.prototype.edit>[0]) {
|
|
await this.column.openEdit({ title: columnTitle });
|
|
|
|
await this.filter.edit(filterUpdateParams);
|
|
await this.column.save({ isUpdated: true });
|
|
}
|
|
|
|
async deleteFilter({
|
|
columnTitle,
|
|
...filterDeleteParams
|
|
}: { index: number } & Parameters<typeof LTARFilterPage.prototype.delete>[0]) {
|
|
await this.column.openEdit({ title: columnTitle });
|
|
await this.filter.delete(filterDeleteParams);
|
|
|
|
await this.column.save({ isUpdated: true });
|
|
}
|
|
|
|
async selectView({ ltarView }: { ltarView: string }) {
|
|
await this.get().getByTestId('nc-limit-record-view').click();
|
|
|
|
await this.rootPage.locator(`.nc-ltar-child-view >> input[type="search"]`).fill(ltarView);
|
|
await this.rootPage
|
|
.locator(`.nc-dropdown-ltar-child-view >> .ant-select-item`, {
|
|
hasText: ltarView,
|
|
})
|
|
.nth(0)
|
|
.click();
|
|
}
|
|
}
|