Skip to content

Commit a3ecebc

Browse files
authored
Merge pull request #289 from advanced-security/dd/ui5-testing-improvements/1
Testing improvements and fixes for `javascript/frameworks/ui5/{models,tests}/**`
2 parents 057bcdc + 9a04996 commit a3ecebc

File tree

12 files changed

+207
-0
lines changed

12 files changed

+207
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| webapp/manifest.json:40:11:45:7 | {\\n ... } | External model '' with data source 'catalogService' |
2+
| webapp/manifest.json:46:16:48:7 | {\\n ... } | External model 'users' with data source 'userService' |
3+
| webapp/manifest.json:49:17:51:7 | {\\n ... } | External model 'config' with data source 'configData' |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @kind problem
3+
*/
4+
5+
import javascript
6+
import advanced_security.javascript.frameworks.ui5.UI5
7+
8+
from ManifestJson::ExternalModelManifest model
9+
select model,
10+
"External model '" + model.getName() + "' with data source '" + model.getDataSourceName() + "'"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| webapp/manifest.json:11:25:17:7 | {\\n ... } | OData data source 'catalogService' at OData |
2+
| webapp/manifest.json:18:22:24:7 | {\\n ... } | OData data source 'userService' at OData |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @kind problem
3+
*/
4+
5+
import javascript
6+
import advanced_security.javascript.frameworks.ui5.UI5
7+
8+
from ManifestJson::ODataDataSourceManifest dataSource
9+
select dataSource, "OData data source '" + dataSource.getName() + "' at " + dataSource.getType()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "external-model-manifest-test",
3+
"version": "1.0.0",
4+
"description": "Library test for ExternalModelManifest, DataSourceManifest modeling"
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
specVersion: "3.1"
2+
type: application
3+
metadata:
4+
name: external-model-manifest-test
5+
framework:
6+
name: SAPUI5
7+
version: "1.120.0"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sap.ui.define([
2+
"sap/ui/core/mvc/Controller"
3+
], function(Controller) {
4+
"use strict";
5+
return Controller.extend("external.model.manifest.test.controller.App", {
6+
onInit: function() {
7+
// Simple controller for testing
8+
}
9+
});
10+
});
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"_version": "1.0.0",
3+
"sap.app": {
4+
"id": "external.model.manifest.test",
5+
"type": "application",
6+
"applicationVersion": {
7+
"version": "1.0.0"
8+
},
9+
"title": "External Model Manifest Test",
10+
"dataSources": {
11+
"catalogService": {
12+
"uri": "/odata/v4/catalog/",
13+
"type": "OData",
14+
"settings": {
15+
"odataVersion": "4.0"
16+
}
17+
},
18+
"userService": {
19+
"uri": "/odata/v2/users/",
20+
"type": "OData",
21+
"settings": {
22+
"odataVersion": "2.0"
23+
}
24+
},
25+
"configData": {
26+
"uri": "/api/config.json",
27+
"type": "JSON"
28+
}
29+
}
30+
},
31+
"sap.ui": {
32+
"technology": "UI5"
33+
},
34+
"sap.ui5": {
35+
"rootView": {
36+
"viewName": "external.model.manifest.test.view.App",
37+
"type": "XML"
38+
},
39+
"models": {
40+
"": {
41+
"dataSource": "catalogService",
42+
"settings": {
43+
"defaultBindingMode": "TwoWay"
44+
}
45+
},
46+
"users": {
47+
"dataSource": "userService"
48+
},
49+
"config": {
50+
"dataSource": "configData"
51+
}
52+
},
53+
"routing": {
54+
"config": {
55+
"routerClass": "sap.m.routing.Router",
56+
"viewType": "XML",
57+
"async": true,
58+
"viewPath": "external.model.manifest.test.view"
59+
},
60+
"routes": [
61+
{
62+
"pattern": "",
63+
"name": "main",
64+
"target": "main"
65+
}
66+
],
67+
"targets": {
68+
"main": {
69+
"viewName": "App",
70+
"viewLevel": 1
71+
}
72+
}
73+
}
74+
}
75+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
nodes
2+
| webapp/controller/app.controller.js:11:11:11:21 | input: null |
3+
| webapp/controller/app.controller.js:17:13:17:17 | input |
4+
| webapp/controller/app.controller.js:17:21:17:48 | oModel. ... input") |
5+
| webapp/controller/app.controller.js:18:30:18:34 | input |
6+
| webapp/utils/LogEntriesToHttp.js:7:13:7:19 | message |
7+
| webapp/utils/LogEntriesToHttp.js:7:23:7:41 | Log.getLogEntries() |
8+
| webapp/utils/LogEntriesToHttp.js:11:19:11:25 | message |
9+
| webapp/view/app.view.xml:5:5:7:28 | value={/input} |
10+
| webapp/view/app.view.xml:8:5:8:37 | content={/output} |
11+
edges
12+
| webapp/controller/app.controller.js:11:11:11:21 | input: null | webapp/controller/app.controller.js:17:21:17:48 | oModel. ... input") |
13+
| webapp/controller/app.controller.js:11:11:11:21 | input: null | webapp/view/app.view.xml:5:5:7:28 | value={/input} |
14+
| webapp/controller/app.controller.js:12:11:12:22 | output: null | webapp/view/app.view.xml:8:5:8:37 | content={/output} |
15+
| webapp/controller/app.controller.js:14:22:14:41 | new JSONModel(oData) | webapp/view/app.view.xml:8:5:8:37 | content={/output} |
16+
| webapp/controller/app.controller.js:17:13:17:17 | input | webapp/controller/app.controller.js:18:30:18:34 | input |
17+
| webapp/controller/app.controller.js:17:21:17:48 | oModel. ... input") | webapp/controller/app.controller.js:17:13:17:17 | input |
18+
| webapp/controller/app.controller.js:18:30:18:34 | input | webapp/utils/LogEntriesToHttp.js:7:23:7:41 | Log.getLogEntries() |
19+
| webapp/utils/LogEntriesToHttp.js:7:13:7:19 | message | webapp/utils/LogEntriesToHttp.js:11:19:11:25 | message |
20+
| webapp/utils/LogEntriesToHttp.js:7:23:7:41 | Log.getLogEntries() | webapp/utils/LogEntriesToHttp.js:7:13:7:19 | message |
21+
| webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:11:11:11:21 | input: null |
22+
| webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:14:22:14:41 | new JSONModel(oData) |
23+
| webapp/view/app.view.xml:8:5:8:37 | content={/output} | webapp/controller/app.controller.js:12:11:12:22 | output: null |
24+
#select
25+
| webapp/utils/LogEntriesToHttp.js:11:19:11:25 | message | webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/utils/LogEntriesToHttp.js:11:19:11:25 | message | Outbound network request depends on $@ log data. | webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
nodes
2+
| webapp/controller/app.controller.js:8:11:8:21 | input: null |
3+
| webapp/controller/app.controller.js:14:13:14:17 | input |
4+
| webapp/controller/app.controller.js:14:21:14:48 | oModel. ... input") |
5+
| webapp/controller/app.controller.js:17:19:17:23 | input |
6+
| webapp/controller/app.controller.js:20:33:20:41 | oLogEntry |
7+
| webapp/controller/app.controller.js:24:23:24:31 | oLogEntry |
8+
| webapp/controller/app.controller.js:24:23:24:39 | oLogEntry.message |
9+
| webapp/view/app.view.xml:5:5:7:28 | value={/input} |
10+
| webapp/view/app.view.xml:8:5:8:37 | content={/output} |
11+
edges
12+
| webapp/controller/app.controller.js:8:11:8:21 | input: null | webapp/controller/app.controller.js:14:21:14:48 | oModel. ... input") |
13+
| webapp/controller/app.controller.js:8:11:8:21 | input: null | webapp/view/app.view.xml:5:5:7:28 | value={/input} |
14+
| webapp/controller/app.controller.js:9:11:9:22 | output: null | webapp/view/app.view.xml:8:5:8:37 | content={/output} |
15+
| webapp/controller/app.controller.js:11:22:11:41 | new JSONModel(oData) | webapp/view/app.view.xml:8:5:8:37 | content={/output} |
16+
| webapp/controller/app.controller.js:14:13:14:17 | input | webapp/controller/app.controller.js:17:19:17:23 | input |
17+
| webapp/controller/app.controller.js:14:21:14:48 | oModel. ... input") | webapp/controller/app.controller.js:14:13:14:17 | input |
18+
| webapp/controller/app.controller.js:17:19:17:23 | input | webapp/controller/app.controller.js:20:33:20:41 | oLogEntry |
19+
| webapp/controller/app.controller.js:20:33:20:41 | oLogEntry | webapp/controller/app.controller.js:24:23:24:31 | oLogEntry |
20+
| webapp/controller/app.controller.js:24:23:24:31 | oLogEntry | webapp/controller/app.controller.js:24:23:24:39 | oLogEntry.message |
21+
| webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:8:11:8:21 | input: null |
22+
| webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:11:22:11:41 | new JSONModel(oData) |
23+
| webapp/view/app.view.xml:8:5:8:37 | content={/output} | webapp/controller/app.controller.js:9:11:9:22 | output: null |
24+
#select
25+
| webapp/controller/app.controller.js:24:23:24:39 | oLogEntry.message | webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:24:23:24:39 | oLogEntry.message | Outbound network request depends on $@ log data. | webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided |

0 commit comments

Comments
 (0)