Skip to content
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

[Fiori Freestyle] The generated Component.js in the basic template has an invalid import if its app Id contains more than one dot #70

Closed
1 of 4 tasks
tobiasqueck opened this issue Sep 28, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tobiasqueck
Copy link
Contributor

Bug Description

If you use the fiori-freestyle templates - basic template and generate a project while providing an application ID with more than one dot e.g. my.demo.App then the model import in the generated Component.js is broken because only the first. is replaced with a /.

Expected Behavior

The Component.js works and all the dots are properly replaced.

Steps to Reproduce

  1. Modify the configuration in test/basic.test.ts to use my.demo.App as config>app>id value
  2. Run the test
  3. Check the test test-output/basicTemplate/**/Component.js
  4. See see issue in the imports at the beginning of the file

Context

  • OS/Platform: any
  • Browser: independent
  • Affected component: fiori-freestyle

Log Output / Stack Trace / Screenshots

Priority

  • Low
  • Medium
  • High
  • Very High

Stakeholder Info (if applicable)

Reported by @vobu

@tobiasqueck
Copy link
Contributor Author

Issue verified, following steps required:

  1. Fix https://github.com/SAP/open-ux-tools/blob/main/packages/fiori-freestyle/templates/basic/add/webapp/Component.js#L4
  2. Modify https://github.com/SAP/open-ux-tools/blob/main/packages/fiori-freestyle/test/basic.test.ts#L18 to test with an ID that has multiple dots
  3. Update the test snapshots
  4. Check the rest of the code for a similar replace issues.

@tobiasqueck tobiasqueck added the bug Something isn't working label Sep 29, 2021
vobu pushed a commit to vobu/open-ux-tools-1 that referenced this issue Sep 29, 2021
- in Component.js template
- accompanying test

closes SAP#70
devinea added a commit that referenced this issue Oct 5, 2021
* main:
  update(FF): Updates FF Worklist controllers and tests (#63)
  fix: app-id creation at scaffolding time in Component.js (fixes #70) (#77)
  Add Node V16 build and compatibility (#64)
  chore: set version of all modules to v0.9.0 (#71)
  chore: add github codeowners file (#58)

# Conflicts:
#	.github/workflows/pipeline.yml
#	packages/fiori-freestyle/package.json
#	pnpm-lock.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant