Skip to content

Commit 4826acd

Browse files
akudevmatz3
authored andcommitted
fix(ui5_create_app): Add test/preview.html with frame-options="allow"
For preview in dev environments embedding the app in a frame
1 parent 4e9032e commit 4826acd

File tree

7 files changed

+173
-0
lines changed

7 files changed

+173
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
5+
<meta http-equiv="Pragma" content="no-cache" />
6+
<meta http-equiv="expires" content="0" />
7+
<meta charset="utf-8" />
8+
9+
<title>UI5 Application: <%= namespace %></title>
10+
11+
<!-- The 'data-sap-ui-frameOptions="allow"' in the UI5 bootstrap is a NON-SECURE setting for test environments -->
12+
<script
13+
id="sap-ui-bootstrap"
14+
src="https://<%= cdnDomain %>/<%= frameworkVersion %>/resources/sap-ui-core.js"<% if (gte1_120_0) { %>
15+
data-sap-ui-resource-roots='{
16+
"<%= appId %>": "../"
17+
}'
18+
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
19+
data-sap-ui-compat-version="edge"
20+
data-sap-ui-frame-options="allow"<% } else { %>
21+
data-sap-ui-theme="<%= defaultTheme %>"
22+
data-sap-ui-resourceroots='{
23+
"<%= appId %>": "../"
24+
}'
25+
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
26+
data-sap-ui-compatVersion="edge"
27+
data-sap-ui-frameOptions="allow"<% } %>
28+
data-sap-ui-async="true"
29+
></script>
30+
</head>
31+
32+
<body class="sapUiBody">
33+
<div data-sap-ui-component data-name="<%= appId %>"></div>
34+
</body>
35+
</html>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
5+
<meta http-equiv="Pragma" content="no-cache" />
6+
<meta http-equiv="expires" content="0" />
7+
<meta charset="utf-8" />
8+
9+
<title>UI5 Application: <%= namespace %></title>
10+
11+
<!-- The 'data-sap-ui-frameOptions="allow"' in the UI5 bootstrap is a NON-SECURE setting for test environments -->
12+
<script
13+
id="sap-ui-bootstrap"
14+
src="https://<%= cdnDomain %>/<%= frameworkVersion %>/resources/sap-ui-core.js"<% if (gte1_120_0) { %>
15+
data-sap-ui-resource-roots='{
16+
"<%= appId %>": "../"
17+
}'
18+
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
19+
data-sap-ui-compat-version="edge"
20+
data-sap-ui-frame-options="allow"<% } else { %>
21+
data-sap-ui-theme="<%= defaultTheme %>"
22+
data-sap-ui-resourceroots='{
23+
"<%= appId %>": "../"
24+
}'
25+
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
26+
data-sap-ui-compatVersion="edge"
27+
data-sap-ui-frameOptions="allow"<% } %>
28+
data-sap-ui-async="true"
29+
></script>
30+
</head>
31+
32+
<body class="sapUiBody">
33+
<div data-sap-ui-component data-name="<%= appId %>"></div>
34+
</body>
35+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
5+
<meta http-equiv="Pragma" content="no-cache" />
6+
<meta http-equiv="expires" content="0" />
7+
8+
<meta charset="utf-8" />
9+
10+
<title>UI5 Application: <%= namespace %></title>
11+
12+
<!-- The 'data-sap-ui-frameOptions="allow"' in the UI5 bootstrap is a NON-SECURE setting for test environments -->
13+
<script
14+
id="sap-ui-bootstrap"
15+
src="https://<%= cdnDomain %>/<%= frameworkVersion %>/resources/sap-ui-core.js"<% if (gte1_120_0) { %>
16+
data-sap-ui-resource-roots='{
17+
"<%= appId %>": "../"
18+
}'
19+
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
20+
data-sap-ui-compat-version="edge"
21+
data-sap-ui-frame-options="allow"<% } else { %>
22+
data-sap-ui-theme="<%= defaultTheme %>"
23+
data-sap-ui-resourceroots='{
24+
"<%= appId %>": "../"
25+
}'
26+
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
27+
data-sap-ui-compatVersion="edge"
28+
data-sap-ui-frameOptions="allow"<% } %>
29+
data-sap-ui-async="true"
30+
></script>
31+
</head>
32+
33+
<body class="sapUiBody">
34+
<div data-sap-ui-component data-name="<%= appId %>"></div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
5+
<meta http-equiv="Pragma" content="no-cache" />
6+
<meta http-equiv="expires" content="0" />
7+
8+
<meta charset="utf-8" />
9+
10+
<title>UI5 Application: <%= namespace %></title>
11+
12+
<!-- The 'data-sap-ui-frameOptions="allow"' in the UI5 bootstrap is a NON-SECURE setting for test environments -->
13+
<script
14+
id="sap-ui-bootstrap"
15+
src="https://<%= cdnDomain %>/<%= frameworkVersion %>/resources/sap-ui-core.js"<% if (gte1_120_0) { %>
16+
data-sap-ui-resource-roots='{
17+
"<%= appId %>": "../"
18+
}'
19+
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
20+
data-sap-ui-compat-version="edge"
21+
data-sap-ui-frame-options="allow"<% } else { %>
22+
data-sap-ui-theme="<%= defaultTheme %>"
23+
data-sap-ui-resourceroots='{
24+
"<%= appId %>": "../"
25+
}'
26+
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
27+
data-sap-ui-compatVersion="edge"
28+
data-sap-ui-frameOptions="allow"<% } %>
29+
data-sap-ui-async="true"
30+
></script>
31+
</head>
32+
33+
<body class="sapUiBody">
34+
<div data-sap-ui-component data-name="<%= appId %>"></div>
35+
</body>
36+
</html>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
5+
<meta http-equiv="Pragma" content="no-cache" />
6+
<meta http-equiv="expires" content="0" />
7+
8+
<meta charset="utf-8" />
9+
10+
<title>UI5 Application: com.test.apiapp</title>
11+
12+
<!-- The 'data-sap-ui-frameOptions="allow"' in the UI5 bootstrap is a NON-SECURE setting for test environments -->
13+
<script
14+
id="sap-ui-bootstrap"
15+
src="https://ui5.sap.com/1.136.0/resources/sap-ui-core.js"
16+
data-sap-ui-resource-roots='{
17+
"com.test.apiapp": "../"
18+
}'
19+
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
20+
data-sap-ui-compat-version="edge"
21+
data-sap-ui-frame-options="allow"
22+
data-sap-ui-async="true"
23+
></script>
24+
</head>
25+
26+
<body class="sapUiBody">
27+
<div data-sap-ui-component data-name="com.test.apiapp"></div>
28+
</body>
29+
</html>

test/lib/tools/create_ui5_app/snapshots/create_ui5_app.integration.ts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Generated by [AVA](https://avajs.dev).
4848
'webapp/test/integration/HelloJourney.ts',
4949
'webapp/test/integration/opaTests.qunit.ts',
5050
'webapp/test/integration/pages/MainPage.ts',
51+
'webapp/test/preview.html',
5152
'webapp/test/Test.qunit.html',
5253
'webapp/test/testsuite.qunit.html',
5354
'webapp/test/testsuite.qunit.ts',
@@ -103,6 +104,7 @@ Generated by [AVA](https://avajs.dev).
103104
'webapp/test/integration/HelloJourney.js',
104105
'webapp/test/integration/opaTests.qunit.js',
105106
'webapp/test/integration/pages/Main.js',
107+
'webapp/test/preview.html',
106108
'webapp/test/Test.qunit.html',
107109
'webapp/test/testsuite.qunit.html',
108110
'webapp/test/testsuite.qunit.js',
Binary file not shown.

0 commit comments

Comments
 (0)