[BUGFIX release] Updated blueprints for component and helper tests to output the correct hbs import statement #18691
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR closes #18626.
Tests
I wanted to write tests per contributing guide, but couldn't figure out how to make
this.project.addons
includeember-cli-htmlbars
in a test. Currently, there isn't a test that checks the component test when the version ofember-cli-htmlbars
is at least4.0.0-alpha.1
, so I didn't have an example that I could follow.It seemed like
ember-cli-blueprint-test-helpers
currently doesn't support updating theaddons
attribute (https://github.com/ember-cli/ember-cli-blueprint-test-helpers/blob/master/lib/modify-packages.js#L20-L26). If I missed something and settingaddons
is possible, please let me know and I'd be happy to add tests.I did manually test locally using
yarn link ember-source
on a new Ember 3.15 project. If the version ofember-cli-htmlbars
is at least4.0.0-alpha.1
, the generators will add the named import statement. If the version is less, or ifember-cli-htmlbars
doesn't exist, the generators will add the default import statement.