ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

wdi5 ts init adds wrong ui5 type devDependency #610

Closed heimwege closed 4 months ago

heimwege commented 4 months ago

Describe the bug The easy ui5 generator includes a sub-generator that handles the wdi5 integration into the generated app. This mostly consists of npm init wdi5 -- --ts. Init wdi5 seems to hard coded introduce a devDependency to the latest version of @openui5/types. But in the context of the easy ui5 generator the user can select between sapui5 and openui5 and also which specific version to be used.

See also my initial issue for the ui5 ts app generator: https://github.com/ui5-community/generator-ui5-ts-app/issues/33

I think this is caused here: https://github.com/ui5-community/create-wdi5/blob/main/src%2Findex.ts#L20 so maybe this is the wrong repo for this issue šŸ™ˆ

To Reproduce yo easy-ui5 -> select generator ts-app and follow the instructions. select sapui5 (e.g. 1.120.11) and have a look at the package.json afterwards.

Expected behavior Depending on the selection in the easy ui5 generator either @openui5/types or @sapui5/types should be included as devDependency in the version entered in the respective generator step.

petermuessig commented 4 months ago

Hi @heimwege

Yes, this is the wrong repo - it should be moved to the create-wdi5 repository. But the issue is valid. In case of the UI5 generators added the types already, they must not be added additionally. This should be checked in the generator steps.

heimwege commented 4 months ago

Thanks for the confirmation @petermuessig I created a new issue in the wdi5-create repo. Let's close this one.