@sap_oss/wdio-qmate-service
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -58,2 +58,3 @@ /** | ||
private _clickColumn; | ||
private _getSortValudGridTable; | ||
private _getSortIndicatorValue; | ||
@@ -60,0 +61,0 @@ private _prepareAncestorSelector; |
@@ -132,14 +132,29 @@ "use strict"; | ||
}; | ||
const tableGridColumnSelector = { | ||
elementProperties: { | ||
metadata: "sap.ui.table.Column" | ||
}, | ||
descendantProperties: { | ||
text: name | ||
} | ||
}; | ||
if (!tableSelector) { | ||
await ui5.userInteraction.click(tableColumnSelector); | ||
await Promise.any([ui5.userInteraction.click(tableColumnSelector), | ||
ui5.userInteraction.click(tableGridColumnSelector)]); | ||
} | ||
if (typeof tableSelector == "number") { | ||
util.console.warn(`Usage of argument 'index' in function ${arguments.callee.caller.name} is deprecated. Please pass a valid table selector instead.`); | ||
await ui5.userInteraction.click(tableColumnSelector, tableSelector); | ||
await Promise.any([ui5.userInteraction.click(tableColumnSelector, tableSelector), | ||
ui5.userInteraction.click(tableGridColumnSelector, tableSelector)]); | ||
} | ||
else if (typeof tableSelector === "object") { | ||
const selector = this._prepareAncestorSelector(tableColumnSelector, tableSelector); | ||
await ui5.userInteraction.click(selector); | ||
await Promise.any([ui5.userInteraction.click(this._prepareAncestorSelector(tableColumnSelector, tableSelector)), | ||
ui5.userInteraction.click(this._prepareAncestorSelector(tableGridColumnSelector, tableSelector))]); | ||
} | ||
} | ||
async _getSortValudGridTable(selector, ancestor) { | ||
const sortOrder = await ui5.element.getPropertyValue(selector, "sortOrder", ancestor); | ||
const sorted = await ui5.element.getPropertyValue(selector, "sorted", ancestor); | ||
return sorted ? sortOrder : ""; | ||
} | ||
async _getSortIndicatorValue(name, tableSelector) { | ||
@@ -155,12 +170,23 @@ const vl = this.vlf.initLog(this._getSortIndicatorValue); | ||
}; | ||
const tableGridColumnSelector = { | ||
elementProperties: { | ||
metadata: "sap.ui.table.Column" | ||
}, | ||
descendantProperties: { | ||
text: name | ||
} | ||
}; | ||
if (!tableSelector) { | ||
return ui5.element.getPropertyValue(tableColumnSelector, "sortIndicator"); | ||
return Promise.any([ui5.element.getPropertyValue(tableColumnSelector, "sortIndicator"), | ||
this._getSortValudGridTable(tableGridColumnSelector)]); | ||
} | ||
if (typeof tableSelector == "number") { | ||
util.console.warn(`The usage of argument 'index' in function ${arguments.callee.caller.name} is deprecated. Please pass a valid table selector instead.`); | ||
return ui5.element.getPropertyValue(tableColumnSelector, "sortIndicator", tableSelector); | ||
return Promise.any([ui5.element.getPropertyValue(tableColumnSelector, "sortIndicator", tableSelector), | ||
this._getSortValudGridTable(tableGridColumnSelector, tableSelector)]); | ||
} | ||
else if (typeof tableSelector === "object") { | ||
const selector = this._prepareAncestorSelector(tableColumnSelector, tableSelector); | ||
return ui5.element.getPropertyValue(selector, "sortIndicator"); | ||
return Promise.any([ui5.element.getPropertyValue(this._prepareAncestorSelector(tableColumnSelector, tableSelector), "sortIndicator"), | ||
this._getSortValudGridTable(this._prepareAncestorSelector(tableGridColumnSelector, tableSelector))]); | ||
} | ||
@@ -167,0 +193,0 @@ } |
{ | ||
"name": "@sap_oss/wdio-qmate-service", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"author": "SAP SE", | ||
@@ -94,2 +94,3 @@ "types": "./@types/index.d.ts", | ||
"test:reuse:util:data": "npx wdio ./test/reuse/util/data/test.data.conf.js", | ||
"test:reuse:util:data:privacy": "npx wdio ./test/reuse/util/data/test.data.privacy.conf.js", | ||
"test:reuse:util:component": "npx wdio ./test/reuse/util/component/test.component.conf.js", | ||
@@ -96,0 +97,0 @@ "test:reuse:util:file": "npx wdio ./test/reuse/util/file/test.file.conf.js", |
@@ -20,4 +20,2 @@ const path = require("path"); | ||
path.resolve(__dirname, "getData.spec.js"), | ||
path.resolve(__dirname, "getSecureData.spec.js"), | ||
path.resolve(__dirname, "decrypt.spec.js"), | ||
path.resolve(__dirname, "readDataFromFile.spec.js"), | ||
@@ -24,0 +22,0 @@ path.resolve(__dirname, "writeDataToFile.spec.js") |
Sorry, the diff of this file is not supported yet
2547014
705
35941
412
21