Browse Source

test: fix fields operation

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3848/head
Raju Udava 2 years ago committed by Muhammed Mustafa
parent
commit
00bec30fc8
  1. 14
      scripts/playwright/tests/toolbarOperations.spec.ts

14
scripts/playwright/tests/toolbarOperations.spec.ts

@ -2,7 +2,7 @@ import { test } from "@playwright/test";
import { DashboardPage } from "../pages/Dashboard"; import { DashboardPage } from "../pages/Dashboard";
import setup from "../setup"; import setup from "../setup";
test.describe("Toolbar operations (GRID)", () => { test.describe.only("Toolbar operations (GRID)", () => {
let dashboard: DashboardPage; let dashboard: DashboardPage;
let context: any; let context: any;
@ -28,33 +28,38 @@ test.describe("Toolbar operations (GRID)", () => {
await dashboard.grid.column.verify({ await dashboard.grid.column.verify({
title: "LastUpdate", title: "LastUpdate",
isVisible: false, isVisible: true,
}); });
// hide column // hide column
console.log("hide column");
await toolbar.fields.toggle({ title: "LastUpdate" }); await toolbar.fields.toggle({ title: "LastUpdate" });
await dashboard.grid.column.verify({ await dashboard.grid.column.verify({
title: "LastUpdate", title: "LastUpdate",
isVisible: true, isVisible: false,
}); });
// un-hide column // un-hide column
console.log("un-hide column");
await toolbar.fields.toggle({ title: "LastUpdate" }); await toolbar.fields.toggle({ title: "LastUpdate" });
await dashboard.grid.column.verify({ await dashboard.grid.column.verify({
title: "LastUpdate", title: "LastUpdate",
isVisible: false, isVisible: true,
}); });
await validateFirstRow("Afghanistan"); await validateFirstRow("Afghanistan");
// Sort column // Sort column
console.log("sort column");
await toolbar.sort.addSort({ columnTitle: "Country", isAscending: false }); await toolbar.sort.addSort({ columnTitle: "Country", isAscending: false });
await validateFirstRow("Zambia"); await validateFirstRow("Zambia");
// reset sort // reset sort
console.log("reset sort");
await toolbar.sort.resetSort(); await toolbar.sort.resetSort();
await validateFirstRow("Afghanistan"); await validateFirstRow("Afghanistan");
// Filter column // Filter column
console.log("filter column");
await toolbar.filter.addNew({ await toolbar.filter.addNew({
columnTitle: "Country", columnTitle: "Country",
value: "India", value: "India",
@ -63,6 +68,7 @@ test.describe("Toolbar operations (GRID)", () => {
await validateFirstRow("India"); await validateFirstRow("India");
// Reset filter // Reset filter
console.log("reset filter");
await toolbar.filter.resetFilter(); await toolbar.filter.resetFilter();
await validateFirstRow("Afghanistan"); await validateFirstRow("Afghanistan");

Loading…
Cancel
Save