@sap_oss/wdio-qmate-service 2.19.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -1
- package/.eslintrc.yml +2 -2
- package/lib/reuse/helper/clientsideUI5scripts.js +0 -53
- package/lib/reuse/helper/clientsideUI5scripts.js.map +1 -1
- package/lib/reuse/helper/elementResolving.d.ts +1 -1
- package/lib/reuse/helper/elementResolving.js +3 -2
- package/lib/reuse/helper/elementResolving.js.map +1 -1
- package/lib/reuse/modules/constants.d.ts +2 -0
- package/lib/reuse/modules/constants.js +6 -0
- package/lib/reuse/modules/constants.js.map +1 -0
- package/lib/reuse/modules/mobile/element.js +9 -8
- package/lib/reuse/modules/mobile/element.js.map +1 -1
- package/lib/reuse/modules/mobile/userInteraction.js +8 -7
- package/lib/reuse/modules/mobile/userInteraction.js.map +1 -1
- package/lib/reuse/modules/nonUi5/assertion.js +5 -4
- package/lib/reuse/modules/nonUi5/assertion.js.map +1 -1
- package/lib/reuse/modules/nonUi5/element.js +20 -18
- package/lib/reuse/modules/nonUi5/element.js.map +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.d.ts +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.js +13 -12
- package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/ui5/assertion.js +20 -19
- package/lib/reuse/modules/ui5/assertion.js.map +1 -1
- package/lib/reuse/modules/ui5/confirmationDialog.js +9 -8
- package/lib/reuse/modules/ui5/confirmationDialog.js.map +1 -1
- package/lib/reuse/modules/ui5/control.js +2 -1
- package/lib/reuse/modules/ui5/control.js.map +1 -1
- package/lib/reuse/modules/ui5/element.js +14 -14
- package/lib/reuse/modules/ui5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/footerBar.js +10 -9
- package/lib/reuse/modules/ui5/footerBar.js.map +1 -1
- package/lib/reuse/modules/ui5/mockserver.d.ts +1 -2
- package/lib/reuse/modules/ui5/mockserver.js +2 -3
- package/lib/reuse/modules/ui5/mockserver.js.map +1 -1
- package/lib/reuse/modules/ui5/navigation.js +3 -2
- package/lib/reuse/modules/ui5/navigation.js.map +1 -1
- package/lib/reuse/modules/ui5/navigationBar.js +49 -34
- package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
- package/lib/reuse/modules/ui5/session.js +30 -33
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/table.d.ts +2 -2
- package/lib/reuse/modules/ui5/table.js +113 -26
- package/lib/reuse/modules/ui5/table.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.js +42 -28
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/util/file.js +2 -1
- package/lib/reuse/modules/util/file.js.map +1 -1
- package/lib/scripts/clientsideUI5scripts.js +36 -33
- package/lib/scripts/clientsideUI5scripts.js.map +1 -1
- package/lib/scripts/hooks/before.d.ts +1 -1
- package/lib/scripts/hooks/before.js +7 -0
- package/lib/scripts/hooks/before.js.map +1 -1
- package/lib/scripts/hooks/utils/Ui5ExtensionMocker.d.ts +5 -0
- package/lib/scripts/hooks/utils/Ui5ExtensionMocker.js +42 -0
- package/lib/scripts/hooks/utils/Ui5ExtensionMocker.js.map +1 -0
- package/lib/scripts/hooks/utils/lib.d.ts +1 -0
- package/lib/scripts/hooks/utils/lib.js +13 -18
- package/lib/scripts/hooks/utils/lib.js.map +1 -1
- package/lib/scripts/hooks/utils/locatorCommands.js +5 -12
- package/lib/scripts/hooks/utils/locatorCommands.js.map +1 -1
- package/lib/scripts/locators/qmateLocator.d.ts +1 -1
- package/lib/scripts/locators/qmateLocator.js +686 -1310
- package/lib/scripts/locators/qmateLocator.js.map +1 -1
- package/lib/scripts/locators/qmateLocatorSrc/Locator.d.ts +6 -0
- package/lib/scripts/locators/qmateLocatorSrc/Locator.js +49 -0
- package/lib/scripts/locators/qmateLocatorSrc/Locator.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/Comparator.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/Comparator.js +18 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/Comparator.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.d.ts +5 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.js +28 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/ElementPropertiesComparator.d.ts +10 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/ElementPropertiesComparator.js +79 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/ElementPropertiesComparator.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/MetadataComparator.d.ts +3 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/MetadataComparator.js +13 -0
- package/lib/scripts/locators/qmateLocatorSrc/comparators/MetadataComparator.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/AncestorFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/AncestorFilter.js +15 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/AncestorFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/BaseFilter.d.ts +12 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/BaseFilter.js +52 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/BaseFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ChildFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ChildFilter.js +19 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ChildFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/DescendantFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/DescendantFilter.js +21 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/DescendantFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.d.ts +7 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.js +51 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/NextSiblingFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/NextSiblingFilter.js +17 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/NextSiblingFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ParentFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ParentFilter.js +18 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ParentFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/PrevSiblingFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/PrevSiblingFilter.js +17 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/PrevSiblingFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/PropertiesFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/PropertiesFilter.js +17 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/PropertiesFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/SiblingFilter.d.ts +4 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/SiblingFilter.js +15 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/SiblingFilter.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/index.d.ts +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/index.js +8 -0
- package/lib/scripts/locators/qmateLocatorSrc/index.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/ControlFinder.d.ts +6 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/ControlFinder.js +36 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/ControlFinder.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/FilterFactory.d.ts +5 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/FilterFactory.js +20 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/FilterFactory.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/LocatorDebug.d.ts +11 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/LocatorDebug.js +84 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/LocatorDebug.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlDataInjector.d.ts +7 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlDataInjector.js +63 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlDataInjector.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.d.ts +15 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.js +187 -0
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.js.map +1 -0
- package/package.json +6 -4
- package/test/core/testIntegration/filters1.spec.js +27 -26
- package/test/helper/utils.js +30 -11
- package/test/reuse/ui5/session/logout.spec.js +1 -1
- package/test/reuse/ui5/table/sortColumnDescending.spec.js +0 -26
- package/test/reuse/ui5/userInteraction/searchFor.spec.js +56 -42
- package/tsconfig.json +2 -2
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UI5ControlHandler = void 0;
|
|
4
|
+
const ControlFinder_1 = require("../utils/ControlFinder");
|
|
5
|
+
const LocatorDebug_1 = require("../utils/LocatorDebug");
|
|
6
|
+
class UI5ControlHandler {
|
|
7
|
+
static retrieveValidUI5ControlsSubElements(nodes) {
|
|
8
|
+
if (!nodes || nodes.length === 0) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
const aCandidateControls = [];
|
|
12
|
+
Array.prototype.forEach.call(nodes, (node) => {
|
|
13
|
+
const nodeId = node.getAttribute("id");
|
|
14
|
+
const control = ControlFinder_1.ControlFinder.getUI5Control(nodeId);
|
|
15
|
+
if (control) {
|
|
16
|
+
aCandidateControls.push(control);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
aCandidateControls.push(...UI5ControlHandler.retrieveValidUI5ControlsSubElements(node.children));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return aCandidateControls;
|
|
23
|
+
}
|
|
24
|
+
static extractBindingPathAndModelProperty(pathObj) {
|
|
25
|
+
const binding = {
|
|
26
|
+
model: "",
|
|
27
|
+
path: ""
|
|
28
|
+
};
|
|
29
|
+
if (!pathObj?.path)
|
|
30
|
+
return binding;
|
|
31
|
+
binding.path = pathObj.path;
|
|
32
|
+
if (pathObj.path.indexOf(">") !== -1) {
|
|
33
|
+
binding.model = pathObj.path.substring(0, pathObj.path.indexOf(">"));
|
|
34
|
+
binding.path = pathObj.path.substring(pathObj.path.indexOf(">") + 1, pathObj.path.length);
|
|
35
|
+
}
|
|
36
|
+
return binding;
|
|
37
|
+
}
|
|
38
|
+
static findSiblingControls(control) {
|
|
39
|
+
const parentControl = UI5ControlHandler.getUI5Parent(control);
|
|
40
|
+
const parentId = parentControl?.getId?.();
|
|
41
|
+
const controlId = control?.getId?.();
|
|
42
|
+
if (!parentControl || !parentId || !controlId) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
const parentElement = document.getElementById(parentId);
|
|
46
|
+
if (!parentElement) {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
const allSiblingNodes = parentElement.children;
|
|
50
|
+
const aValidControls = UI5ControlHandler.retrieveValidUI5ControlsSubElements(allSiblingNodes);
|
|
51
|
+
if (!aValidControls || aValidControls.length === 0)
|
|
52
|
+
return [];
|
|
53
|
+
const controlIndx = aValidControls.findIndex((element) => element.getId() === controlId);
|
|
54
|
+
if (controlIndx === -1) {
|
|
55
|
+
throw new Error("Something is very wrong with prev/next control finder");
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
aValidControls.splice(controlIndx, 1);
|
|
59
|
+
return aValidControls;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
static findPreviousOrNextControl(control, bIsNext) {
|
|
63
|
+
const oParentControl = UI5ControlHandler.getUI5Parent(control);
|
|
64
|
+
const sControlId = control?.getId?.();
|
|
65
|
+
const sParentId = oParentControl?.getId?.();
|
|
66
|
+
if (!oParentControl || !sParentId || !sControlId)
|
|
67
|
+
return null;
|
|
68
|
+
const parentElement = document.getElementById(sParentId);
|
|
69
|
+
if (!parentElement)
|
|
70
|
+
return null;
|
|
71
|
+
const aAllSiblingNodes = parentElement.children;
|
|
72
|
+
const aValidControls = UI5ControlHandler.retrieveValidUI5ControlsSubElements(aAllSiblingNodes);
|
|
73
|
+
const controlIndx = aValidControls.findIndex((element) => element.getId() === sControlId);
|
|
74
|
+
if (controlIndx === -1) {
|
|
75
|
+
console.error("Something is very wrong with prev/next control finder");
|
|
76
|
+
}
|
|
77
|
+
if (bIsNext && aValidControls.length - 1 > controlIndx) {
|
|
78
|
+
return aValidControls[controlIndx + 1];
|
|
79
|
+
}
|
|
80
|
+
else if (!bIsNext && controlIndx > 0) {
|
|
81
|
+
return aValidControls[controlIndx - 1];
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
static getControlBindingContextPaths(control) {
|
|
86
|
+
if (!control)
|
|
87
|
+
return [];
|
|
88
|
+
// Merge all possible binding context sources
|
|
89
|
+
const bindingContexts = Object.assign({}, control.oPropagatedProperties?.oBindingContexts, control.oBindingContexts, control.mElementBindingContexts);
|
|
90
|
+
return Object.values(bindingContexts)
|
|
91
|
+
.filter((value) => !!value && value.getPath && typeof value.getPath === "function")
|
|
92
|
+
.map((ctx) => ctx.getPath())
|
|
93
|
+
.filter((path) => path);
|
|
94
|
+
}
|
|
95
|
+
// first navigate up the DOM tree to find the UI5 parent element
|
|
96
|
+
// if none is found try with the ui5 getParent method
|
|
97
|
+
// if none is found return undefined
|
|
98
|
+
static getUI5Parent(control) {
|
|
99
|
+
let domParent = document.getElementById(control.getId?.())?.parentElement;
|
|
100
|
+
while (true) {
|
|
101
|
+
if (!domParent)
|
|
102
|
+
return control.getParent?.();
|
|
103
|
+
const oParentControl = ControlFinder_1.ControlFinder.getUI5Control(domParent.getAttribute("id"));
|
|
104
|
+
if (oParentControl) {
|
|
105
|
+
return oParentControl;
|
|
106
|
+
}
|
|
107
|
+
domParent = domParent.parentElement;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
static getControlProperty(control, propKey) {
|
|
111
|
+
if (!control || !propKey)
|
|
112
|
+
return undefined;
|
|
113
|
+
const metadata = control.getMetadata?.();
|
|
114
|
+
const property = metadata?.getProperty?.(propKey);
|
|
115
|
+
const aggregation = metadata?.getAggregation?.(propKey);
|
|
116
|
+
const association = metadata?.getAssociation?.(propKey);
|
|
117
|
+
return (property ?? aggregation ?? association)?.get?.(control);
|
|
118
|
+
}
|
|
119
|
+
static getControlAllProperties(control) {
|
|
120
|
+
return {
|
|
121
|
+
...control?.getMetadata?.()?.getAllProperties?.(),
|
|
122
|
+
...control?.getMetadata?.()?.getAllAssociations?.(),
|
|
123
|
+
...control?.getMetadata?.()?.getAllAggregations?.()
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
static getBindDataForProperty(control, propKey) {
|
|
127
|
+
const aProperties = UI5ControlHandler.getControlAllProperties(control);
|
|
128
|
+
if (aProperties.hasOwnProperty(propKey)) {
|
|
129
|
+
return UI5ControlHandler.getBindingInfos(control, propKey);
|
|
130
|
+
}
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
static createBindingInfo(part) {
|
|
134
|
+
return {
|
|
135
|
+
model: part.model || "",
|
|
136
|
+
path: part.path || "",
|
|
137
|
+
value: ""
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
static getBindingInfos(control, propKey) {
|
|
141
|
+
const bindingInfo = control.getBindingInfo?.(propKey);
|
|
142
|
+
if (!bindingInfo)
|
|
143
|
+
return [];
|
|
144
|
+
const parts = (bindingInfo.parts ?? []);
|
|
145
|
+
const infos = [];
|
|
146
|
+
infos.push(...parts.filter((part) => part.path).map(UI5ControlHandler.createBindingInfo));
|
|
147
|
+
if (infos.length === 0 && bindingInfo.path) {
|
|
148
|
+
infos.push(UI5ControlHandler.createBindingInfo(bindingInfo));
|
|
149
|
+
}
|
|
150
|
+
const binding = control.getBinding?.(propKey);
|
|
151
|
+
if (binding && infos.length > 0) {
|
|
152
|
+
UI5ControlHandler.retrieveCompositeBindings(binding, infos);
|
|
153
|
+
}
|
|
154
|
+
return infos;
|
|
155
|
+
}
|
|
156
|
+
static retrieveCompositeBindings(binding, bindingInfos) {
|
|
157
|
+
if (binding.getBindings) {
|
|
158
|
+
const subBindings = binding.getBindings() ?? [];
|
|
159
|
+
subBindings.forEach((subBinding) => UI5ControlHandler.retrieveCompositeBindings(subBinding, bindingInfos));
|
|
160
|
+
}
|
|
161
|
+
else if (binding.getPath && binding.getValue) {
|
|
162
|
+
const info = bindingInfos.find((bi) => bi.path === binding.getPath());
|
|
163
|
+
if (info) {
|
|
164
|
+
info.value = binding.getValue();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
static getUI5Ancestors(control) {
|
|
169
|
+
const MAXIMUM_DEPTH = 500;
|
|
170
|
+
const ancestors = [];
|
|
171
|
+
let parentControl = UI5ControlHandler.getUI5Parent(control);
|
|
172
|
+
const visited = new Set();
|
|
173
|
+
visited.add(control);
|
|
174
|
+
while (parentControl && !visited.has(parentControl) && ancestors.length < MAXIMUM_DEPTH) {
|
|
175
|
+
ancestors.push(parentControl);
|
|
176
|
+
visited.add(parentControl);
|
|
177
|
+
parentControl = UI5ControlHandler.getUI5Parent(parentControl);
|
|
178
|
+
}
|
|
179
|
+
if (ancestors.length >= MAXIMUM_DEPTH) {
|
|
180
|
+
LocatorDebug_1.LocatorDebug.debugLog("Maximum depth reached while retrieving ancestors for control", control.getId?.());
|
|
181
|
+
}
|
|
182
|
+
LocatorDebug_1.LocatorDebug.debugLog("found ancestors:" + ancestors.length);
|
|
183
|
+
return ancestors;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
exports.UI5ControlHandler = UI5ControlHandler;
|
|
187
|
+
//# sourceMappingURL=UI5ControlHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UI5ControlHandler.js","sourceRoot":"","sources":["../../../../../src/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.ts"],"names":[],"mappings":";;;AAAA,0DAAuD;AACvD,wDAAqD;AAErD,MAAa,iBAAiB;IACrB,MAAM,CAAC,mCAAmC,CAAC,KAAqB;QACrE,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,kBAAkB,GAAU,EAAE,CAAC;QACrC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;YAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,6BAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACN,kBAAkB,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,mCAAmC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnG,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,kCAA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,QAAQ,CAAC,8DAA8D,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC3G,CAAC;QACD,2BAAY,CAAC,QAAQ,CAAC,kBAAkB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;QAE7D,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA9LD,8CA8LC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap_oss/wdio-qmate-service",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"author": "SAP SE",
|
|
5
5
|
"types": "./@types/index.d.ts",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
"generate-types": "ts-node ./src/bin/typesGenerator",
|
|
35
35
|
"serve-docs": "npm run generate-docs && mkdocs serve",
|
|
36
36
|
"deploy-docs": "npm run generate-docs && mkdocs gh-deploy --force",
|
|
37
|
-
"build": "npx tsc",
|
|
38
|
-
"build:dev": "npx tsc --watch",
|
|
37
|
+
"build": "npm run build:locator && npx tsc",
|
|
38
|
+
"build:dev": "npm run build:locator && npx tsc --watch",
|
|
39
|
+
"build:locator": "node src/scripts/locators/qmateLocatorSrc/build.js",
|
|
39
40
|
"test:authenticator:staticLogin:custom": "npx wdio ./test/authenticator/staticLogin/configCustom.js",
|
|
40
41
|
"test:authenticator:staticLogin:customViaConfig": "npx wdio ./test/authenticator/staticLogin/configCustomViaConfig.js",
|
|
41
42
|
"test:authenticator:staticLogin:fiori": "npx wdio ./test/authenticator/staticLogin/configFiori.js",
|
|
@@ -168,7 +169,8 @@
|
|
|
168
169
|
"chromedriver": "^120.0.2",
|
|
169
170
|
"concurrently": "^7.6.0",
|
|
170
171
|
"doctrine": "^3.0.0",
|
|
171
|
-
"
|
|
172
|
+
"esbuild": "0.25.4",
|
|
173
|
+
"eslint": "^8.57.0",
|
|
172
174
|
"eslint-plugin-wdio": "^6.6.0",
|
|
173
175
|
"glob": "^8.1.0",
|
|
174
176
|
"glob-promise": "^5.0.1",
|
|
@@ -199,31 +199,32 @@ describe("filters1", function () {
|
|
|
199
199
|
.rejects.toThrow(/No visible elements found with selector/);
|
|
200
200
|
});
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
202
|
+
// can not work there is no ScrollContainer on the whole page
|
|
203
|
+
// it("Step 09: check Page has descendant text - use deep selector structure in elementProperties", async function () {
|
|
204
|
+
// var ui5ControlProperties = {
|
|
205
|
+
// "elementProperties": {
|
|
206
|
+
// "metadata": "sap.m.Page", "mProperties": {
|
|
207
|
+
// "id": "container-cart---welcomeView--page"
|
|
208
|
+
// },
|
|
209
|
+
// "descendantProperties": {
|
|
210
|
+
// "metadata": "sap.m.Text", "mProperties": {
|
|
211
|
+
// "text": [{ "path": "i18n>welcomeCarouselShipping" }],
|
|
212
|
+
// "ancestorProperties": {
|
|
213
|
+
// "viewName": "*view.Welcome",
|
|
214
|
+
// "tooltip": [{ "path": "i18n>welcomeDescription" }],
|
|
215
|
+
// "descendantProperties": {
|
|
216
|
+
// "metadata": "sap.m.ScrollContainer",
|
|
217
|
+
// "domProperties": {
|
|
218
|
+
// "class": "*sapMScrollCont"
|
|
219
|
+
// }
|
|
220
|
+
// }
|
|
221
|
+
// }
|
|
222
|
+
// }
|
|
223
|
+
// }
|
|
224
|
+
// },
|
|
225
|
+
// };
|
|
226
|
+
// await ui5.assertion.expectAttributeToBe(ui5ControlProperties, "showHeader", "true", 0, 30000, 30000);
|
|
227
|
+
// });
|
|
227
228
|
|
|
228
229
|
it("Step 10: check Page has descendant text - use deep selector structure wrong", async function () {
|
|
229
230
|
var ui5ControlProperties = {
|
|
@@ -1081,7 +1082,7 @@ describe("filters1", function () {
|
|
|
1081
1082
|
"parentProperties": { "metadata": "sap.m.ObjectListItem", "mProperties": { "bindingContextPath": "/Products('HT-2026')" } },
|
|
1082
1083
|
"ancestorProperties": {
|
|
1083
1084
|
"metadata": "sap.m.List", "mProperties": {
|
|
1084
|
-
"bindingContextPath": "ProductCategories('AC')*",
|
|
1085
|
+
"bindingContextPath": "/ProductCategories('AC')*",
|
|
1085
1086
|
"items": { "path": "Products" }
|
|
1086
1087
|
}
|
|
1087
1088
|
},
|
package/test/helper/utils.js
CHANGED
|
@@ -2,18 +2,37 @@ exports.handleCookiesConsent = async function handleCookiesConsent() {
|
|
|
2
2
|
// eslint-disable-next-line no-undef
|
|
3
3
|
await util.function.executeOptional(async function () {
|
|
4
4
|
const oldCookiesConsentDialog = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
elementProperties: {
|
|
6
|
+
viewName: "sap.ui.documentation.sdk.view.App",
|
|
7
|
+
metadata: "sap.m.Button",
|
|
8
|
+
text: [
|
|
9
|
+
{
|
|
10
|
+
path: "i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_ACCEPT_ALL"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
11
13
|
}
|
|
12
14
|
};
|
|
15
|
+
const testCookie = await browser.getCookies(["cmapi_cookie_privacy"]);
|
|
16
|
+
if (testCookie.length > 0) {
|
|
17
|
+
// cookie already set
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
13
20
|
const newCookiesConsentDialog = "button[id='truste-consent-button']";
|
|
14
|
-
await
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
await browser.waitUntil(
|
|
22
|
+
async () => {
|
|
23
|
+
try {
|
|
24
|
+
await Promise.any([ui5.userInteraction.click(oldCookiesConsentDialog, 0, 500), nonUi5.userInteraction.click(newCookiesConsentDialog, 0, 500)]);
|
|
25
|
+
return true;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
// Ignore error and continue to next promise
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
timeout: 15000,
|
|
33
|
+
timeoutMsg: "Cookies consent dialog not found",
|
|
34
|
+
interval: 100
|
|
35
|
+
}
|
|
36
|
+
);
|
|
18
37
|
}, []);
|
|
19
|
-
};
|
|
38
|
+
};
|
|
@@ -45,6 +45,6 @@ describe("session - logout without login (unhappy case)", function () {
|
|
|
45
45
|
|
|
46
46
|
it("Execution & Verification", async function () {
|
|
47
47
|
await expect(ui5.session.logout())
|
|
48
|
-
.rejects.toThrow(/
|
|
48
|
+
.rejects.toThrow(/Function 'logout' failed with: Could not click User Icon/);
|
|
49
49
|
});
|
|
50
50
|
});
|
|
@@ -58,30 +58,4 @@ describe("table - sortColumnDescending - smartTable with tableSelector", functio
|
|
|
58
58
|
await ui5.assertion.expectAttributeToBe(selector, "sortIndicator", "Descending");
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
describe("table - sortColumnDescending - smartTable with index (legacy)", function () {
|
|
64
|
-
|
|
65
|
-
it("Preparation", async function () {
|
|
66
|
-
await browser.url("https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.smarttable.SmartTable/sample/sap.ui.comp.sample.smarttable.mtable");
|
|
67
|
-
await handleCookiesConsent();
|
|
68
|
-
await util.browser.switchToIframe("[id='sampleFrame']");
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it("Execution", async function () {
|
|
72
|
-
const index = 0; // deprecated
|
|
73
|
-
await ui5.table.sortColumnDescending("Name", index);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it("Verification", async function () {
|
|
77
|
-
const selector = {
|
|
78
|
-
"elementProperties": {
|
|
79
|
-
"viewName": "sap.ui.comp.sample.smarttable.mtable.SmartTable",
|
|
80
|
-
"metadata": "sap.m.Column",
|
|
81
|
-
"tooltip": "Name"
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
await ui5.assertion.expectAttributeToBe(selector, "sortIndicator", "Descending", 0);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
61
|
});
|
|
@@ -12,13 +12,15 @@ describe("userInteraction - searchFor - use button", function () {
|
|
|
12
12
|
|
|
13
13
|
it("Execution", async function () {
|
|
14
14
|
const selector = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
elementProperties: {
|
|
16
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
17
|
+
metadata: "sap.m.SearchField"
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
ancestorProperties: {
|
|
20
|
+
siblingProperties: {
|
|
21
|
+
metadata: "sap.m.Toolbar",
|
|
22
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
const value = "Laptop";
|
|
@@ -30,13 +32,15 @@ describe("userInteraction - searchFor - use button", function () {
|
|
|
30
32
|
|
|
31
33
|
it("Verification", async function () {
|
|
32
34
|
const selector = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
elementProperties: {
|
|
36
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
37
|
+
metadata: "sap.m.SearchField"
|
|
36
38
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
ancestorProperties: {
|
|
40
|
+
siblingProperties: {
|
|
41
|
+
metadata: "sap.m.Toolbar",
|
|
42
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
const valueExp = "Laptop";
|
|
@@ -55,13 +59,15 @@ describe("userInteraction - searchFor - use Enter", function () {
|
|
|
55
59
|
|
|
56
60
|
it("Execution", async function () {
|
|
57
61
|
const selector = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
elementProperties: {
|
|
63
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
64
|
+
metadata: "sap.m.SearchField"
|
|
61
65
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
ancestorProperties: {
|
|
67
|
+
siblingProperties: {
|
|
68
|
+
metadata: "sap.m.Toolbar",
|
|
69
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
73
|
const value = "Laptop";
|
|
@@ -73,13 +79,15 @@ describe("userInteraction - searchFor - use Enter", function () {
|
|
|
73
79
|
|
|
74
80
|
it("Verification", async function () {
|
|
75
81
|
const selector = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
elementProperties: {
|
|
83
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
84
|
+
metadata: "sap.m.SearchField"
|
|
79
85
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
ancestorProperties: {
|
|
87
|
+
siblingProperties: {
|
|
88
|
+
metadata: "sap.m.Toolbar",
|
|
89
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
90
|
+
}
|
|
83
91
|
}
|
|
84
92
|
};
|
|
85
93
|
const valueExp = "Laptop";
|
|
@@ -98,13 +106,15 @@ describe("userInteraction - searchFor - use Enter and wrong selector", function
|
|
|
98
106
|
|
|
99
107
|
it("Execution & Verification", async function () {
|
|
100
108
|
const selector = {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
elementProperties: {
|
|
110
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
111
|
+
metadata: "sarchField"
|
|
104
112
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
ancestorProperties: {
|
|
114
|
+
siblingProperties: {
|
|
115
|
+
metadata: "sap.m.Toolbar",
|
|
116
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
117
|
+
}
|
|
108
118
|
}
|
|
109
119
|
};
|
|
110
120
|
const value = "Laptop";
|
|
@@ -126,13 +136,15 @@ describe("userInteraction - resetSearch", function () {
|
|
|
126
136
|
|
|
127
137
|
it("Execution", async function () {
|
|
128
138
|
const selector = {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
139
|
+
elementProperties: {
|
|
140
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
141
|
+
metadata: "sap.m.SearchField"
|
|
132
142
|
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
143
|
+
ancestorProperties: {
|
|
144
|
+
siblingProperties: {
|
|
145
|
+
metadata: "sap.m.Toolbar",
|
|
146
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
147
|
+
}
|
|
136
148
|
}
|
|
137
149
|
};
|
|
138
150
|
const value = "Laptop";
|
|
@@ -144,13 +156,15 @@ describe("userInteraction - resetSearch", function () {
|
|
|
144
156
|
|
|
145
157
|
it("Verification", async function () {
|
|
146
158
|
const selector = {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
159
|
+
elementProperties: {
|
|
160
|
+
viewName: "sap.m.sample.SearchField.Page",
|
|
161
|
+
metadata: "sap.m.SearchField"
|
|
150
162
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
163
|
+
ancestorProperties: {
|
|
164
|
+
siblingProperties: {
|
|
165
|
+
metadata: "sap.m.Toolbar",
|
|
166
|
+
viewName: "sap.m.sample.SearchField.Page"
|
|
167
|
+
}
|
|
154
168
|
}
|
|
155
169
|
};
|
|
156
170
|
const valueExp = "";
|
package/tsconfig.json
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
|
|
21
21
|
"sourceMap": true
|
|
22
22
|
},
|
|
23
|
-
"include": ["src/**/*.ts", "src/**/*.js", "@types/index.d.ts", "src/**/*.json"],
|
|
24
|
-
"exclude": ["lib"]
|
|
23
|
+
"include": ["src/**/*.ts", "src/**/*.js", "@types/index.d.ts", "@types/locatorTypes.d.ts", "src/**/*.json"],
|
|
24
|
+
"exclude": ["lib", "src/scripts/locators/qmateLocatorSrc/build.js"]
|
|
25
25
|
}
|