docs(dev-infra): refactor browsers/README.md
to use one sentence per line (#40150)
This commit refactor the `dev-infra/browsers/README.md` file to have one sentence per line. This makes it consistent with other Markdown files in the repository and makes diffs for future changes more readable. This commit also uses proper Markdown numbered lists and fixes indentation. PR Close #40150
This commit is contained in:
parent
7413cb4386
commit
3aead9a95c
@ -1,49 +1,40 @@
|
|||||||
# Browser configuration and versioning for testing of Angular
|
# Browser configuration and versioning for testing of Angular
|
||||||
|
|
||||||
Within the Angular organization, we use Chrome and Firefox to perform most of the local testing,
|
Within the Angular organization, we use Chrome and Firefox to perform most of the local testing, and rely on Sauce Labs and BrowserStack to do cross-browser testing on our CI.
|
||||||
and rely on Sauce Labs and BrowserStack to do cross-browser testing on our CI.
|
|
||||||
|
|
||||||
The version of Chrome used in tests within this monorepo is configured and controlled via
|
The version of Chrome used in tests within this monorepo is configured and controlled via Bazel and `puppeteer`.
|
||||||
Bazel and `puppeteer`. We manually keep the configuration of these two tools in sync to
|
We manually keep the configuration of these two tools in sync to create a consistent testing environment across unit, e2e, and integration tests.
|
||||||
create a consistent testing environment across unit, e2e, and integration tests.
|
|
||||||
|
|
||||||
## Bazel
|
## Bazel
|
||||||
|
|
||||||
Bazel `karma_web_test_suite` and `protractor_web_test_suite` targets will use Chromium
|
Bazel `karma_web_test_suite` and `protractor_web_test_suite` targets will use Chromium or Firefox provisioned by `//dev-infra/browsers`.
|
||||||
or Firefox provisioned by `//dev-infra/browsers`. The version of Chrome and Firefox are
|
The version of Chrome and Firefox are specified in the `chromium.bzl` and `firefox.bzl` files in `/dev-infra/browsers`.
|
||||||
specified in the `chromium.bzl` and `firefox.bzl` files in `/dev-infra/browsers`.
|
|
||||||
|
|
||||||
The process of updating the Chrome or Firefox version is not straightforward, but below
|
The process of updating the Chrome or Firefox version is not straightforward, but below are dedicated sections for each browser.
|
||||||
are dedicated sections for each browser.
|
|
||||||
|
|
||||||
## Updating Chromium
|
## Updating Chromium
|
||||||
|
|
||||||
1) Visit https://chromium.woolyss.com/ and note the version (commit position) of the latest
|
1. Visit https://chromium.woolyss.com/ and note the version (commit position) of the latest stable version.
|
||||||
stable version.
|
|
||||||
|
|
||||||
For example, "Google Chrome 83.0.4103.97 (756066) • Wednesday, 3 Jun 2020". Alternatively, you
|
For example, "Google Chrome 83.0.4103.97 (756066) • Wednesday, 3 Jun 2020".
|
||||||
can look in https://omahaproxy.appspot.com/.
|
Alternatively, you can look in https://omahaproxy.appspot.com/.
|
||||||
|
|
||||||
1) Find the closest commit position number available for each platform in chromium-browser-snapshots:
|
2. Find the closest commit position number available for each platform in chromium-browser-snapshots: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
|
||||||
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
* https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/756066/
|
* https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/756066/
|
||||||
* https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/756053/
|
* https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/756053/
|
||||||
* https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/756065/
|
* https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/756065/
|
||||||
|
|
||||||
You can download Chromium for your local platform and double check that the `--version` matches
|
You can download Chromium for your local platform and double check that the `--version` matches up with what you expect.
|
||||||
up with what you expect.
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
``` bash
|
``` bash
|
||||||
$ ~/Downloads/chrome-mac/Chromium.app/Contents/MacOS/Chromium --version
|
$ ~/Downloads/chrome-mac/Chromium.app/Contents/MacOS/Chromium --version
|
||||||
Chromium 83.0.4103.0
|
Chromium 83.0.4103.0
|
||||||
```
|
```
|
||||||
|
|
||||||
2) Update the chrome & chrome driver build numbers in `dev-infra/browsers/chromium/chromium.bzl`
|
3. Update the chrome & chrome driver build numbers in `dev-infra/browsers/chromium/chromium.bzl` and run either run `bazel query @org_chromium_chromium_amd64//...` to prompt Bazel to calculate the new `sha256` for each platform binary or determine the new `sha256` values manually.
|
||||||
and run either run `bazel query @org_chromium_chromium_amd64//...` to prompt Bazel to calculate
|
|
||||||
the new `sha256` for each platform binary or determine the new `sha256` values manually.
|
|
||||||
|
|
||||||
Here is an example with `curl` & `shasum`:
|
Here is an example with `curl` & `shasum`:
|
||||||
``` bash
|
``` bash
|
||||||
@ -52,9 +43,8 @@ the new `sha256` for each platform binary or determine the new `sha256` values m
|
|||||||
|
|
||||||
## Puppeteer
|
## Puppeteer
|
||||||
|
|
||||||
Visit https://github.com/puppeteer/puppeteer/blob/master/docs/api.md to determine which version
|
Visit https://github.com/puppeteer/puppeteer/blob/master/docs/api.md to determine which version of puppeteer corresponds to the version of Chrome desired.
|
||||||
of puppeteer corresponds to the version of Chrome desired. Then update
|
Then update `scripts/puppeteer-chrome-versions.js` and all of the puppeteer versions throughout the repo,
|
||||||
`scripts/puppeteer-chrome-versions.js` and all of the puppeteer versions throughout the repo,
|
|
||||||
|
|
||||||
* `package.json`
|
* `package.json`
|
||||||
* `aio/package.json`
|
* `aio/package.json`
|
||||||
@ -64,8 +54,8 @@ and their corresponding `yarn.lock` files.
|
|||||||
|
|
||||||
## Firefox
|
## Firefox
|
||||||
|
|
||||||
In order to update Firefox, open the `dev-infra/browsers/firefox/firefox.bzl` file and update
|
In order to update Firefox, open the `dev-infra/browsers/firefox/firefox.bzl` file and update the repository URLs to the desired version.
|
||||||
the repository URLs to the desired version. e.g.
|
e.g.
|
||||||
|
|
||||||
```bzl
|
```bzl
|
||||||
platform_http_file(
|
platform_http_file(
|
||||||
@ -77,11 +67,8 @@ platform_http_file(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
Go to the `urls` property and update the URL by replacing all `78.0` occurrences with the
|
Go to the `urls` property and update the URL by replacing all `78.0` occurrences with the version you intend to use.
|
||||||
version you intend to use. Once done, do the same change for other platforms (such as `macos`).
|
Once done, do the same change for other platforms (such as `macos`).
|
||||||
|
|
||||||
Finally, update the `sha256`checksum of the browser archives. You can do this by downloading the
|
|
||||||
artifacts from the URLs you just updated, and then running on those files: `sha256 <path>`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Finally, update the `sha256` checksum of the browser archives.
|
||||||
|
You can do this by downloading the artifacts from the URLs you just updated, and then running on those files: `sha256 <path>`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user