@sap-ux/ui5-test-writer 0.1.10 → 0.2.0
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/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ function getAppFromManifest(manifest, forcedAppID) {
|
|
|
68
68
|
* @returns Page configuration object, or undefined if the target type is not supported
|
|
69
69
|
*/
|
|
70
70
|
function createPageConfig(manifest, targetKey, forcedAppID) {
|
|
71
|
-
var _a, _b, _c, _d;
|
|
71
|
+
var _a, _b, _c, _d, _e, _f;
|
|
72
72
|
const appTargets = (_b = (_a = manifest['sap.ui5']) === null || _a === void 0 ? void 0 : _a.routing) === null || _b === void 0 ? void 0 : _b.targets;
|
|
73
73
|
const target = appTargets && appTargets[targetKey];
|
|
74
74
|
const { appID, appPath } = getAppFromManifest(manifest, forcedAppID);
|
|
@@ -76,16 +76,22 @@ function createPageConfig(manifest, targetKey, forcedAppID) {
|
|
|
76
76
|
(target === null || target === void 0 ? void 0 : target.name) &&
|
|
77
77
|
target.name in types_1.SupportedPageTypes &&
|
|
78
78
|
(target === null || target === void 0 ? void 0 : target.id) &&
|
|
79
|
-
((_d = (_c = target === null || target === void 0 ? void 0 : target.options) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d.entitySet)) {
|
|
80
|
-
|
|
79
|
+
(((_d = (_c = target === null || target === void 0 ? void 0 : target.options) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d.entitySet) || ((_f = (_e = target === null || target === void 0 ? void 0 : target.options) === null || _e === void 0 ? void 0 : _e.settings) === null || _f === void 0 ? void 0 : _f.contextPath))) {
|
|
80
|
+
const pageConfig = {
|
|
81
81
|
appPath,
|
|
82
82
|
appID,
|
|
83
83
|
targetKey,
|
|
84
84
|
componentID: target.id,
|
|
85
|
-
entitySet: target.options.settings.entitySet,
|
|
86
85
|
template: types_1.SupportedPageTypes[target.name],
|
|
87
86
|
isStartup: false
|
|
88
87
|
};
|
|
88
|
+
if (target.options.settings.contextPath) {
|
|
89
|
+
pageConfig.contextPath = target.options.settings.contextPath;
|
|
90
|
+
}
|
|
91
|
+
else if (target.options.settings.entitySet) {
|
|
92
|
+
pageConfig.entitySet = target.options.settings.entitySet;
|
|
93
|
+
}
|
|
94
|
+
return pageConfig;
|
|
89
95
|
}
|
|
90
96
|
else {
|
|
91
97
|
return undefined;
|
package/dist/types.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export type FEV4OPAPageConfig = {
|
|
|
6
6
|
appPath: string;
|
|
7
7
|
template: string;
|
|
8
8
|
componentID: string;
|
|
9
|
-
entitySet
|
|
9
|
+
entitySet?: string;
|
|
10
|
+
contextPath?: string;
|
|
10
11
|
targetKey: string;
|
|
11
12
|
isStartup: boolean;
|
|
12
13
|
};
|
|
@@ -24,6 +25,7 @@ export type FEV4ManifestTarget = {
|
|
|
24
25
|
options?: {
|
|
25
26
|
settings?: {
|
|
26
27
|
entitySet?: string;
|
|
28
|
+
contextPath?: string;
|
|
27
29
|
navigation?: {
|
|
28
30
|
[id: string]: {
|
|
29
31
|
detail?: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui5-test-writer",
|
|
3
3
|
"description": "SAP UI5 tests writer",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"!dist/**/*.map"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"ejs": "3.1.
|
|
23
|
+
"ejs": "3.1.9",
|
|
24
24
|
"i18next": "20.3.2",
|
|
25
25
|
"mem-fs": "2.1.0",
|
|
26
26
|
"mem-fs-editor": "9.4.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/ejs": "3.1.
|
|
29
|
+
"@types/ejs": "3.1.2",
|
|
30
30
|
"@types/fs-extra": "9.0.13",
|
|
31
31
|
"@types/mem-fs": "1.1.2",
|
|
32
32
|
"@types/mem-fs-editor": "7.0.1",
|
|
33
33
|
"fs-extra": "10.0.0",
|
|
34
|
-
"@sap-ux/project-access": "1.
|
|
34
|
+
"@sap-ux/project-access": "1.13.6"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0",
|
|
@@ -9,8 +9,9 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) {
|
|
|
9
9
|
return new ListReport(
|
|
10
10
|
{
|
|
11
11
|
appId: '<%- appID %>',
|
|
12
|
-
componentId: '<%- componentID %>'
|
|
13
|
-
|
|
12
|
+
componentId: '<%- componentID %>',<% if (locals.contextPath) { %>
|
|
13
|
+
contextPath: '<%- contextPath %>'<% } else if (locals.entitySet) { %>
|
|
14
|
+
entitySet: '<%- entitySet %>'<% } %>
|
|
14
15
|
},
|
|
15
16
|
CustomPageDefinitions
|
|
16
17
|
);
|
|
@@ -9,8 +9,9 @@ sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) {
|
|
|
9
9
|
return new ObjectPage(
|
|
10
10
|
{
|
|
11
11
|
appId: '<%- appID %>',
|
|
12
|
-
componentId: '<%- componentID %>'
|
|
13
|
-
|
|
12
|
+
componentId: '<%- componentID %>',<% if (locals.contextPath) { %>
|
|
13
|
+
contextPath: '<%- contextPath %>'<% } else if (locals.entitySet) { %>
|
|
14
|
+
entitySet: '<%- entitySet %>'<% } %>
|
|
14
15
|
},
|
|
15
16
|
CustomPageDefinitions
|
|
16
17
|
);
|