angular-docs-cn/aio/tests/deployment
George Kalpakas 3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00
..
e2e docs: fix links to docs with ambiguous paths (#41788) 2021-04-26 12:12:00 -07:00
shared test(docs-infra): change URL separator from `\t` to `-->` in `URLS_TO_REDIRECT.txt` (#41680) 2021-04-19 08:26:01 -07:00
unit fix(docs-infra): do not redirect disambiguated URLs (#41842) 2021-04-27 14:05:23 -07:00