|
|
@ -1,10 +1,9 @@ |
|
|
|
import { test } from '@playwright/test'; |
|
|
|
import { test } from "@playwright/test"; |
|
|
|
import { DashboardPage } from '../pages/Dashboard'; |
|
|
|
import { DashboardPage } from "../pages/Dashboard"; |
|
|
|
import { GridPage } from '../pages/Dashboard/Grid'; |
|
|
|
import { GridPage } from "../pages/Dashboard/Grid"; |
|
|
|
import setup from '../setup'; |
|
|
|
import setup from "../setup"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test.describe.only("Table Column Operations", () => { |
|
|
|
test.describe('Table Column Operations', () => { |
|
|
|
|
|
|
|
let grid: GridPage, dashboard: DashboardPage; |
|
|
|
let grid: GridPage, dashboard: DashboardPage; |
|
|
|
let context: any; |
|
|
|
let context: any; |
|
|
|
|
|
|
|
|
|
|
@ -14,9 +13,9 @@ test.describe('Table Column Operations', () => { |
|
|
|
grid = dashboard.grid; |
|
|
|
grid = dashboard.grid; |
|
|
|
|
|
|
|
|
|
|
|
await dashboard.treeView.createTable({ title: "sheet1" }); |
|
|
|
await dashboard.treeView.createTable({ title: "sheet1" }); |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Create column', async () => { |
|
|
|
test("Create column", async () => { |
|
|
|
await grid.column.create({ title: "column_name_a" }); |
|
|
|
await grid.column.create({ title: "column_name_a" }); |
|
|
|
await grid.column.verify({ title: "column_name_a" }); |
|
|
|
await grid.column.verify({ title: "column_name_a" }); |
|
|
|
|
|
|
|
|
|
|
@ -30,12 +29,19 @@ test.describe('Table Column Operations', () => { |
|
|
|
await grid.column.verify({ title: "column_name_b", isDeleted: true }); |
|
|
|
await grid.column.verify({ title: "column_name_b", isDeleted: true }); |
|
|
|
|
|
|
|
|
|
|
|
await grid.addNewRow({ index: 0 }); |
|
|
|
await grid.addNewRow({ index: 0 }); |
|
|
|
await grid.verifyRow({index: 0}) |
|
|
|
await grid.verifyRow({ index: 0 }); |
|
|
|
|
|
|
|
|
|
|
|
await grid.openExpandedRow({ index: 0 }); |
|
|
|
await grid.openExpandedRow({ index: 0 }); |
|
|
|
await dashboard.expandedForm.fillField({columnTitle: "Title", value: "value_a"}); |
|
|
|
await dashboard.expandedForm.fillField({ |
|
|
|
|
|
|
|
columnTitle: "Title", |
|
|
|
|
|
|
|
value: "value_a", |
|
|
|
|
|
|
|
}); |
|
|
|
await dashboard.expandedForm.save(); |
|
|
|
await dashboard.expandedForm.save(); |
|
|
|
await grid.cell.verify({index: 0, columnHeader: "Title", value: "value_a"}); |
|
|
|
await grid.cell.verify({ |
|
|
|
|
|
|
|
index: 0, |
|
|
|
|
|
|
|
columnHeader: "Title", |
|
|
|
|
|
|
|
value: "value_a", |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
await grid.deleteRow(0); |
|
|
|
await grid.deleteRow(0); |
|
|
|
await grid.verifyRowDoesNotExist({ index: 0 }); |
|
|
|
await grid.verifyRowDoesNotExist({ index: 0 }); |
|
|
@ -48,6 +54,18 @@ test.describe('Table Column Operations', () => { |
|
|
|
await grid.deleteAll(); |
|
|
|
await grid.deleteAll(); |
|
|
|
|
|
|
|
|
|
|
|
await grid.verifyRowDoesNotExist({ index: 0 }); |
|
|
|
await grid.verifyRowDoesNotExist({ index: 0 }); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// add new row using toolbar button
|
|
|
|
|
|
|
|
await grid.toolbar.clickAddNewRow(); |
|
|
|
|
|
|
|
await dashboard.expandedForm.fillField({ |
|
|
|
|
|
|
|
columnTitle: "Title", |
|
|
|
|
|
|
|
value: "value_a", |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
await dashboard.expandedForm.save(); |
|
|
|
|
|
|
|
await grid.cell.verify({ |
|
|
|
|
|
|
|
index: 0, |
|
|
|
|
|
|
|
columnHeader: "Title", |
|
|
|
|
|
|
|
value: "value_a", |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|