|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
import { expect, test } from "@playwright/test"; |
|
|
|
|
import { DashboardPage } from "../pages/Dashboard"; |
|
|
|
|
import { GalleryPage } from "../pages/Dashboard/Gallery"; |
|
|
|
|
import { GridPage } from "../pages/Dashboard/Grid"; |
|
|
|
|
import setup from "../setup"; |
|
|
|
|
|
|
|
|
|
test.describe("Expanded form URL", () => { |
|
|
|
@ -11,18 +13,16 @@ test.describe("Expanded form URL", () => {
|
|
|
|
|
dashboard = new DashboardPage(page, context.project); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function viewTest(viewType: string) { |
|
|
|
|
test(viewType, async () => { |
|
|
|
|
async function viewTest(viewType: string) { |
|
|
|
|
// close 'Team & Auth' tab
|
|
|
|
|
await dashboard.closeTab({ title: "Team & Auth" }); |
|
|
|
|
await dashboard.treeView.openTable({ title: "Country" }); |
|
|
|
|
|
|
|
|
|
let viewObj; |
|
|
|
|
let viewObj: GridPage | GalleryPage = dashboard.grid; |
|
|
|
|
if (viewType === "grid") { |
|
|
|
|
viewObj = dashboard.grid; |
|
|
|
|
} else if (viewType === "gallery") { |
|
|
|
|
viewObj = dashboard.gallery; |
|
|
|
|
await viewObj.fields({ title: "City List" }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (viewType === "grid") { |
|
|
|
@ -31,6 +31,8 @@ test.describe("Expanded form URL", () => {
|
|
|
|
|
await dashboard.viewSidebar.createGalleryView({ |
|
|
|
|
title: "CountryExpand", |
|
|
|
|
}); |
|
|
|
|
await viewObj.toolbar.clickFields(); |
|
|
|
|
await viewObj.toolbar.fields.click({ title: "City List" }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// expand row & verify URL
|
|
|
|
@ -92,9 +94,13 @@ test.describe("Expanded form URL", () => {
|
|
|
|
|
url: "rowId=1", |
|
|
|
|
}); |
|
|
|
|
await dashboard.expandedForm.cancel(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
viewTest("grid"); |
|
|
|
|
// viewTest("gallery");
|
|
|
|
|
test("Grid", async () => { |
|
|
|
|
await viewTest("grid"); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test("Gallery", async () => { |
|
|
|
|
await viewTest("gallery"); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|