angular/packages/core/test
Andrew Scott 3ca34e606d refactor(core): Update ComponentFixture behavior when using zoneless scheduler (#54024)
When the zoneless scheduler is provided, we want to update the behavior
of `ComponentFixture` to address common issues and painpoints in testing.
Developers should never have to call `detectChanges` on a fixture
manually. Instead of calling `detectChanges` after performing an
action that updates state and requies a template refresh, developers
should wait for change detection to run because the update needs to also have
notified the scheduler. If this was not the case, the component would
not work correctly in the application. Calling `detectChanges` to force
an update could hide real bugs.

This commit also updates the zoneless tests to uses `ComponentFixture`
instead of manually attaching to the `ApplicationRef` and rewriting a
lot of the helpers (`getDebugNode`, `isStable` as a value, `whenStable` as a
Promise).

PR Close #54024
2024-01-29 20:21:47 +00:00
..
acceptance fix(core): change defer block fixture default behavior to playthrough (#54088) 2024-01-26 15:44:40 +00:00
animation refactor(animations): deprecation of AnimationDriver.NOOP (#51843) 2023-09-22 12:15:45 -07:00
authoring refactor(core): separate InputSignal and InputSignalWithTransform (#54053) 2024-01-26 19:10:56 +00:00
bundling refactor(core): introduce instructions for view queries as signals (#54017) 2024-01-24 18:39:51 -05:00
change_detection test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
compiler build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
debug test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
di test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
dom test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
hydration refactor(core): adding hydration for content projection (#49454) 2023-03-21 17:42:53 +01:00
i18n test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
linker refactor(core): newly created and any dirty views should get refreshed during CD (#53022) 2023-12-14 09:17:49 -08:00
metadata test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
playground/zone-signal-input feat(core): expose new input API for signal-based inputs (#53872) 2024-01-10 12:33:31 -08:00
reflection refactor(core): remove unused logic from reflection capabilities (#45335) 2022-03-24 11:02:39 -07:00
render3 refactor(compiler): support JIT for signal-based queries (#54019) 2024-01-24 16:13:31 +01:00
sanitization test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
signals refactor(core): signals toString improvements (#54079) 2024-01-25 20:45:02 +00:00
strict_types refactor(core): rename ...WithMeta types to ...Declaration and alias to unknown (#41119) 2021-03-22 08:57:18 -07:00
testability refactor(core): Remove internal-only testability features (#53767) 2024-01-09 14:46:46 -08:00
util test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
zone test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
application_config_spec.ts feat(core): add mergeApplicationConfig method (#49253) 2023-03-01 11:20:31 -08:00
application_init_spec.ts test(core): fix test with false-negative risk (#54025) 2024-01-23 16:58:56 +01:00
application_module_spec.ts test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
application_ref_integration_spec.ts refactor(platform-browser): update renderer to be able to remove ServerRendererFactory2 and EmulatedEncapsulationServerRenderer2 (#49630) 2023-04-05 11:42:57 -07:00
application_ref_spec.ts fix(core): Multiple subscribers to ApplicationRef.isStable should all see values (#53541) 2023-12-13 11:26:51 -08:00
BUILD.bazel test(core): Add scheduler in tests to tie into ApplicationRef.isStable (#53579) 2024-01-09 16:05:31 -08:00
change_detection_scheduler_spec.ts refactor(core): Update ComponentFixture behavior when using zoneless scheduler (#54024) 2024-01-29 20:21:47 +00:00
component_fixture_spec.ts test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
defer_fixture_spec.ts fix(core): change defer block fixture default behavior to playthrough (#54088) 2024-01-26 15:44:40 +00:00
dev_mode_spec.ts test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
directive_lifecycle_integration_spec.ts refactor(core): cleanup type any (#48623) 2023-01-04 12:15:16 -08:00
error_handler_spec.ts refactor(core): remove unused error handler logic (#46216) 2022-06-02 13:40:16 -07:00
event_emitter_spec.ts test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
fake_async_spec.ts test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
forward_ref_integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
runtime_error_spec.ts refactor(core): improve error message when dom node is not found (#49977) 2023-04-25 09:29:47 -07:00
test_bed_effect_spec.ts fix(core): TestBed should still use the microtask queue to schedule effects (#53843) 2024-01-11 12:05:57 -08:00
test_bed_spec.ts fix(core): Change defer block fixture default behavior to playthrough (#53956) 2024-01-17 10:45:42 -08:00
transfer_state_spec.ts refactor(core): simplify state transfer escaping (#50201) 2023-05-10 11:31:34 -07:00
util_spec.ts test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00