Skip to content

build: fix ci failures in patch branch #19607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ web_test_repositories()
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")

browser_repositories(
# Chrome is brought in by `@npm_dev_infra_private` for better version control and
# RBE experience where individual browser archives per platform are provided.
# TODO: Do the same for Firefox (but it is not used for local development): DEV-114
chromium = False,
chromium = True,
firefox = True,
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-component-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if (local && (components.length > 1 || all)) {
process.exit(1);
}

const browserName = firefox ? 'firefox-local' : 'chromium';
const browserName = firefox ? 'firefox-local' : 'chromium-local';
const bazelBinary = `yarn -s ${watch ? 'ibazel' : 'bazel'}`;
const configFlag = viewEngine ? '--config=view-engine' : '';

Expand Down
2 changes: 0 additions & 2 deletions src/material-experimental/mdc-menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
// Note that we include this private mixin, because the public
// one adds a bunch of styles that we aren't using for the menu.
@include mdc-list-item-base_;
@include mdc-list-list-item-padding-variant(
$mdc-list-textual-variant-config, $query: $mat-base-styles-query);

// MDC's menu items are `<li>` nodes which don't need resets, however ours
// can be anything, including buttons, so we need to do the reset ourselves.
Expand Down
20 changes: 8 additions & 12 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,6 @@ def karma_web_test_suite(name, **kwargs):
kwargs["srcs"] = ["@npm//:node_modules/tslib/tslib.js"] + getAngularUmdTargets() + kwargs.get("srcs", [])
kwargs["deps"] = ["//tools/rxjs:rxjs_umd_modules"] + kwargs.get("deps", [])

# Set up default browsers if no explicit `browsers` have been specified.
if not hasattr(kwargs, "browsers"):
kwargs["tags"] = ["native"] + kwargs.get("tags", [])
kwargs["browsers"] = [
# Note: when changing the browser names here, also update the "yarn test"
# script to reflect the new browser names.
"@npm_angular_dev_infra_private//browsers:chromium",
"@io_bazel_rules_webtesting//browsers:firefox-local",
]

for opt_name in kwargs.keys():
# Filter out options which are specific to "karma_web_test" targets. We cannot
# pass options like "browsers" to the local web test target.
Expand Down Expand Up @@ -208,11 +198,10 @@ def karma_web_test_suite(name, **kwargs):
def protractor_web_test_suite(flaky = True, **kwargs):
_protractor_web_test_suite(
flaky = flaky,
browsers = ["@npm_angular_dev_infra_private//browsers:chromium"],
**kwargs
)

def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], **kwargs):
def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], tags = [], **kwargs):
# Always include a prebuilt theme in the test suite because otherwise tests, which depend on CSS
# that is needed for measuring, will unexpectedly fail. Also always adding a prebuilt theme
# reduces the amount of setup that is needed to create a test suite Bazel target. Note that the
Expand Down Expand Up @@ -256,6 +245,12 @@ def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], **kwargs):
deps = [
"//test:angular_test_init",
] + deps,
browsers = [
# Note: when changing the browser names here, also update the "yarn test"
# script to reflect the new browser names.
"@io_bazel_rules_webtesting//browsers:chromium-local",
"@io_bazel_rules_webtesting//browsers:firefox-local",
],
bootstrap = [
# This matches the ZoneJS bundles used in default CLI projects. See:
# https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/files/src/polyfills.ts.template#L58
Expand All @@ -269,5 +264,6 @@ def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], **kwargs):
"@npm//:node_modules/zone.js/dist/zone-testing.js",
"@npm//:node_modules/reflect-metadata/Reflect.js",
] + bootstrap,
tags = ["native"] + tags,
**kwargs
)