Merge ComponentFixture behaviors (minus the final commit for detectChanges behavior from #57415) - #57416
Closed
atscott wants to merge 5 commits into
Closed
Merge ComponentFixture behaviors (minus the final commit for detectChanges behavior from #57415)#57416atscott wants to merge 5 commits into
atscott wants to merge 5 commits into
Conversation
Contributor
Author
atscott
force-pushed
the
mergeFixtureBehaviorMinusDetectChanges
branch
from
August 26, 2024 18:16
4fc777f to
dc41d18
Compare
atscott
marked this pull request as ready for review
August 26, 2024 18:26
pullapprove
Bot
requested review from
dylhunn,
pkozlowski-opensource and
thePunderWoman
August 26, 2024 18:26
atscott
requested review from
alxhub
and removed request for
dylhunn,
pkozlowski-opensource and
thePunderWoman
August 26, 2024 18:27
alxhub
approved these changes
Aug 26, 2024
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
force-pushed
the
mergeFixtureBehaviorMinusDetectChanges
branch
from
August 26, 2024 19:05
6ba0329 to
3788afd
Compare
Contributor
Author
|
caretaker note: This doesn't have a true public API change so does not need public API approval |
Member
|
This PR was merged into the repository by commit 0300dd2. The changes were merged into the following branches: main |
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
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See individual commits