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

Expose generator-jhipster/test/support folder for blueprints #25384

Closed
1 task done
dwarakaprasad opened this issue Mar 1, 2024 · 2 comments · Fixed by #25393
Closed
1 task done

Expose generator-jhipster/test/support folder for blueprints #25384

dwarakaprasad opened this issue Mar 1, 2024 · 2 comments · Fixed by #25393

Comments

@dwarakaprasad
Copy link
Contributor

Overview of the feature request

I am creating a blueprint that will extend angular and server generator. It will be really helpful in unit testing if blueprints have access to generator-jhipster/test/**

jhipster's generator spec for example angular builds config samples with possible combinations using this test support. This makes writing unit tests extremely fast and super simple (thanks to @mshima), but unfortunately these test supports are not exposed.

Currently all possible combinations will have to be created manually which seems redundant.

Related issues or PR
  • Checking this box is mandatory (this is just to show you read everything)
@mshima
Copy link
Member

mshima commented Mar 1, 2024

The main reason for the matrix at main generator is to test files snapshots during refactoring.
Blueprints have a much smaller feature matrix.
If prettier/eslint is enabled during tests (not enabled at main generator due to slowness) you could check if the files are valid.

Feel free to raise a PR moving the matrix from test folder to testing (already exposed) folder.

@dwarakaprasad
Copy link
Contributor Author

@mshima , I did not move the files into testing as that will require a good deal of import refactoring, so left theme as is but exposed them tro /testing.

dwarakaprasad added a commit to dwarakaprasad/generator-jhipster that referenced this issue Mar 3, 2024
dwarakaprasad added a commit to dwarakaprasad/generator-jhipster that referenced this issue Mar 8, 2024
dwarakaprasad added a commit to dwarakaprasad/generator-jhipster that referenced this issue Mar 11, 2024
mshima added a commit that referenced this issue Mar 12, 2024
* move check-enforcements back into test/support

introduced #25384
fixes #25454

* allow blueprint's test to set custom packagePath

fixes #25454

* adjust withParentBlueprintLookup test support

fixes #25454

* accept suggested chnages

* accept comment suggestion

Co-authored-by: Marcelo Shima <[email protected]>

---------

Co-authored-by: Marcelo Shima <[email protected]>
@deepu105 deepu105 added this to the 8.2.0 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment