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

Loading…
Cancel
Save