@@ -43,7 +43,7 @@ This feature will allow developers to serve and build multiple UI5 application c
4343
4444If you have an existing application that you'd like to migrate to the Component Type, follow these steps:
4545
46- #### 1. Update ui5.yaml Configuration
46+ #### 1. Update ` ui5.yaml ` Configuration
4747
4848Update your ` ui5.yaml ` file to use the Component Type and Specification Version 5.0:
4949
@@ -102,6 +102,87 @@ my-app/
102102` ` `
103103:: :
104104
105+ # ### 3. Adjust `index.html`
106+
107+ The `index.html` file is typically moved from `/webapp` to `/test` since it's primarily used for testing the component.
108+
109+ Update the bootstrap script path and remove the obsolete `data-sap-ui-resourceroots` configuration :
110+
111+ :: : code-group
112+ ` ` ` html [Before (webapp/index.html)]
113+ <script
114+ id="sap-ui-bootstrap"
115+ src="resources/sap-ui-core.js"
116+ data-sap-ui-libs="sap.m"
117+ data-sap-ui-theme="sap_horizon"
118+ data-sap-ui-resourceroots='{
119+ "sap.ui.demo.todo": "./"
120+ }'
121+ data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
122+ data-sap-ui-async="true">
123+ </script>
124+ ` ` `
125+
126+ ` ` ` html [After (test/index.html)]
127+ <script
128+ id="sap-ui-bootstrap"
129+ src="../../../../../resources/sap-ui-core.js"
130+ data-sap-ui-libs="sap.m"
131+ data-sap-ui-theme="sap_horizon"
132+ data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
133+ data-sap-ui-async="true">
134+ </script>
135+ ` ` `
136+ :: :
137+
138+
139+ # ### 4. Adjust `testsuite.qunit.html`
140+
141+ Simplify the test suite HTML by removing obsolete bootstrap attributes :
142+
143+ :: : code-group
144+ ` ` ` html [Before (webapp/test/testsuite.qunit.html)]
145+ <!DOCTYPE html>
146+ <html>
147+ <head>
148+ <meta charset="utf-8">
149+ <title>QUnit test suite for Todo App</title>
150+ <script
151+ src="../resources/sap/ui/test/starter/createSuite.js"
152+ data-sap-ui-testsuite="test-resources/sap/ui/demo/todo/testsuite.qunit"
153+ data-sap-ui-resourceroots='{
154+ "test-resources.sap.ui.demo.todo": "./"
155+ }'
156+ ></script>
157+ </head>
158+ <body>
159+ </body>
160+ </html>
161+ ` ` `
162+
163+ ` ` ` html [After (test/testsuite.qunit.html)]
164+ <!DOCTYPE html>
165+ <html>
166+ <head>
167+ <meta charset="utf-8">
168+ <title>QUnit test suite for Todo App</title>
169+ <script src="../../../../../resources/sap/ui/test/starter/createSuite.js"></script>
170+ </head>
171+ <body>
172+ </body>
173+ </html>
174+ ` ` `
175+ :: :
176+
177+ **Changes:**
178+ - Remove the `data-sap-ui-testsuite` attribute
179+ - Remove the `data-sap-ui-resourceroots` attribute
180+ - Update the `src` path to the correct relative location
181+
182+ # ### 5. Delete Obsolete Test Files
183+
184+ Delete the custom `Test.qunit.html` file from your test directory. This file is no longer needed. The framework-provided test page can now be used directly.
185+
105186
106187# # Learn More
107188
0 commit comments