build: fix bazel protractor tests not capturing console output (#28490)

Currently we depend on the "rules_webtesting" version that is
installed by "rules_typescript//:package.bzl". This version of
the webtesting rules comes with a very old version of Chromium
and the `chromedriver` that does not support capturing console
errors properly (with stack traces). Since we have a few e2e
tests that depend on console output (e.g. playground/src/source-map),
we need to make sure that these tests can pass upon Bazel
migration.

PR Close #28490
This commit is contained in:
Paul Gschwendtner 2019-01-31 22:57:45 +01:00 committed by Matias Niemelä
parent 463a7894ae
commit b7738ef9e4
2 changed files with 10 additions and 3 deletions

View File

@ -20,9 +20,6 @@ describe('sourcemaps', function() {
$('error-app .errorButton').click();
// TODO(tbosch): Bug in ChromeDriver: Need to execute at least one command
// so that the browser logs can be read out!
browser.executeScript('1+1');
browser.manage().logs().get(logging.Type.BROWSER).then(function(logs: any) {
let errorLine: number = null;
let errorColumn: number = null;

View File

@ -60,6 +60,16 @@ def rules_angular_dev_dependencies():
url = "https://github.com/google/brotli/archive/v1.0.5.zip",
)
# The TypeScript rules transitively fetch a version of "rules_webtesting", but the version
# does not include 239b491e8251588bb46297b899d306ae7024858e which updates the "chromedriver"
# version so that e2e tests are able to capture the browser console output. This is needed
# for a few e2e tests, so we manually fetch a version that includes that required SHA.
http_archive(
name = "io_bazel_rules_webtesting",
url = "https://github.com/bazelbuild/rules_webtesting/archive/1f430d5e1cae10efc953a6511147e21b3bc03a5d.zip",
strip_prefix = "rules_webtesting-1f430d5e1cae10efc953a6511147e21b3bc03a5d",
)
#############################################
# Dependencies for generating documentation #
#############################################