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): DebugElement.query when there is a node outside Angular context #32361

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Aug 28, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Ivy throws an error when using DebugElement.query on node where a child was added with document.appendChild

Issue Number: N/A

What is the new behavior?

No error is thrown

Does this PR introduce a breaking change?

  • Yes
  • No

@atscott atscott requested a review from a team as a code owner August 28, 2019 00:08
@atscott atscott 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 labels Aug 28, 2019
@ngbot ngbot bot modified the milestone: needsTriage Aug 28, 2019
@atscott atscott added target: major This PR is targeted for the next major release comp: ivy labels Aug 28, 2019
@atscott
Copy link
Contributor Author

atscott commented Aug 28, 2019

Ivy Presubmit

packages/core/test/debug/debug_node_spec.ts Outdated Show resolved Hide resolved
packages/core/src/debug/debug_node.ts Show resolved Hide resolved
packages/core/test/debug/debug_node_spec.ts Outdated Show resolved Hide resolved
@atscott atscott force-pushed the debugnode branch 2 times, most recently from ddcd5fe to 9aa78cb Compare August 28, 2019 21:59
@atscott atscott requested a review from matsko August 28, 2019 22:00
Copy link
Contributor

@matsko matsko left a comment

Choose a reason for hiding this comment

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

Excellent :)

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.

Some minor nits

packages/core/src/debug/debug_node.ts Outdated Show resolved Hide resolved
packages/core/test/debug/debug_node_spec.ts Outdated Show resolved Hide resolved
@kara kara added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 28, 2019
@atscott atscott requested a review from kara August 29, 2019 01:18
@atscott atscott added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Aug 29, 2019
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

@kara kara added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 29, 2019
@atscott
Copy link
Contributor Author

atscott commented Aug 29, 2019

Presubmit
Ivy presubmit

@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: presubmit The PR is in need of a google3 presubmit labels Aug 29, 2019
@ngbot
Copy link

ngbot bot commented Aug 29, 2019

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/circleci: setup" is failing
    failure status "google3" is failing
    pending missing required status "ci/circleci: build"
    pending missing required status "ci/circleci: lint"
    pending missing required status "ci/circleci: publish_snapshot"
    pending missing required status "ci/angular: size"

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

…ontext

DebugElement.query also searches elements that may have been created
outside of Angular (ex: with `document.appendChild`). The current
behavior attempts to get the LContext of these nodes but throws an error
because the LContext does not exist.
@mhevery mhevery closed this in 260217a Aug 30, 2019
sabeersulaiman pushed a commit to sabeersulaiman/angular that referenced this pull request Sep 6, 2019
…ontext (angular#32361)

DebugElement.query also searches elements that may have been created
outside of Angular (ex: with `document.appendChild`). The current
behavior attempts to get the LContext of these nodes but throws an error
because the LContext does not exist.

PR Close angular#32361
arnehoek pushed a commit to arnehoek/angular that referenced this pull request Sep 26, 2019
…ontext (angular#32361)

DebugElement.query also searches elements that may have been created
outside of Angular (ex: with `document.appendChild`). The current
behavior attempts to get the LContext of these nodes but throws an error
because the LContext does not exist.

PR Close angular#32361
@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 30, 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 area: testing Issues related to Angular testing features, such as TestBed cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note 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

4 participants