UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

66 lines (54 loc) 2.33 kB
"use strict"; const { BASE_URL } = require("../../../../src/reuse/constants.ts"); const tableSelector = { elementProperties: { viewName: "mycompany.myapp.MyWorklistApp.view.Worklist", metadata: "sap.m.Table", id: "container-MyWorklistApp---worklist--table" } }; const checkBoxSelector = { elementProperties: { viewName: "mycompany.myapp.MyWorklistApp.view.Worklist", metadata: "sap.m.CheckBox", id: "*table-sa" } }; describe("table - selectAllRows - demo kit - passing selector", function () { it("Preparation", async function () { await common.navigation.navigateToUrl(`${BASE_URL}/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html?sap-ui-theme=sap_horizon_dark`); }); it("Execution", async function () { await ui5.table.selectAllRows(tableSelector); }); it("Verification", async function () { const isSelected = await ui5.element.getPropertyValue(checkBoxSelector, "selected"); await common.assertion.expectEqual(isSelected, true); }); }); describe("table - selectAllRows - demo kit - passing id", function () { it("Preparation", async function () { await common.navigation.navigateToUrl(`${BASE_URL}/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html?sap-ui-theme=sap_horizon_dark`); }); it("Execution", async function () { const tableSelectorId = tableSelector.elementProperties.id; await ui5.table.selectAllRows(tableSelectorId); }); it("Verification", async function () { const isSelected = await ui5.element.getPropertyValue(checkBoxSelector, "selected"); await common.assertion.expectEqual(isSelected, true); }); }); describe("table - selectAllRows - demo kit - select all checkbox already selected", function () { it("Preparation", async function () { await common.navigation.navigateToUrl(`${BASE_URL}/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html?sap-ui-theme=sap_horizon_dark`); await ui5.table.selectAllRows(tableSelector); }); it("Execution", async function () { await ui5.table.selectAllRows(tableSelector); }); it("Verification", async function () { const isSelected = await ui5.element.getPropertyValue(checkBoxSelector, "selected"); await common.assertion.expectEqual(isSelected, true); }); });