-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat(testing): add wdi5 e2e scope #23
base: testing
Are you sure you want to change the base?
Conversation
move to "draft" status, b/c should only be merge once |
This "helloworld" repository started out with a different focus and indeed I have had also difficulties to convey this towards @petermuessig before. I think it works best like this: Initially this repo was meant to describe the TypeScript setup as such. Which additional files are needed, what do they need to contain, to have TS code translated to JS in a UI5 app. Yes, there was also a minimal UI5 app contained, but only to have some code to compile, not to show how TS app content should look. Consequently, the documentation focused on a few steps that created those setup-relevant files like the tsconfig and the babelrc. Now with the testing content added by Peter and more so with the wdi5 content, it turns more and more into a sample how all kinds of aspects should look inside a UI5 app written in TypeScript, the focus on how the setup works under the hood is gone. And that's ok. We need such a sample, after all, plus it's getting less and less important to understand how the build pipeline works, with ui5-tooling-transpile wrapping the transpilation and making configuration unnecessary and also with Easy UI5 setting everything up for most users. The only thing is that the once central part of this repo - https://github.com/SAP-samples/ui5-typescript-helloworld/blob/main/step-by-step.md - gets more and more anachronistic with this transition. This page was meant to get to successful TS transpilation from scratch, not anything beyond that. It still says "Note that the scope of this tutorial is the TypeScript setup of a project, not the application code itself.". So we'll need to see how to describe that part and whether this is the place where to also describe how all the parts of the app, incl. testing should be described. TL;DR: yep, all is good, go ahead, but I'll need to check where and how to describe best how the transpilation process works under the hood. |
here we are :) |
> ], | ||
>``` | ||
> | ||
> Why? TypeScript automatically finds all type definition files in a dependency starting with `@types/...` (i.e. all `.d.ts` files in `node_modules/@types/...`). The jQuery d.ts files are there and found, but the SAPUI5 types are only available in a package starting with `@sapui5/...`, hence TypeScript must be explicitly pointed to these types. As this disables the automatic loading of other types from `node_modules/@types/...`, this path must be given as a type root. | ||
> Why? TypeScript automatically finds all type definition files in a dependency starting with `@types/...` (i.e. all `.d.ts` files in `node_modules/@types/...`). The jQuery d.ts files are there and found, but the SAPUI5 types are only available in a package starting with `@sapui5/...`, hence TypeScript must be explicitly pointed to these types. As this disables the automatic loading of other types from `node_modules/@types/...`, this path must also be given as a type root. |
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.
Hm, after removing the "types" section, this sentence does no longer apply. However, I think the current recommendation is using types
, not typeRoots
. Peter?
Apart from few minor comments, the code itself is fine for me. |
adds
wdi5
for e2e tests: