Skip to content

Commit

Permalink
docs: incorporate feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Nov 14, 2024
1 parent 5d2b193 commit 8344270
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion steps/01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ In our webapp folder, we create a new HTML file named `index.html` and copy the

### webapp/manifest.json \(New\)

The manifest file, also known as the "descriptor" or "app descriptor," serves as a crucial configuration file for applications, components, and libraries. Stored in the `webapp` folder, this file is read by OpenUI5 to instantiate a component. Although we haven't created a component yet (which is part of [Step 9: Component Configuration](../09/README.md)), we need to create the app descriptor already now, because UI5 Tooling , whichwe intend to use for development, also requires an app descriptor.
The manifest file, also known as the "descriptor" or "app descriptor," serves as a crucial configuration file for applications, components, and libraries. Stored in the `webapp` folder, this file is read by OpenUI5 to instantiate a component.Although we haven't created a component yet (which is part of [Step 9: Component Configuration](../09/README.md)), we need to create the app descriptor now because the UI5 Tooling we intend to use for development also requires it.

Hence, we create a new file called `manifest.json` in the webapp folder and define its essential attributes:

Expand Down
12 changes: 6 additions & 6 deletions steps/27/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The new formatter file just contains one QUnit module for our formatter function
Finally, we perform our assertions. We check each branch of the formatter logic by invoking the isolated formatter function with the values that we expect in the data model \(`A`, `B`, `C`, and everything else\). We strictly compare the result of the formatter function with the hard-coded strings that we expect from the resource bundle and give a meaningful error message if the test should fail.

> 📝 **Note:** <br>
> Test code needs to import modules under test (i.e. productive code) via their full namespace (in our case `ui5/walkthrough/`), not via relative paths as test code uses a different namespace (`test-resources/ui5/walkthrough/`).
> Test code needs to import the modules under test (i.e. productive code) using their full namespace (in our case `ui5/walkthrough/`), rather than using relative paths. This is because the test code uses a different namespace (`test-resources/ui5/walkthrough/`).
```ts
import ResourceModel from "sap/ui/model/resource/ResourceModel";
Expand Down Expand Up @@ -101,9 +101,9 @@ We also need a generic test page that will be used to run individual tests.

It includes the `sap/ui/test/starter/runTest.js` script which is responsible for loading the test suite configuration and starting the test.

Unlike with the UI5 bootstrap, the script only accepts the `data-sap-ui-resource-roots` configuration where we need to register our project specific test namespace so that our modules can be loaded.
Unlike with the UI5 bootstrap, this script only accepts the `data-sap-ui-resource-roots` configuration where we need to register our project-specific test namespace so that our modules can be loaded.

The page will be referenced in the test suite, which we're going to create next.
The page will be referenced in the test suite that we will create next.

```html
<!DOCTYPE html>
Expand All @@ -128,9 +128,9 @@ The page will be referenced in the test suite, which we're going to create next.

### webapp/test/testsuite.qunit.ts \(New\)

The `testsuite.qunit.ts` file contains the configuration of our test suite.
Although it comes with a set of defaults, it is recommended to configure the used QUnit version so that potential future updates do not break our tests.
In addition the `sap_horizon` theme is configured in the `ui5` section where the UI5 runtime configuration can be provided.
The `testsuite.qunit.ts` file contains the configuration for our test suite.
Although it comes with a set of defaults, we recommend specifying the used QUnit version to prevent potential future updates from breaking our tests.
Additionally, the `sap_horizon` theme is configured in the `ui5` section, where you can provide the UI5 runtime configuration.

The test suite serves as the entry point for all tests within our project such as the previously created `unit/unitTests` (The `.qunit.ts` extension is omitted and will be added automatically during runtime).

Expand Down
2 changes: 1 addition & 1 deletion steps/28/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default {
};
```

If we now open the `webapp/test/testsuite.qunit.html` file in the browser and select select `integration/opaTests`, we should see the QUnit layout and a test “Should see the Hello dialog” is executed immediately. It will load the app component on the right side of the page. There you can see what operations the test is performing on the app, if everything works correctly the button click is triggered, then a dialog is shown and the test case is green.
If we now open the `webapp/test/testsuite.qunit.html` file in the browser and select `integration/opaTests`, the QUnit layout should appear and a test “Should see the Hello dialog” will run immediately. This action will load the app component on the right side of the page. There you can see the operations the test is performing on the app. If everything works correctly, a button click will be triggered, then a dialog will be displayed and the test case will be green.

***

Expand Down

0 comments on commit 8344270

Please sign in to comment.