angular/packages/router/test
Andrew Scott 286b2807de fix(router): eagerly update internal state on browser-triggered navigations (#43102)
The management of `browserUrlTree` currently has several problems with
correctly tracking the actual state of the browser.

This change makes the Router eagerly update the `browserUrlTree` when
handling navigations triggered by browser events (i.e., not 'imperative'). This
is because with those types of navigations, the browser URL bar is
_already_ updated. If we do not update the internal tracking of the
`browserUrlTree`, we will be out of sync with the real URL if the
navigation is rejected.

It would be best if we could remove `browserUrlTree` completely, but doing that
would require a lot more investigation and is blocked by #27059 because
the SpyLocation used in tests does not emulate real browser behavior.

fixes #43101

PR Close #43102
2021-08-16 09:33:23 -07:00
..
aot_ngsummary_test build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
operators fix(router): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
utils build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
apply_redirects.spec.ts fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
bootstrap.spec.ts refactor(service-worker): switch to the official TypeScript typings (#42736) 2021-07-08 10:28:22 -07:00
BUILD.bazel test(router): fix router test failing on IE (#36742) 2020-04-23 12:13:27 -04:00
computed_state_restoration.spec.ts test(router): move computed state restoration tests to own file (#42933) 2021-07-23 14:25:06 -07:00
config.spec.ts refactor(router): Produce error message when canActivate is used with redirectTo (#40067) 2021-01-05 10:09:27 -08:00
create_router_state.spec.ts fix(router): Only retrieve stored route when reuse strategy indicates it should reattach (#30263) 2021-04-15 11:32:59 -07:00
create_url_tree.spec.ts fix(router): fix serializeQueryParams logic (#42481) 2021-06-08 10:43:00 -07:00
helpers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
integration.spec.ts fix(router): eagerly update internal state on browser-triggered navigations (#43102) 2021-08-16 09:33:23 -07:00
recognize.spec.ts fix(router): recursively merge empty path matches (#41584) 2021-04-14 15:47:07 -07:00
regression_integration.spec.ts fix(router): eagerly update internal state on browser-triggered navigations (#43102) 2021-08-16 09:33:23 -07:00
router.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router_preloader.spec.ts refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
router_scroller.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router_state.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shared.spec.ts fix(router): fix error when calling ParamMap.get function (#31599) 2020-06-25 11:57:24 -07:00
spy_ng_module_factory_loader.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_serializer.spec.ts fix(router): fragment can be null (#37336) 2021-03-22 10:02:39 -07:00
url_tree.spec.ts fix(router): Allow question marks in query param values (#31187) 2021-08-06 10:49:37 -07:00