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

fix(ivy): implement 'TestBed.overrideTemplateUsingTestingModule' function #27717

Conversation

AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Dec 17, 2018

Adding 'TestBed.overrideTemplateUsingTestingModule' function that overrides Component template and uses TestingModule as a scope.

Update (12/25): rebased from the latest master.

This PR resolves FW-851.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release comp: ivy labels Dec 17, 2018
@ngbot ngbot bot added this to the needsTriage milestone Dec 17, 2018
@mary-poppins
Copy link

You can preview 8a6afb1 at https://pr27717-8a6afb1.ngbuilds.io/.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with two comments.

return meta;
const hasTemplateOverride = !!type && this._templateOverrides.has(type);
if (hasTemplateOverride) {
overrides.template = this._templateOverrides.get(type !);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clear out templateUrl here too.

packages/core/testing/src/r3_test_bed.ts Outdated Show resolved Hide resolved
@mary-poppins
Copy link

You can preview b2cf895 at https://pr27717-b2cf895.ngbuilds.io/.

…tion

Adding 'TestBed.overrideTemplateUsingTestingModule' function that overrides Component template and uses TestingModule as a scope.
@AndrewKushnir AndrewKushnir force-pushed the FW-851_override_template_using_testing_module branch from b2cf895 to b105ccc Compare December 25, 2018 21:56
@mary-poppins
Copy link

You can preview b105ccc at https://pr27717-b105ccc.ngbuilds.io/.

@AndrewKushnir
Copy link
Contributor Author

AndrewKushnir commented Dec 26, 2018

Presubmit

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 27, 2018
@kara kara closed this in 38b4d15 Jan 4, 2019
devversion pushed a commit to devversion/angular that referenced this pull request Jan 9, 2019
…tion (angular#27717)

Adding 'TestBed.overrideTemplateUsingTestingModule' function that overrides Component template and uses TestingModule as a scope.

PR Close angular#27717
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…tion (angular#27717)

Adding 'TestBed.overrideTemplateUsingTestingModule' function that overrides Component template and uses TestingModule as a scope.

PR Close angular#27717
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants