-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add Test Starter #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there indeed no additional resources (e.g. chapters in the documentation) about the test starter?
In general, I believe there is still some explanation needed so beginners can understand and extrapolate from the tutorial to their use cases.
In addition, the link for previewing this step on the github page is not adapted also file test/unit/unitTests-cdn.qunit.html was deleted. I would assume that two additional files (testsuite-cdn.qunit.html and Test-cdn.qunit.hmtl) are still needed to compliment this step.
Also, in the readme we would need a new image (or rather link) for the folder structure, as the current one does not fit anymore.
What is the minimum OpenUI5 version required for the test starter? |
Regarding additional resources, these Dev Guide chapters could be helpful (and is linked in Step 27) Regarding the link for previewing this step on the github page: I don't fully understand. How exactly does this preview work? The Regarding the deletion of the two cdn files. I assumed these two files are not necessary anymore with the introduction of the Test Starter. A new image of the new folder structure is indeed necessary and will be added by UA colleagues. |
1782e0b
to
ac5f6fa
Compare
@margopolo AFAIK, minimal version for using it in apps is 1.124. |
* test: add CDN testsuite files * refactor: remove whitespace from legacy HelloDialogFragment.xml + mockserver.html
ac5f6fa
to
93dc5fd
Compare
`animationMode: minimal` is not required and not setting it simplifies the config.
387a9a8
to
c3475e2
Compare
Now it's ready for review. We'll update the other steps once the content is approved to keep the changes for review as small as possible. Only steps 27 and 28 make changes in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LilyanaOviPe could please have a look
|
||
### Conventions | ||
|
||
- All unit tests are placed in the webapp/test/unit folder of the app. | ||
|
||
- Files in the test suite end with `*.qunit.html`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add testsuite naming convention (testsuite.*.qunit.js
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
steps/27/README.md
Outdated
@@ -82,34 +85,33 @@ QUnit.test("Should return the translated texts", (assert) => { | |||
### webapp/test/unit/unitTests.qunit.ts \(New\) | |||
|
|||
We create a new `unitTests.qunit.ts` file under `webapp/test/unit/`. | |||
This script loads and executes our formatter test. Before the QUnit test execution can be started we need to wait until the Core has been booted. Therefore, you need to disable the autostart `QUnit.config.autostart = false;`, require the `sap/ui/core/Core` module and use `Core.ready()` to wait until the Core has booted and then you can start the QUnit tests with `QUnit.start()`. | |||
This module is the entrypoint for all our unit tests and will be referenced in the test suite that will be created later on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow the explanation about the implementation in the file itself got lost. How about to change the description to:
This module will serve as the entry point for all our unit tests. It will be referenced in the test suite that we will set up later on.
Inside the unitTests.qunit.ts
file, we import the unit test for the custom formatter. This ensures that any tests related to the custom formatter functionality will be included when running our unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍🏻 I've update it as suggested.
@@ -97,7 +97,11 @@ import "./model/formatter"; | |||
|
|||
### webapp/test/Test.qunit.html \(New\) | |||
|
|||
We also need a generic test page to run our tests. This is necessary as the namespace of the test code needs to be registered via the `data-sap-ui-resource-roots` attribute. The page will also be referenced in the test suite, which we're going to create next. | |||
We also need a generic test page that will be used to run individual tests. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have here one additional sentence about the src="../resources/sap/ui/test/starter/runTest.js" script that is initialized in the script tag? Would be good to also mention what this script is for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Please do not merge yet. I will now update the files in all following steps. |
Ready for final review |
Dev Guide explaining Test Starter: https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb
JIRA: CPOUI5FOUNDATION-819