Skip to content

test: add an internal helper to populate document.head before a test #46250

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

Closed

Conversation

AndrewKushnir
Copy link
Contributor

This commit reuses the logic of the withBody helper and implements the withHead based on it.The helper method is useful for tests that rely on a certain tags being present in document's <head> element.

This need was caused by the logic in the NgOptimizedImage directive in the #46053. The newly added function is an internal helper (not a public API).

PR Type

What kind of change does this PR introduce?

  • Other... Please describe: testing-related changes

Does this PR introduce a breaking change?

  • Yes
  • No

…ioning render3)

This commit renames the packages/private/testing/src/render3.ts -> packages/private/testing/src/utils.ts to avoid using the `render3` term as it used to differentiate VE and Ivy, which is no longer relevant.
This commit reuses the logic of the `withBody` helper and implements the `withHead` based on it.The helper method is useful for tests that rely on a certain tags being present in document's `<head>` element.
@AndrewKushnir AndrewKushnir added area: testing Issues related to Angular testing features, such as TestBed action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jun 3, 2022
@ngbot ngbot bot modified the milestone: Backlog Jun 3, 2022
@pullapprove pullapprove bot requested review from josephperrott June 3, 2022 19:15
@AndrewKushnir AndrewKushnir requested a review from alxhub June 6, 2022 17:17
Copy link
Member

@josephperrott josephperrott 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

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Jun 6, 2022
@AndrewKushnir AndrewKushnir removed the request for review from alxhub June 6, 2022 19:23
@alxhub
Copy link
Member

alxhub commented Jun 6, 2022

This PR was merged into the repository by commit 627cdf3.

alxhub pushed a commit that referenced this pull request Jun 6, 2022
…ioning render3) (#46250)

This commit renames the packages/private/testing/src/render3.ts -> packages/private/testing/src/utils.ts to avoid using the `render3` term as it used to differentiate VE and Ivy, which is no longer relevant.

PR Close #46250
alxhub pushed a commit that referenced this pull request Jun 6, 2022
…46250)

This commit reuses the logic of the `withBody` helper and implements the `withHead` based on it.The helper method is useful for tests that rely on a certain tags being present in document's `<head>` element.

PR Close #46250
@alxhub alxhub closed this in 8c15eea Jun 6, 2022
alxhub pushed a commit that referenced this pull request Jun 6, 2022
…46250)

This commit reuses the logic of the `withBody` helper and implements the `withHead` based on it.The helper method is useful for tests that rely on a certain tags being present in document's `<head>` element.

PR Close #46250
@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 Jul 7, 2022
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 area: testing Issues related to Angular testing features, such as TestBed target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants