Fix issues with the recent template factory refactor and @ember/test-helpers v1.6.0#18168
Merged
Merged
Conversation
b598002 to
1da52ec
Compare
741f445 to
6bd7fff
Compare
This was referenced Jul 3, 2019
added 2 commits
July 3, 2019 01:25
This fix allows _either_ `owner.lookup('template:foo')` or
`owner.lookup('template:foo')(owner)` to be passed as the `template`
property in `outletState.render`. This ensures that existing versions of
`@ember/test-helpers` work properly before and after the recent template
factory refactors.
6bd7fff to
7d139a7
Compare
buschtoens
reviewed
Jul 3, 2019
| if (template === undefined) return null; | ||
|
|
||
| // this guard can be removed once @ember/test-helpers@1.6.0 has "aged out" | ||
| // and is no longer considered supported |
Contributor
There was a problem hiding this comment.
So is the intention to still merge and release emberjs/ember-test-helpers#677 or to rather make a new backwards-incompatible release of @ember/test-helpers that drops support for all Ember versions prior to #18096? 🤔
Member
Author
There was a problem hiding this comment.
Ya, I still think we should still land emberjs/ember-test-helpers#677.
krisselden
approved these changes
Jul 4, 2019
| export type StaticTemplate = SerializedTemplateWithLazyBlock<StaticTemplateMeta>; | ||
| export type OwnedTemplate = Template<OwnedTemplateMeta>; | ||
|
|
||
| export function isTemplateFactory(template: OwnedTemplate | Factory): template is Factory { |
Contributor
There was a problem hiding this comment.
Should we rename the interface below to TemplateFactory?
Contributor
|
We have a test that is hanging in the browserstack tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR does two main things:
@ember/test-helpers@1.6.0does forsetupRenderingTesttype of tests{{outlet}}component manager when the result ofowner.lookupis passed directly into the outlet state (which is what@ember/test-helpershas done for most of the 1.x series)I do personally think the fix/workaround is "fine" to leave in for quite some time, but it can be removed after
@ember/test-helpers@1.6.0is "aged out" and no longer supported.