@sap_oss/wdio-qmate-service
Version:
[](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[](http
62 lines (51 loc) • 1.89 kB
JavaScript
;
const { BASE_URL } = require("../../../../src/reuse/constants.ts");
const {
handleCookiesConsent
} = require("../../../helper/utils");
describe("table - sortColumnDescending - smartTable", function () {
it("Preparation", async function () {
await browser.url(`${BASE_URL}/#/entity/sap.ui.comp.smarttable.SmartTable/sample/sap.ui.comp.sample.smarttable.mtable`);
await handleCookiesConsent();
await util.browser.switchToIframe("[id='sampleFrame']");
});
it("Execution", async function () {
await ui5.table.sortColumnDescending("Name");
});
it("Verification", async function () {
const selector = {
"elementProperties": {
"viewName": "sap.ui.comp.sample.smarttable.mtable.SmartTable",
"metadata": "sap.m.Column",
"tooltip": "Name"
}
};
await ui5.assertion.expectAttributeToBe(selector, "sortIndicator", "Descending");
});
});
describe("table - sortColumnDescending - smartTable with tableSelector", function () {
const tableSelector = {
"elementProperties": {
"metadata": "sap.ui.comp.smarttable.SmartTable"
}
};
it("Preparation", async function () {
await browser.url(`${BASE_URL}/#/entity/sap.ui.comp.smarttable.SmartTable/sample/sap.ui.comp.sample.smarttable.mtable`);
await handleCookiesConsent();
await util.browser.switchToIframe("[id='sampleFrame']");
});
it("Execution", async function () {
await ui5.table.sortColumnDescending("Name", tableSelector);
});
it("Verification", async function () {
const selector = {
"elementProperties": {
"viewName": "sap.ui.comp.sample.smarttable.mtable.SmartTable",
"metadata": "sap.m.Column",
"tooltip": "Name"
},
"ancestorProperties": tableSelector
};
await ui5.assertion.expectAttributeToBe(selector, "sortIndicator", "Descending");
});
});