diff --git a/tests/playwright/pages/Dashboard/TreeView.ts b/tests/playwright/pages/Dashboard/TreeView.ts index 586f29ffe7..eb0372c756 100644 --- a/tests/playwright/pages/Dashboard/TreeView.ts +++ b/tests/playwright/pages/Dashboard/TreeView.ts @@ -36,7 +36,15 @@ export class TreeViewPage extends BasePage { // assumption: first view rendered is always GRID // - async openTable({ title, mode = 'standard' }: { title: string; mode?: string }) { + async openTable({ + title, + mode = 'standard', + networkResponse = true, + }: { + title: string; + mode?: string; + networkResponse?: boolean; + }) { if ((await this.get().locator('.active.nc-project-tree-tbl').count()) > 0) { if ((await this.get().locator('.active.nc-project-tree-tbl').innerText()) === title) { // table already open @@ -44,13 +52,18 @@ export class TreeViewPage extends BasePage { } } - await this.waitForResponse({ - uiAction: this.get().locator(`.nc-project-tree-tbl-${title}`).click(), - httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/db/data/noco/`, - responseJsonMatcher: json => json.pageInfo, - }); - await this.dashboard.waitForTabRender({ title, mode }); + if (networkResponse === true) { + await this.waitForResponse({ + uiAction: this.get().locator(`.nc-project-tree-tbl-${title}`).click(), + httpMethodsToMatch: ['GET'], + requestUrlPathToMatch: `/api/v1/db/data/noco/`, + responseJsonMatcher: json => json.pageInfo, + }); + await this.dashboard.waitForTabRender({ title, mode }); + } else { + await this.get().locator(`.nc-project-tree-tbl-${title}`).click(); + await this.rootPage.waitForTimeout(3000); + } } async createTable({ title, skipOpeningModal }: { title: string; skipOpeningModal?: boolean }) { diff --git a/tests/playwright/tests/filters.spec.ts b/tests/playwright/tests/filters.spec.ts index edd4728cbf..2043af77a3 100644 --- a/tests/playwright/tests/filters.spec.ts +++ b/tests/playwright/tests/filters.spec.ts @@ -69,7 +69,7 @@ async function verifyFilter(param: { return; } - await toolbar.clickFilter(); + await toolbar.clickFilter({ networkValidation: false }); await toolbar.filter.add({ columnTitle: param.column, opType: param.opType, @@ -77,7 +77,7 @@ async function verifyFilter(param: { isLocallySaved: false, dataType: param?.dataType, }); - await toolbar.clickFilter(); + await toolbar.clickFilter({ networkValidation: false }); // verify filtered rows await validateRowArray({ @@ -85,7 +85,7 @@ async function verifyFilter(param: { }); // Reset filter - await toolbar.filter.reset(); + await toolbar.filter.reset({ networkValidation: false }); } // Number based filters @@ -607,7 +607,7 @@ test.describe('Filter Tests: Select based', () => { test.describe('Filter Tests: AddOn', () => { async function addOnFilterTest(dataType) { await dashboard.closeTab({ title: 'Team & Auth' }); - await dashboard.treeView.openTable({ title: 'addOnTypes' }); + await dashboard.treeView.openTable({ title: 'addOnTypes', networkResponse: false }); // Enable NULL & EMPTY filters await dashboard.gotoSettings(); @@ -654,6 +654,11 @@ test.describe('Filter Tests: AddOn', () => { title: 'Id', uidt: UITypes.ID, }, + { + column_name: 'SingleLineText', + title: 'SingleLineText', + uidt: UITypes.SingleLineText, + }, { column_name: 'Checkbox', title: 'Checkbox', @@ -672,7 +677,8 @@ test.describe('Filter Tests: AddOn', () => { const rowAttributes = []; for (let i = 0; i < 400; i++) { const row = { - Checkbox: rowMixedValue(columns[1], i), + SingleLineText: rowMixedValue(columns[1], i), + Checkbox: rowMixedValue(columns[2], i), }; rowAttributes.push(row); } @@ -712,7 +718,7 @@ test.describe('Filter Tests: Toggle button', () => { test('Filter: Toggle NULL & EMPTY button', async () => { await dashboard.closeTab({ title: 'Team & Auth' }); - await dashboard.treeView.openTable({ title: 'Country' }); + await dashboard.treeView.openTable({ title: 'Country', networkResponse: false }); // Verify filter options await verifyFilterOperatorList({