Browse Source

test: sort & filter

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5332/head
Raju Udava 2 years ago committed by mertmit
parent
commit
99f63f968e
  1. 36
      tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts
  2. 23
      tests/playwright/pages/Dashboard/common/Toolbar/Sort.ts
  3. 18
      tests/playwright/tests/columnCheckbox.spec.ts
  4. 18
      tests/playwright/tests/columnMultiSelect.spec.ts
  5. 18
      tests/playwright/tests/columnRating.spec.ts
  6. 18
      tests/playwright/tests/columnSingleSelect.spec.ts
  7. 6
      tests/playwright/tests/expandedFormUrl.spec.ts
  8. 22
      tests/playwright/tests/filters.spec.ts
  9. 12
      tests/playwright/tests/metaSync.spec.ts
  10. 8
      tests/playwright/tests/toolbarOperations.spec.ts
  11. 65
      tests/playwright/tests/undo-redo.spec.ts
  12. 30
      tests/playwright/tests/viewGridShare.spec.ts
  13. 24
      tests/playwright/tests/viewKanban.spec.ts

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

@ -38,53 +38,53 @@ export class ToolbarFilterPage extends BasePage {
} }
async add({ async add({
columnTitle, title,
opType, operation,
opSubType, subOperation,
value, value,
isLocallySaved, locallySaved = false,
dataType, dataType,
openModal = false, openModal = false,
}: { }: {
columnTitle: string; title: string;
opType: string; operation: string;
opSubType?: string; // for date datatype subOperation?: string; // for date datatype
value?: string; value?: string;
isLocallySaved: boolean; locallySaved?: boolean;
dataType?: string; dataType?: string;
openModal?: boolean; openModal?: boolean;
}) { }) {
if (!openModal) await this.get().locator(`button:has-text("Add Filter")`).first().click(); if (!openModal) await this.get().locator(`button:has-text("Add Filter")`).first().click();
const selectedField = await this.rootPage.locator('.nc-filter-field-select').textContent(); const selectedField = await this.rootPage.locator('.nc-filter-field-select').textContent();
if (selectedField !== columnTitle) { if (selectedField !== title) {
await this.rootPage.locator('.nc-filter-field-select').last().click(); await this.rootPage.locator('.nc-filter-field-select').last().click();
await this.rootPage await this.rootPage
.locator('div.ant-select-dropdown.nc-dropdown-toolbar-field-list') .locator('div.ant-select-dropdown.nc-dropdown-toolbar-field-list')
.locator(`div[label="${columnTitle}"]:visible`) .locator(`div[label="${title}"]:visible`)
.click(); .click();
} }
const selectedOpType = await this.rootPage.locator('.nc-filter-operation-select').textContent(); const selectedOpType = await this.rootPage.locator('.nc-filter-operation-select').textContent();
if (selectedOpType !== opType) { if (selectedOpType !== operation) {
await this.rootPage.locator('.nc-filter-operation-select').click(); await this.rootPage.locator('.nc-filter-operation-select').click();
// first() : filter list has >, >= // first() : filter list has >, >=
await this.rootPage await this.rootPage
.locator('.nc-dropdown-filter-comp-op') .locator('.nc-dropdown-filter-comp-op')
.locator(`.ant-select-item:has-text("${opType}")`) .locator(`.ant-select-item:has-text("${operation}")`)
.first() .first()
.click(); .click();
} }
// subtype for date // subtype for date
if (dataType === UITypes.Date && opSubType) { if (dataType === UITypes.Date && subOperation) {
const selectedSubType = await this.rootPage.locator('.nc-filter-sub_operation-select').textContent(); const selectedSubType = await this.rootPage.locator('.nc-filter-sub_operation-select').textContent();
if (selectedSubType !== opSubType) { if (selectedSubType !== subOperation) {
await this.rootPage.locator('.nc-filter-sub_operation-select').click(); await this.rootPage.locator('.nc-filter-sub_operation-select').click();
// first() : filter list has >, >= // first() : filter list has >, >=
await this.rootPage await this.rootPage
.locator('.nc-dropdown-filter-comp-sub-op') .locator('.nc-dropdown-filter-comp-sub-op')
.locator(`.ant-select-item:has-text("${opSubType}")`) .locator(`.ant-select-item:has-text("${subOperation}")`)
.first() .first()
.click(); .click();
} }
@ -115,7 +115,7 @@ export class ToolbarFilterPage extends BasePage {
await this.rootPage.locator(`.ant-btn-primary:has-text("Ok")`).click(); await this.rootPage.locator(`.ant-btn-primary:has-text("Ok")`).click();
break; break;
case UITypes.Date: case UITypes.Date:
if (opSubType === 'exact date') { if (subOperation === 'exact date') {
await this.get().locator('.nc-filter-value-select').click(); await this.get().locator('.nc-filter-value-select').click();
await this.rootPage.locator(`.ant-picker-dropdown:visible`); await this.rootPage.locator(`.ant-picker-dropdown:visible`);
await this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click(); await this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click();
@ -124,7 +124,7 @@ export class ToolbarFilterPage extends BasePage {
await this.waitForResponse({ await this.waitForResponse({
uiAction: fillFilter, uiAction: fillFilter,
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: isLocallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`,
}); });
await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); await this.toolbar.parent.dashboard.waitForLoaderToDisappear();
await this.toolbar.parent.waitLoading(); await this.toolbar.parent.waitLoading();
@ -174,7 +174,7 @@ export class ToolbarFilterPage extends BasePage {
await this.waitForResponse({ await this.waitForResponse({
uiAction: fillFilter, uiAction: fillFilter,
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: isLocallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`,
}); });
await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); await this.toolbar.parent.dashboard.waitForLoaderToDisappear();
await this.toolbar.parent.waitLoading(); await this.toolbar.parent.waitLoading();

23
tests/playwright/pages/Dashboard/common/Toolbar/Sort.ts

@ -25,27 +25,19 @@ export class ToolbarSortPage extends BasePage {
).toHaveText(direction); ).toHaveText(direction);
} }
async add({ async add({ title, ascending, locallySaved }: { title: string; ascending: boolean; locallySaved: boolean }) {
columnTitle,
isAscending,
isLocallySaved,
}: {
columnTitle: string;
isAscending: boolean;
isLocallySaved: boolean;
}) {
// open sort menu // open sort menu
await this.toolbar.clickSort(); await this.toolbar.clickSort();
await this.get().locator(`button:has-text("Add Sort Option")`).click(); await this.get().locator(`button:has-text("Add Sort Option")`).click();
// read content of the dropdown // read content of the dropdown
const col = await this.rootPage.locator('.nc-sort-field-select').textContent(); const col = await this.rootPage.locator('.nc-sort-field-select').last().textContent();
if (col !== columnTitle) { if (col !== title) {
await this.rootPage.locator('.nc-sort-field-select').last().click(); await this.rootPage.locator('.nc-sort-field-select').last().click();
await this.rootPage await this.rootPage
.locator('div.ant-select-dropdown.nc-dropdown-toolbar-field-list') .locator('div.ant-select-dropdown.nc-dropdown-toolbar-field-list')
.locator(`div[label="${columnTitle}"]`) .locator(`div[label="${title}"]`)
.last() .last()
.click(); .click();
} }
@ -68,14 +60,15 @@ export class ToolbarSortPage extends BasePage {
const selectSortDirection = () => const selectSortDirection = () =>
this.rootPage this.rootPage
.locator('.nc-dropdown-sort-dir') .locator('.nc-dropdown-sort-dir')
.last()
.locator('.ant-select-item') .locator('.ant-select-item')
.nth(isAscending ? 0 : 1) .nth(ascending ? 0 : 1)
.click(); .click();
await this.waitForResponse({ await this.waitForResponse({
uiAction: selectSortDirection, uiAction: selectSortDirection,
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: isLocallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`,
}); });
await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); await this.toolbar.parent.dashboard.waitForLoaderToDisappear();
// close sort menu // close sort menu
@ -88,7 +81,7 @@ export class ToolbarSortPage extends BasePage {
// open sort menu // open sort menu
await this.toolbar.clickSort(); await this.toolbar.clickSort();
await this.get().locator('.nc-sort-item-remove-btn').click(); await this.get().locator('.nc-sort-item-remove-btn').last().click();
// close sort menu // close sort menu
await this.toolbar.clickSort(); await this.toolbar.clickSort();

18
tests/playwright/tests/columnCheckbox.spec.ts

@ -22,10 +22,10 @@ test.describe('Checkbox - cell, filter, sort', () => {
async function verifyFilter(param: { opType: string; value?: string; result: string[] }) { async function verifyFilter(param: { opType: string; value?: string; result: string[] }) {
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'checkbox', title: 'checkbox',
opType: param.opType, operation: param.opType,
value: param.value, value: param.value,
isLocallySaved: false, locallySaved: false,
dataType: 'Checkbox', dataType: 'Checkbox',
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
@ -94,18 +94,18 @@ test.describe('Checkbox - cell, filter, sort', () => {
// Sort column // Sort column
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'checkbox', title: 'checkbox',
isAscending: true, ascending: true,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['1b', '1d', '1e', '1a', '1c', '1f']); await validateRowArray(['1b', '1d', '1e', '1a', '1c', '1f']);
await toolbar.sort.reset(); await toolbar.sort.reset();
// sort descending & validate // sort descending & validate
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'checkbox', title: 'checkbox',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['1a', '1c', '1f', '1b', '1d', '1e']); await validateRowArray(['1a', '1c', '1f', '1b', '1d', '1e']);
await toolbar.sort.reset(); await toolbar.sort.reset();

18
tests/playwright/tests/columnMultiSelect.spec.ts

@ -241,10 +241,10 @@ test.describe('Multi select - filters', () => {
async function verifyFilter(param: { opType: string; value?: string; result: string[] }) { async function verifyFilter(param: { opType: string; value?: string; result: string[] }) {
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'MultiSelect', title: 'MultiSelect',
opType: param.opType, operation: param.opType,
value: param.value, value: param.value,
isLocallySaved: false, locallySaved: false,
dataType: 'MultiSelect', dataType: 'MultiSelect',
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
@ -267,18 +267,18 @@ test.describe('Multi select - filters', () => {
// Sort column // Sort column
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'MultiSelect', title: 'MultiSelect',
isAscending: true, ascending: true,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['1', '3', '4', '2', '5', '6']); await validateRowArray(['1', '3', '4', '2', '5', '6']);
await toolbar.sort.reset(); await toolbar.sort.reset();
// sort descending & validate // sort descending & validate
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'MultiSelect', title: 'MultiSelect',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['6', '5', '2', '4', '3', '1']); await validateRowArray(['6', '5', '2', '4', '3', '1']);
await toolbar.sort.reset(); await toolbar.sort.reset();

18
tests/playwright/tests/columnRating.spec.ts

@ -22,10 +22,10 @@ test.describe('Rating - cell, filter, sort', () => {
async function verifyFilter(param: { opType: string; value?: string; result: string[] }) { async function verifyFilter(param: { opType: string; value?: string; result: string[] }) {
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'rating', title: 'rating',
opType: param.opType, operation: param.opType,
value: param.value, value: param.value,
isLocallySaved: false, locallySaved: false,
dataType: 'Rating', dataType: 'Rating',
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
@ -88,18 +88,18 @@ test.describe('Rating - cell, filter, sort', () => {
// Sort column // Sort column
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'rating', title: 'rating',
isAscending: true, ascending: true,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['1b', '1d', '1e', '1f', '1c', '1a']); await validateRowArray(['1b', '1d', '1e', '1f', '1c', '1a']);
await toolbar.sort.reset(); await toolbar.sort.reset();
// sort descending & validate // sort descending & validate
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'rating', title: 'rating',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['1a', '1c', '1f', '1b', '1d', '1e']); await validateRowArray(['1a', '1c', '1f', '1b', '1d', '1e']);
await toolbar.sort.reset(); await toolbar.sort.reset();

18
tests/playwright/tests/columnSingleSelect.spec.ts

@ -150,10 +150,10 @@ test.describe('Single select - filter & sort', () => {
async function verifyFilter(param: { opType: string; value?: string; result: string[] }) { async function verifyFilter(param: { opType: string; value?: string; result: string[] }) {
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'SingleSelect', title: 'SingleSelect',
opType: param.opType, operation: param.opType,
value: param.value, value: param.value,
isLocallySaved: false, locallySaved: false,
dataType: 'SingleSelect', dataType: 'SingleSelect',
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
@ -171,18 +171,18 @@ test.describe('Single select - filter & sort', () => {
// Sort column // Sort column
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'SingleSelect', title: 'SingleSelect',
isAscending: true, ascending: true,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['1', '3', '4', '2']); await validateRowArray(['1', '3', '4', '2']);
await toolbar.sort.reset(); await toolbar.sort.reset();
// sort descending & validate // sort descending & validate
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'SingleSelect', title: 'SingleSelect',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
await validateRowArray(['2', '4', '3', '1']); await validateRowArray(['2', '4', '3', '1']);
await toolbar.sort.reset(); await toolbar.sort.reset();

6
tests/playwright/tests/expandedFormUrl.spec.ts

@ -151,10 +151,10 @@ test.describe('Expanded record duplicate & delete options', () => {
// create filter to narrow down the number of records // create filter to narrow down the number of records
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'FirstName', title: 'FirstName',
opType: 'is equal', operation: 'is equal',
value: 'NICK', value: 'NICK',
isLocallySaved: false, locallySaved: false,
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();

22
tests/playwright/tests/filters.spec.ts

@ -60,11 +60,11 @@ async function verifyFilter_withFixedModal(param: {
} }
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: param.column, title: param.column,
opType: param.opType, operation: param.opType,
opSubType: param.opSubType, subOperation: param.opSubType,
value: param.value, value: param.value,
isLocallySaved: false, locallySaved: false,
dataType: param?.dataType, dataType: param?.dataType,
openModal: true, openModal: true,
}); });
@ -90,11 +90,11 @@ async function verifyFilter(param: {
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: param.column, title: param.column,
opType: param.opType, operation: param.opType,
opSubType: param.opSubType, subOperation: param.opSubType,
value: param.value, value: param.value,
isLocallySaved: false, locallySaved: false,
dataType: param?.dataType, dataType: param?.dataType,
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
@ -1271,10 +1271,10 @@ test.describe('Filter Tests: Toggle button', () => {
await toolbar.clickFilter({ networkValidation: false }); await toolbar.clickFilter({ networkValidation: false });
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'Country', title: 'Country',
opType: 'is null', operation: 'is null',
value: null, value: null,
isLocallySaved: false, locallySaved: false,
dataType: 'SingleLineText', dataType: 'SingleLineText',
}); });
await toolbar.clickFilter({ networkValidation: false }); await toolbar.clickFilter({ networkValidation: false });

12
tests/playwright/tests/metaSync.spec.ts

@ -258,17 +258,17 @@ test.describe('Meta sync', () => {
await dashboard.grid.toolbar.clickFields(); await dashboard.grid.toolbar.clickFields();
await dashboard.grid.toolbar.sort.add({ await dashboard.grid.toolbar.sort.add({
columnTitle: 'Col2', title: 'Col2',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
await dashboard.grid.toolbar.clickFilter(); await dashboard.grid.toolbar.clickFilter();
await dashboard.grid.toolbar.filter.add({ await dashboard.grid.toolbar.filter.add({
columnTitle: 'Col2', title: 'Col2',
opType: '>=', operation: '>=',
value: '5', value: '5',
isLocallySaved: false, locallySaved: false,
}); });
await dashboard.grid.toolbar.clickFilter(); await dashboard.grid.toolbar.clickFilter();

8
tests/playwright/tests/toolbarOperations.spec.ts

@ -48,7 +48,7 @@ test.describe('Toolbar operations (GRID)', () => {
await validateFirstRow('Afghanistan'); await validateFirstRow('Afghanistan');
// Sort column // Sort column
await toolbar.sort.add({ columnTitle: 'Country', isAscending: false, isLocallySaved: false }); await toolbar.sort.add({ title: 'Country', ascending: false, locallySaved: false });
await validateFirstRow('Zambia'); await validateFirstRow('Zambia');
// reset sort // reset sort
@ -58,10 +58,10 @@ test.describe('Toolbar operations (GRID)', () => {
// Filter column // Filter column
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'Country', title: 'Country',
value: 'India', value: 'India',
opType: 'is equal', operation: 'is equal',
isLocallySaved: false, locallySaved: false,
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();

65
tests/playwright/tests/undo-redo.spec.ts

@ -215,6 +215,71 @@ test.describe('Undo Redo', () => {
await undo({ page }); await undo({ page });
await verifyFieldsOrder(['Number', 'Decimal', 'Currency']); await verifyFieldsOrder(['Number', 'Decimal', 'Currency']);
}); });
test('Fields: Sort', async ({ page }) => {
await dashboard.closeTab({ title: 'Team & Auth' });
await dashboard.treeView.openTable({ title: 'numberBased' });
async function verifyRecords({ sorted }: { sorted: boolean }) {
// inserted values
const expectedSorted = [NaN, 33, 33, 34, 44, 267, 333, 456, 3234, 8754];
const expectedUnsorted = [33, NaN, 456, 333, 267, 34, 8754, 3234, 44, 33];
const currentRecords: Record<string, any> = await api.dbTableRow.list('noco', context.project.id, table.id, {
fields: ['Number'],
limit: 100,
sort: sorted ? ['Number'] : [],
});
// verify if expectedValues are same as currentRecords
expect(currentRecords.list.map(r => parseInt(r.Number))).toEqual(sorted ? expectedSorted : expectedUnsorted);
}
await toolbar.sort.add({ title: 'Number', ascending: true, locallySaved: false });
await verifyRecords({ sorted: true });
await toolbar.sort.reset();
await verifyRecords({ sorted: false });
await undo({ page });
await verifyRecords({ sorted: true });
await undo({ page });
await verifyRecords({ sorted: false });
});
test('Fields: Filter', async ({ page }) => {
await dashboard.closeTab({ title: 'Team & Auth' });
await dashboard.treeView.openTable({ title: 'numberBased' });
async function verifyRecords({ filtered }: { filtered: boolean }) {
// inserted values
const expectedFiltered = [33, 33];
const expectedUnfiltered = [33, NaN, 456, 333, 267, 34, 8754, 3234, 44, 33];
const currentRecords: Record<string, any> = await api.dbTableRow.list('noco', context.project.id, table.id, {
fields: ['Number'],
limit: 100,
where: filtered ? '(Number,eq,33)' : '',
});
// verify if expectedValues are same as currentRecords
expect(currentRecords.list.map(r => parseInt(r.Number))).toEqual(
filtered ? expectedFiltered : expectedUnfiltered
);
}
await toolbar.clickFilter();
await toolbar.filter.add({ title: 'Number', operation: '=', value: '33' });
await toolbar.clickFilter();
await verifyRecords({ filtered: true });
await toolbar.filter.reset();
await verifyRecords({ filtered: false });
await undo({ page });
await verifyRecords({ filtered: true });
await undo({ page });
await verifyRecords({ filtered: false });
});
}); });
test.describe('Undo Redo - 2', () => { test.describe('Undo Redo - 2', () => {

30
tests/playwright/tests/viewGridShare.spec.ts

@ -34,17 +34,17 @@ test.describe('Shared view', () => {
await dashboard.grid.toolbar.fields.toggle({ title: 'Address2' }); await dashboard.grid.toolbar.fields.toggle({ title: 'Address2' });
// sort // sort
await dashboard.grid.toolbar.sort.add({ await dashboard.grid.toolbar.sort.add({
columnTitle: 'District', title: 'District',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
// filter // filter
await dashboard.grid.toolbar.clickFilter(); await dashboard.grid.toolbar.clickFilter();
await dashboard.grid.toolbar.filter.add({ await dashboard.grid.toolbar.filter.add({
columnTitle: 'Address', title: 'Address',
value: 'Ab', value: 'Ab',
opType: 'is like', operation: 'is like',
isLocallySaved: false, locallySaved: false,
}); });
await dashboard.grid.toolbar.clickFilter(); await dashboard.grid.toolbar.clickFilter();
@ -103,18 +103,18 @@ test.describe('Shared view', () => {
// create new sort & filter criteria in shared view // create new sort & filter criteria in shared view
await sharedPage.grid.toolbar.sort.reset(); await sharedPage.grid.toolbar.sort.reset();
await sharedPage.grid.toolbar.sort.add({ await sharedPage.grid.toolbar.sort.add({
columnTitle: 'Address', title: 'Address',
isAscending: true, ascending: true,
isLocallySaved: true, locallySaved: true,
}); });
if (isMysql(context)) { if (isMysql(context)) {
await sharedPage.grid.toolbar.clickFilter(); await sharedPage.grid.toolbar.clickFilter();
await sharedPage.grid.toolbar.filter.add({ await sharedPage.grid.toolbar.filter.add({
columnTitle: 'District', title: 'District',
value: 'Ta', value: 'Ta',
opType: 'is like', operation: 'is like',
isLocallySaved: true, locallySaved: true,
}); });
await sharedPage.grid.toolbar.clickFilter(); await sharedPage.grid.toolbar.clickFilter();
} }
@ -198,10 +198,10 @@ test.describe('Shared view', () => {
}); });
await sharedPage2.grid.toolbar.clickFilter(); await sharedPage2.grid.toolbar.clickFilter();
await sharedPage2.grid.toolbar.filter.add({ await sharedPage2.grid.toolbar.filter.add({
columnTitle: 'Country', title: 'Country',
value: 'New Country', value: 'New Country',
opType: 'is like', operation: 'is like',
isLocallySaved: true, locallySaved: true,
}); });
await sharedPage2.grid.toolbar.clickFilter(); await sharedPage2.grid.toolbar.clickFilter();

24
tests/playwright/tests/viewKanban.spec.ts

@ -119,9 +119,9 @@ test.describe('View', () => {
// verify sort // verify sort
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'Title', title: 'Title',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
// verify card order // verify card order
const order2 = [ const order2 = [
@ -150,10 +150,10 @@ test.describe('View', () => {
networkValidation: true, networkValidation: true,
}); });
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'Title', title: 'Title',
opType: 'is like', operation: 'is like',
value: 'BA', value: 'BA',
isLocallySaved: false, locallySaved: false,
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
@ -193,17 +193,17 @@ test.describe('View', () => {
}); });
await toolbar.sort.add({ await toolbar.sort.add({
columnTitle: 'Title', title: 'Title',
isAscending: false, ascending: false,
isLocallySaved: false, locallySaved: false,
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();
await toolbar.filter.add({ await toolbar.filter.add({
columnTitle: 'Title', title: 'Title',
opType: 'is like', operation: 'is like',
value: 'BA', value: 'BA',
isLocallySaved: false, locallySaved: false,
}); });
await toolbar.clickFilter(); await toolbar.clickFilter();

Loading…
Cancel
Save