Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Merge ComponentFixture behaviors (minus the final commit for detectChanges behavior from #57415) #57416

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

atscott
Copy link
Contributor

@atscott atscott commented Aug 15, 2024

See individual commits

@atscott atscott added the action: global presubmit The PR is in need of a google3 global presubmit label Aug 15, 2024
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Aug 15, 2024
@ngbot ngbot bot added this to the Backlog milestone Aug 15, 2024
@atscott
Copy link
Contributor Author

atscott commented Aug 26, 2024

@atscott atscott force-pushed the mergeFixtureBehaviorMinusDetectChanges branch from 4fc777f to dc41d18 Compare August 26, 2024 18:16
@atscott atscott added target: major This PR is targeted for the next major release and removed action: global presubmit The PR is in need of a google3 global presubmit labels Aug 26, 2024
@atscott atscott marked this pull request as ready for review August 26, 2024 18:26
@atscott atscott requested review from alxhub and removed request for pkozlowski-opensource, thePunderWoman and dylhunn August 26, 2024 18:27
@pullapprove pullapprove bot requested a review from alxhub August 26, 2024 18:28
This commit updates the implementations of `autoDetectChanges` to be
shared between the zone-based and zoneless fixtures. This now allows
`autoDetect` to be turned off for zoneless fixtures after it was
previously on because the host view is no longer directly attached to
`ApplicationRef`.
This commit moves the ngZone onError subscription to the base fixture
implementation. While this subscription isn't necessary for zoneless, it does
no harm because the observable never emits.
This commit removes the abstract base class and two separate
implementations of `ComponentFixture` for zone vs zoneless. Now that the
behaviors have gotten close enough to the same, the diverged concrete
implementations serve less value. Instead, the different behaviors can
be easily handled in if/else branches. The difference is now limited to
the default for `autoDetect` and how `detectChanges` functions.
Disabling `checkNoChanges` in `ComponentFixture.detectChanges` was an
error for the zoneless fixture since it was not yet working. This now
allows checkNoChanges to be disabled. This option isn't really
used/shouldn't be used by anyone except the FW so marked as a refactor.
…eless

When disabling autodetect (not recommeneded) with zoneless,
`fixture.detectChanges` would previously not refresh the fixture's component.
@atscott atscott force-pushed the mergeFixtureBehaviorMinusDetectChanges branch from 6ba0329 to 3788afd Compare August 26, 2024 19:05
@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 labels Aug 26, 2024
@atscott
Copy link
Contributor Author

atscott commented Aug 26, 2024

caretaker note: This doesn't have a true public API change so does not need public API approval

@alxhub
Copy link
Member

alxhub commented Aug 27, 2024

This PR was merged into the repository by commit 0300dd2.

The changes were merged into the following branches: main

@alxhub alxhub closed this in 122af30 Aug 27, 2024
alxhub pushed a commit that referenced this pull request Aug 27, 2024
This commit moves the ngZone onError subscription to the base fixture
implementation. While this subscription isn't necessary for zoneless, it does
no harm because the observable never emits.

PR Close #57416
alxhub pushed a commit that referenced this pull request Aug 27, 2024
This commit removes the abstract base class and two separate
implementations of `ComponentFixture` for zone vs zoneless. Now that the
behaviors have gotten close enough to the same, the diverged concrete
implementations serve less value. Instead, the different behaviors can
be easily handled in if/else branches. The difference is now limited to
the default for `autoDetect` and how `detectChanges` functions.

PR Close #57416
alxhub pushed a commit that referenced this pull request Aug 27, 2024
Disabling `checkNoChanges` in `ComponentFixture.detectChanges` was an
error for the zoneless fixture since it was not yet working. This now
allows checkNoChanges to be disabled. This option isn't really
used/shouldn't be used by anyone except the FW so marked as a refactor.

PR Close #57416
alxhub pushed a commit that referenced this pull request Aug 27, 2024
…eless (#57416)

When disabling autodetect (not recommeneded) with zoneless,
`fixture.detectChanges` would previously not refresh the fixture's component.

PR Close #57416
@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 27, 2024
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: core Issues related to the framework runtime 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.

2 participants