-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Merge ComponentFixture behaviors (minus the final commit for detectChanges behavior from #57415) #57416
Conversation
4fc777f
to
dc41d18
Compare
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.
6ba0329
to
3788afd
Compare
caretaker note: This doesn't have a true public API change so does not need public API approval |
This PR was merged into the repository by commit 0300dd2. The changes were merged into the following branches: main |
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
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
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. |
See individual commits