generator-easy-ui5 2.4.6 → 3.1.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/CHANGELOG.md +13 -0
- package/README.md +66 -168
- package/generators/app/index.js +392 -171
- package/generators/app/postinstall.js +121 -0
- package/package.json +23 -18
- package/generators/additionalmodules/index.js +0 -222
- package/generators/additionalmodules/templates/approuter/package.json +0 -13
- package/generators/additionalmodules/templates/deployer/readme.md +0 -3
- package/generators/additionalmodules/templates/xs-security.json +0 -20
- package/generators/app/templates/_.editorconfig +0 -8
- package/generators/app/templates/_.eslintignore +0 -4
- package/generators/app/templates/_.eslintrc +0 -48
- package/generators/app/templates/_.gitignore +0 -11
- package/generators/app/templates/karma-ci.conf.js +0 -21
- package/generators/app/templates/karma.conf.js +0 -17
- package/generators/app/templates/readme.md +0 -6
- package/generators/newcomponent/index.js +0 -82
- package/generators/newcontrol/index.js +0 -81
- package/generators/newcontrol/templates/webapp/control/template.js +0 -23
- package/generators/newmodel/index.js +0 -142
- package/generators/newopa5journey/index.js +0 -99
- package/generators/newopa5journey/templates/test/integration/$journey.js +0 -23
- package/generators/newopa5po/index.js +0 -107
- package/generators/newopa5po/templates/test/integration/pages/$poFile.js +0 -43
- package/generators/newuiveri5po/index.js +0 -84
- package/generators/newuiveri5po/templates/pages/$poFile.js +0 -20
- package/generators/newuiveri5spec/index.js +0 -51
- package/generators/newuiveri5spec/templates/$specName.spec.js +0 -22
- package/generators/newview/index.js +0 -156
- package/generators/newview/templates/webapp/controller/$ViewName.controller.js +0 -7
- package/generators/newview/templates/webapp/view/$ViewName.view.$ViewEnding +0 -51
- package/generators/newwebapp/index.js +0 -239
- package/generators/newwebapp/templates/uimodule/ui5.yaml +0 -73
- package/generators/newwebapp/templates/uimodule/webapp/Component.js +0 -30
- package/generators/newwebapp/templates/uimodule/webapp/controller/BaseController.js +0 -70
- package/generators/newwebapp/templates/uimodule/webapp/css/style.css +0 -1
- package/generators/newwebapp/templates/uimodule/webapp/flpSandbox.html +0 -66
- package/generators/newwebapp/templates/uimodule/webapp/i18n/i18n.properties +0 -3
- package/generators/newwebapp/templates/uimodule/webapp/i18n/i18n_en.properties +0 -3
- package/generators/newwebapp/templates/uimodule/webapp/index.html +0 -29
- package/generators/newwebapp/templates/uimodule/webapp/manifest.json +0 -92
- package/generators/newwebapp/templates/uimodule/webapp/model/formatter.js +0 -4
- package/generators/newwebapp/templates/uimodule/webapp/model/models.js +0 -14
- package/generators/newwebapp/templates/uimodule/webapp/resources/img/favicon.ico +0 -0
- package/generators/newwebapp/templates/uimodule/webapp/xs-app.json +0 -11
- package/generators/opa5/index.js +0 -114
- package/generators/opa5/templates/test/integration/AllJourneys.js +0 -13
- package/generators/opa5/templates/test/integration/arrangements/Startup.js +0 -19
- package/generators/opa5/templates/test/integration/opaTests.qunit.html +0 -32
- package/generators/opa5/templates/test/integration/opaTests.qunit.js +0 -13
- package/generators/opa5/templates/test/testsuite.qunit.html +0 -10
- package/generators/opa5/templates/test/testsuite.qunit.js +0 -10
- package/generators/uiveri5/index.js +0 -144
- package/generators/uiveri5/templates/.gitignore +0 -2
- package/generators/uiveri5/templates/README.md +0 -11
- package/generators/uiveri5/templates/conf.js +0 -16
- package/generators/wdi5/index.js +0 -96
- package/generators/wdi5/templates/.gitignore +0 -1
- package/generators/wdi5/templates/README-wdi5.md +0 -39
- package/generators/wdi5/templates/basic.test.js +0 -17
- package/generators/wdi5/templates/wdio-wdi5.conf.js +0 -282
- package/helpers/fileaccess.js +0 -90
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
-
<title>Fiori Launchpad Sandbox</title>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
window["sap-ushell-config"] = {
|
|
12
|
-
defaultRenderer: "fiori2",
|
|
13
|
-
bootstrapPlugins: {
|
|
14
|
-
"KeyUserPlugin": {
|
|
15
|
-
"component": "sap.ushell.plugins.rta"
|
|
16
|
-
},
|
|
17
|
-
"PersonalizePlugin": {
|
|
18
|
-
"component": "sap.ushell.plugins.rta-personalize"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
applications: {
|
|
22
|
-
"display-<%=modulename%>": {
|
|
23
|
-
title: "<%= tilename %>",
|
|
24
|
-
description: "App Description",
|
|
25
|
-
icon: "sap-icon://add",
|
|
26
|
-
additionalInformation: "SAPUI5.Component=<%=appId%>",
|
|
27
|
-
applicationType: "URL",
|
|
28
|
-
url: "./",
|
|
29
|
-
navigationMode: "embedded"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<script
|
|
36
|
-
id="sap-ui-bootstrap"
|
|
37
|
-
src="<%= ui5libs === 'Content delivery network (OpenUI5)' ?
|
|
38
|
-
'https://openui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js' :
|
|
39
|
-
ui5libs === 'Content delivery network (SAPUI5)' ?
|
|
40
|
-
'https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js' : 'test-resources/sap/ushell/bootstrap/sandbox.js' %>">
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<script
|
|
44
|
-
id="sap-ui-bootstrap"
|
|
45
|
-
src="<%= ui5libs === 'Content delivery network (OpenUI5)' ?
|
|
46
|
-
'https://openui5.hana.ondemand.com/resources/sap-ui-core.js' :
|
|
47
|
-
ui5libs === 'Content delivery network (SAPUI5)' ?
|
|
48
|
-
'https://sapui5.hana.ondemand.com/resources/sap-ui-core.js' : 'resources/sap-ui-core.js' %>"
|
|
49
|
-
data-sap-ui-resourceroots='{
|
|
50
|
-
"<%=appId%>": "./"
|
|
51
|
-
}'
|
|
52
|
-
data-sap-ui-theme="sap_fiori_3"
|
|
53
|
-
data-sap-ui-compatVersion="edge"
|
|
54
|
-
data-sap-ui-async="true"
|
|
55
|
-
data-sap-ui-frameOptions="allow">
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<script>
|
|
60
|
-
sap.ui.getCore().attachInit(() => sap.ushell.Container.createRenderer().placeAt("content"));
|
|
61
|
-
</script>
|
|
62
|
-
</head>
|
|
63
|
-
|
|
64
|
-
<body class="sapUiBody" id="content"></body>
|
|
65
|
-
|
|
66
|
-
</html>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE HTML>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<link href="/resources/img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<title><%= projectname %></title>
|
|
11
|
-
|
|
12
|
-
<script id="sap-ui-bootstrap" src="<%= ui5libs === 'Content delivery network (OpenUI5)' ?
|
|
13
|
-
'https://openui5.hana.ondemand.com/resources/sap-ui-core.js' :
|
|
14
|
-
ui5libs === 'Content delivery network (SAPUI5)' ?
|
|
15
|
-
'https://sapui5.hana.ondemand.com/resources/sap-ui-core.js' : 'resources/sap-ui-core.js' %>"
|
|
16
|
-
data-sap-ui-theme="sap_fiori_3" data-sap-ui-resourceroots='{
|
|
17
|
-
"<%=appId%>": "./"
|
|
18
|
-
}' data-sap-ui-oninit="module:sap/ui/core/ComponentSupport" data-sap-ui-compatVersion="edge"
|
|
19
|
-
data-sap-ui-async="true" data-sap-ui-frameOptions="trusted">
|
|
20
|
-
</script>
|
|
21
|
-
</head>
|
|
22
|
-
|
|
23
|
-
<body class="sapUiBody">
|
|
24
|
-
<div data-sap-ui-component data-name="<%=appId%>" data-id="container"
|
|
25
|
-
data-settings='{"id" : "<%=projectname%>"}'>
|
|
26
|
-
</div>
|
|
27
|
-
</body>
|
|
28
|
-
|
|
29
|
-
</html>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_version": "1.21.0",
|
|
3
|
-
"sap.app": {
|
|
4
|
-
"id": "<%=appId%>",
|
|
5
|
-
"type": "application",
|
|
6
|
-
"i18n": "i18n/i18n.properties",
|
|
7
|
-
"applicationVersion": {
|
|
8
|
-
"version": "1.0.0"
|
|
9
|
-
},
|
|
10
|
-
"title": "{{appTitle}}",
|
|
11
|
-
"description": "{{appDescription}}"
|
|
12
|
-
},
|
|
13
|
-
"sap.ui": {
|
|
14
|
-
"technology": "UI5",
|
|
15
|
-
"icons": {
|
|
16
|
-
"icon": "",
|
|
17
|
-
"favIcon": "",
|
|
18
|
-
"phone": "",
|
|
19
|
-
"phone@2": "",
|
|
20
|
-
"tablet": "",
|
|
21
|
-
"tablet@2": ""
|
|
22
|
-
},
|
|
23
|
-
"deviceTypes": {
|
|
24
|
-
"desktop": true,
|
|
25
|
-
"tablet": true,
|
|
26
|
-
"phone": true
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"sap.ui5": {
|
|
30
|
-
"flexEnabled": true,
|
|
31
|
-
"rootView": {
|
|
32
|
-
"viewName": "<%=appId%>.view.<%=viewname%>",
|
|
33
|
-
"type": "<%=viewtype%>",
|
|
34
|
-
"async": true,
|
|
35
|
-
"id": "idAppControl"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"minUI5Version": "1.60.0",
|
|
39
|
-
"libs": {
|
|
40
|
-
"sap.ui.core": {},
|
|
41
|
-
"sap.m": {},
|
|
42
|
-
"sap.ui.layout": {}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"contentDensities": {
|
|
46
|
-
"compact": true,
|
|
47
|
-
"cozy": true
|
|
48
|
-
},
|
|
49
|
-
"models": {
|
|
50
|
-
"i18n": {
|
|
51
|
-
"type": "sap.ui.model.resource.ResourceModel",
|
|
52
|
-
"settings": {
|
|
53
|
-
"bundleName": "<%=appId%>.i18n.i18n"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"resources": {
|
|
58
|
-
"css": [
|
|
59
|
-
{
|
|
60
|
-
"uri": "css/style.css"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"routing": {
|
|
65
|
-
"config": {
|
|
66
|
-
"routerClass": "sap.m.routing.Router",
|
|
67
|
-
"viewType": "XML",
|
|
68
|
-
"viewPath": "<%=appId%>.view",
|
|
69
|
-
"controlId": "idAppControl",
|
|
70
|
-
"controlAggregation": "pages",
|
|
71
|
-
"async": true
|
|
72
|
-
},
|
|
73
|
-
"routes": [
|
|
74
|
-
{
|
|
75
|
-
"name": "Route<%=viewname%>",
|
|
76
|
-
"pattern": "Route<%=viewname%>",
|
|
77
|
-
"target": [
|
|
78
|
-
"Target<%=viewname%>"
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
"targets": {
|
|
83
|
-
"Target<%=viewname%>": {
|
|
84
|
-
"viewType": "XML",
|
|
85
|
-
"viewLevel": 1,
|
|
86
|
-
"viewId": "idAppControl",
|
|
87
|
-
"viewName": "<%=viewname%>"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
sap.ui.define([
|
|
2
|
-
"sap/ui/model/json/JSONModel",
|
|
3
|
-
"sap/ui/Device"
|
|
4
|
-
], function(JSONModel, Device) {
|
|
5
|
-
"use strict";
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
createDeviceModel: function() {
|
|
9
|
-
var oModel = new JSONModel(Device);
|
|
10
|
-
oModel.setDefaultBindingMode("OneWay");
|
|
11
|
-
return oModel;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
});
|
|
Binary file
|
package/generators/opa5/index.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
const Generator = require("yeoman-generator");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const glob = require("glob");
|
|
4
|
-
|
|
5
|
-
module.exports = class extends Generator {
|
|
6
|
-
|
|
7
|
-
prompting() {
|
|
8
|
-
let aPrompt = [];
|
|
9
|
-
this.options.oneTimeConfig = this.config.getAll();
|
|
10
|
-
|
|
11
|
-
if (this.options.isSubgeneratorCall) {
|
|
12
|
-
this.options.oneTimeConfig.projectname = this.options.projectname;
|
|
13
|
-
this.options.oneTimeConfig.namespaceInput = this.options.namespaceInput;
|
|
14
|
-
this.options.oneTimeConfig.modulename = this.options.modulename;
|
|
15
|
-
} else {
|
|
16
|
-
|
|
17
|
-
if (!this.config.getAll().viewtype) {
|
|
18
|
-
aPrompt = aPrompt.concat([{
|
|
19
|
-
type: "input",
|
|
20
|
-
name: "projectname",
|
|
21
|
-
message: "Seems like this project has not been generated with Easy-UI5. Please enter the name of your project.",
|
|
22
|
-
validate: (s) => {
|
|
23
|
-
if (/^\d*[a-zA-Z][a-zA-Z0-9]*$/g.test(s)) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
return "Please use alpha numeric characters only for the project name.";
|
|
27
|
-
},
|
|
28
|
-
default: "myUI5App"
|
|
29
|
-
}, {
|
|
30
|
-
type: "input",
|
|
31
|
-
name: "namespaceInput",
|
|
32
|
-
message: "Please enter the namespace you use currently",
|
|
33
|
-
validate: (s) => {
|
|
34
|
-
if (/^[a-zA-Z0-9_\.]*$/g.test(s)) {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return "Please use alpha numeric characters and dots only for the namespace.";
|
|
38
|
-
},
|
|
39
|
-
default: "com.myorg"
|
|
40
|
-
}]);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const modules = this.config.get("uimodules") || [];
|
|
44
|
-
if (modules.length) {
|
|
45
|
-
aPrompt.push({
|
|
46
|
-
type: "list",
|
|
47
|
-
name: "modulename",
|
|
48
|
-
message: "To which module do you want to add OPA5 tests?",
|
|
49
|
-
choices: modules,
|
|
50
|
-
when: modules.length
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
aPrompt = aPrompt.concat({
|
|
56
|
-
type: "confirm",
|
|
57
|
-
name: "addPO",
|
|
58
|
-
message: "Do you want to add a page object?",
|
|
59
|
-
default: true
|
|
60
|
-
}, {
|
|
61
|
-
type: "confirm",
|
|
62
|
-
name: "addJourney",
|
|
63
|
-
message: "Do you want to add a journey?",
|
|
64
|
-
default: true
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
return this.prompt(aPrompt).then((answers) => {
|
|
68
|
-
for (var key in answers) {
|
|
69
|
-
this.options.oneTimeConfig[key] = answers[key];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
var appName = !this.options.oneTimeConfig.modulename || this.options.oneTimeConfig.modulename === "uimodule" ? this.options.oneTimeConfig.projectname : this.options.oneTimeConfig.modulename;
|
|
73
|
-
this.options.oneTimeConfig.namespaceInput = this.options.oneTimeConfig.namespaceInput || this.options.oneTimeConfig.namespace;
|
|
74
|
-
this.options.oneTimeConfig.namespaceURI = this.options.oneTimeConfig.namespaceInput.split(".").join("/");
|
|
75
|
-
this.options.oneTimeConfig.appId = this.options.oneTimeConfig.namespaceInput + "." + appName;
|
|
76
|
-
this.options.oneTimeConfig.appURI = this.options.oneTimeConfig.namespaceURI + "/" + appName;
|
|
77
|
-
this.options.oneTimeConfig.title = appName;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
main() {
|
|
82
|
-
if (this.options.oneTimeConfig.addPO) {
|
|
83
|
-
this.composeWith(require.resolve("../newopa5po"), Object.assign({}, this.options.oneTimeConfig, {
|
|
84
|
-
isSubgeneratorCall: true
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
if (this.options.oneTimeConfig.addJourney) {
|
|
88
|
-
this.composeWith(require.resolve("../newopa5journey"), Object.assign({}, this.options.oneTimeConfig, {
|
|
89
|
-
isSubgeneratorCall: true
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async writing() {
|
|
95
|
-
// get values from subgeneratos
|
|
96
|
-
const journeys = this.config.get("opa5Journeys") || [];
|
|
97
|
-
this.config.set("opa5Journeys", journeys);
|
|
98
|
-
this.options.oneTimeConfig.opa5Journeys = journeys;
|
|
99
|
-
|
|
100
|
-
const pos = this.config.get("opa5pos") || [];
|
|
101
|
-
this.config.set("opa5pos", pos);
|
|
102
|
-
this.options.oneTimeConfig.opa5pos = pos;
|
|
103
|
-
|
|
104
|
-
const sModule = (this.options.oneTimeConfig.modulename ? this.options.oneTimeConfig.modulename + "/" : "") + "webapp/";
|
|
105
|
-
this.sourceRoot(path.join(__dirname, "templates"));
|
|
106
|
-
glob.sync("**", {
|
|
107
|
-
cwd: this.sourceRoot(),
|
|
108
|
-
nodir: true
|
|
109
|
-
}).forEach((file) => {
|
|
110
|
-
this.fs.copyTpl(this.templatePath(file), this.destinationPath(sModule + file), this.options.oneTimeConfig);
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
sap.ui.define([
|
|
2
|
-
"sap/ui/test/Opa5",
|
|
3
|
-
"./arrangements/Startup"<% opa5Journeys.forEach(function (journey) { %>,
|
|
4
|
-
"./<%=journey%>Journey"<% }) %>
|
|
5
|
-
], function(Opa5, Startup) {
|
|
6
|
-
"use strict";
|
|
7
|
-
|
|
8
|
-
Opa5.extendConfig({
|
|
9
|
-
arrangements: new Startup(),
|
|
10
|
-
autoWait: true
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
sap.ui.define([
|
|
2
|
-
"sap/ui/test/Opa5"
|
|
3
|
-
], function(Opa5) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
return Opa5.extend("<%= appId %>.test.integration.arrangements.Startup", {
|
|
7
|
-
|
|
8
|
-
iStartMyApp: function () {
|
|
9
|
-
this.iStartMyUIComponent({
|
|
10
|
-
componentConfig: {
|
|
11
|
-
name: "<%= appId %>",
|
|
12
|
-
async: true,
|
|
13
|
-
manifest: true
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<title>Integration tests for <%= title %></title>
|
|
7
|
-
|
|
8
|
-
<script id="sap-ui-bootstrap" src="../../../../../resources/sap-ui-core.js"
|
|
9
|
-
data-sap-ui-theme='sap_fiori_3'
|
|
10
|
-
data-sap-ui-resourceroots='{
|
|
11
|
-
"<%= appId %>": "../../"
|
|
12
|
-
}'
|
|
13
|
-
data-sap-ui-language="EN"
|
|
14
|
-
data-sap-ui-animation="false"
|
|
15
|
-
data-sap-ui-compatVersion="edge"
|
|
16
|
-
data-sap-ui-async="true">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<link rel="stylesheet" type="text/css" href="../../../../../resources/sap/ui/thirdparty/qunit-2.css">
|
|
20
|
-
|
|
21
|
-
<script src="../../../../../resources/sap/ui/thirdparty/qunit-2.js"></script>
|
|
22
|
-
<script src="../../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
|
|
23
|
-
|
|
24
|
-
<script src="opaTests.qunit.js"></script>
|
|
25
|
-
</head>
|
|
26
|
-
|
|
27
|
-
<body>
|
|
28
|
-
<div id="qunit"></div>
|
|
29
|
-
<div id="qunit-fixture"></div>
|
|
30
|
-
</body>
|
|
31
|
-
|
|
32
|
-
</html>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>QUnit test suite for <%= title %></title>
|
|
5
|
-
<script src="../../../../resources/sap/ui/qunit/qunit-redirect.js"></script>
|
|
6
|
-
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
</body>
|
|
10
|
-
</html>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
window.suite = function() {
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var oSuite = new parent.jsUnitTestSuite(),
|
|
5
|
-
sContextPath = location.pathname.substring(0, location.pathname.lastIndexOf("/") + 1);
|
|
6
|
-
|
|
7
|
-
oSuite.addTestPage(sContextPath + "integration/opaTests.qunit.html");
|
|
8
|
-
|
|
9
|
-
return oSuite;
|
|
10
|
-
};
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
var Generator = require("yeoman-generator");
|
|
2
|
-
var fileaccess = require("../../helpers/fileaccess");
|
|
3
|
-
|
|
4
|
-
module.exports = class extends Generator {
|
|
5
|
-
constructor(args, opts) {
|
|
6
|
-
super(args, opts);
|
|
7
|
-
this.answers = {};
|
|
8
|
-
this.reportersMap = {
|
|
9
|
-
JUNIT: "junitReporter",
|
|
10
|
-
SauceLabs: "saucelabsReporter"
|
|
11
|
-
};
|
|
12
|
-
this.authMap = {
|
|
13
|
-
"SAP Fiori": "fiori-form",
|
|
14
|
-
"SAP Cloud Platform": "sapcloud-form"
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
prompting() {
|
|
19
|
-
var aPrompt = [];
|
|
20
|
-
if (this.config.getAll().viewtype) {
|
|
21
|
-
aPrompt = aPrompt.concat([{
|
|
22
|
-
type: "input",
|
|
23
|
-
name: "dirname",
|
|
24
|
-
message: "Name of the UIVeri5 tests folder:",
|
|
25
|
-
default: "uiveri5"
|
|
26
|
-
}]);
|
|
27
|
-
} else {
|
|
28
|
-
aPrompt = aPrompt.concat([{
|
|
29
|
-
type: "input",
|
|
30
|
-
name: "dirname",
|
|
31
|
-
message: "Seems like this project has not been generated with Easy-UI5. Please enter the name of your project:",
|
|
32
|
-
default: "uiveri5"
|
|
33
|
-
}]);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
aPrompt = aPrompt.concat([{
|
|
37
|
-
type: "input",
|
|
38
|
-
name: "baseUrl",
|
|
39
|
-
message: "URL to the app under test:",
|
|
40
|
-
default: "http://localhost:8080"
|
|
41
|
-
}, {
|
|
42
|
-
type: "list",
|
|
43
|
-
name: "auth",
|
|
44
|
-
message: "Choose authentication:",
|
|
45
|
-
choices: Object.keys(this.authMap).concat("none"),
|
|
46
|
-
default: "none"
|
|
47
|
-
}, {
|
|
48
|
-
type: "checkbox",
|
|
49
|
-
name: "chosenReporters",
|
|
50
|
-
message: "Choose additional reporters (or skip):",
|
|
51
|
-
choices: Object.keys(this.reportersMap)
|
|
52
|
-
}, {
|
|
53
|
-
type: "confirm",
|
|
54
|
-
name: "addPO",
|
|
55
|
-
message: "Do you want to add a page object?",
|
|
56
|
-
default: true
|
|
57
|
-
}, {
|
|
58
|
-
type: "confirm",
|
|
59
|
-
name: "addSpec",
|
|
60
|
-
message: "Do you want to add a spec?",
|
|
61
|
-
default: true
|
|
62
|
-
}]);
|
|
63
|
-
|
|
64
|
-
return this.prompt(aPrompt).then(function (answers) {
|
|
65
|
-
this.options.oneTimeConfig = this.config.getAll();
|
|
66
|
-
for (var key in answers) {
|
|
67
|
-
this.options.oneTimeConfig[key] = answers[key];
|
|
68
|
-
}
|
|
69
|
-
}.bind(this));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
main() {
|
|
73
|
-
if (this.options.oneTimeConfig.addPO) {
|
|
74
|
-
this.composeWith(require.resolve("../newuiveri5po"), {
|
|
75
|
-
dirname: this.options.oneTimeConfig.dirname
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
if (this.options.oneTimeConfig.addSpec) {
|
|
79
|
-
this.composeWith(require.resolve("../newuiveri5spec"), {
|
|
80
|
-
dirname: this.options.oneTimeConfig.dirname
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async writing() {
|
|
86
|
-
// get values from subgeneratos
|
|
87
|
-
const specs = this.config.get("uiveri5specs") || [];
|
|
88
|
-
this.config.set("uiveri5specs", specs);
|
|
89
|
-
this.options.oneTimeConfig.uiveri5specs = specs;
|
|
90
|
-
|
|
91
|
-
const pos = this.config.get("uiveri5pos") || {};
|
|
92
|
-
this.config.set("uiveri5pos", pos);
|
|
93
|
-
this.options.oneTimeConfig.uiveri5pos = pos;
|
|
94
|
-
|
|
95
|
-
this.fs.copyTpl(
|
|
96
|
-
this.templatePath("./**/*"),
|
|
97
|
-
this.destinationPath(this.options.oneTimeConfig.dirname),
|
|
98
|
-
Object.assign({}, this.options.oneTimeConfig, {
|
|
99
|
-
reportersMap: this.reportersMap,
|
|
100
|
-
authMap: this.authMap,
|
|
101
|
-
viewtype: this.options.oneTimeConfig.viewtype
|
|
102
|
-
}),
|
|
103
|
-
null, {
|
|
104
|
-
globOptions: {
|
|
105
|
-
dot: true
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
this.config.set("uiveri5Tests", this.options.oneTimeConfig.dirname);
|
|
110
|
-
|
|
111
|
-
if (this.options.oneTimeConfig.viewtype) {
|
|
112
|
-
await fileaccess.manipulateJSON.call(this, "/package.json", function (packge) {
|
|
113
|
-
packge.scripts.uiveri5 = "uiveri5 --v ./" + this.options.oneTimeConfig.dirname + "/conf.js";
|
|
114
|
-
packge.devDependencies["@ui5/uiveri5"] = "*";
|
|
115
|
-
return packge;
|
|
116
|
-
}.bind(this));
|
|
117
|
-
} else {
|
|
118
|
-
let packge = {
|
|
119
|
-
"name": this.options.oneTimeConfig.dirname,
|
|
120
|
-
"version": "0.0.1",
|
|
121
|
-
"scripts": {
|
|
122
|
-
"uiveri5": "uiveri5 --v ./conf.js"
|
|
123
|
-
},
|
|
124
|
-
"devDependencies": {
|
|
125
|
-
"@ui5/uiveri5": "*"
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
await fileaccess.writeJSON.call(this, "/" + this.options.oneTimeConfig.dirname + "/package.json", packge);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
install() {
|
|
133
|
-
this.config.set("setupCompleted", true);
|
|
134
|
-
process.chdir(this.destinationPath(this.options.oneTimeConfig.dirname));
|
|
135
|
-
this.installDependencies({
|
|
136
|
-
bower: false,
|
|
137
|
-
npm: true,
|
|
138
|
-
callback: function() {
|
|
139
|
-
process.chdir(this.destinationRoot());
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
## UIVeri5 test
|
|
2
|
-
|
|
3
|
-
Create and run E2E tests with [UIVeri5](https://github.com/SAP/ui5-uiveri5)
|
|
4
|
-
|
|
5
|
-
## How to run
|
|
6
|
-
```
|
|
7
|
-
npm run uiveri5
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## Credits
|
|
11
|
-
This project has been generated with 💙 and [easy-ui5](https://github.com/SAP/generator-easy-ui5)
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
exports.config = {
|
|
2
|
-
profile: "integration",
|
|
3
|
-
baseUrl: "<%= baseUrl %>"<% if (chosenReporters.length) { %>,
|
|
4
|
-
reporters: [<% chosenReporters.forEach(function (reporter) { %>
|
|
5
|
-
{name: "./reporter/<%= reportersMap[reporter] %>"},<% }) %>
|
|
6
|
-
]<% } %><% if (viewtype) { %>,
|
|
7
|
-
specs: ["./<%= dirname %>/*.spec.js"]<% } %><% if (auth && authMap[auth]) { %>,
|
|
8
|
-
auth: {
|
|
9
|
-
// provide credentials as params when running the test:
|
|
10
|
-
// uiveri5 --params.user=<user> --params.pass=<pass>
|
|
11
|
-
"<%= authMap[auth] %>": {
|
|
12
|
-
user: "${params.user}",
|
|
13
|
-
pass: "${params.pass}"
|
|
14
|
-
}
|
|
15
|
-
}<% } %>
|
|
16
|
-
};
|