Skip to content

Commit d8b79d8

Browse files
committed
build: fix select e2e tests
In a previous PR I assumed that a timeout in the select e2e tests was a flake, but it was actually a failure, because the test is running against the docs examples which were switched over to MDC.
1 parent 7acbf1f commit d8b79d8

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

src/material/legacy-select/BUILD.bazel

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
load("//src/e2e-app:test_suite.bzl", "e2e_test_suite")
21
load(
32
"//tools:defaults.bzl",
43
"markdown_to_html",
5-
"ng_e2e_test_library",
64
"ng_module",
75
"ng_test_library",
86
"ng_web_test_suite",
@@ -43,10 +41,7 @@ sass_binary(
4341

4442
ng_test_library(
4543
name = "unit_test_sources",
46-
srcs = glob(
47-
["**/*.spec.ts"],
48-
exclude = ["**/*.e2e.spec.ts"],
49-
),
44+
srcs = glob(["**/*.spec.ts"]),
5045
deps = [
5146
":legacy-select",
5247
"//src/cdk/a11y",
@@ -70,19 +65,6 @@ ng_web_test_suite(
7065
deps = [":unit_test_sources"],
7166
)
7267

73-
ng_e2e_test_library(
74-
name = "e2e_test_sources",
75-
srcs = glob(["**/*.e2e.spec.ts"]),
76-
deps = [
77-
"//src/cdk/testing/private/e2e",
78-
],
79-
)
80-
81-
e2e_test_suite(
82-
name = "e2e_tests",
83-
deps = [":e2e_test_sources"],
84-
)
85-
8668
markdown_to_html(
8769
name = "overview",
8870
srcs = [":select.md"],

src/material/select/BUILD.bazel

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
load("//tools:defaults.bzl", "markdown_to_html", "ng_module", "ng_test_library", "ng_web_test_suite", "sass_binary", "sass_library")
1+
load("//src/e2e-app:test_suite.bzl", "e2e_test_suite")
2+
load(
3+
"//tools:defaults.bzl",
4+
"markdown_to_html",
5+
"ng_e2e_test_library",
6+
"ng_module",
7+
"ng_test_library",
8+
"ng_web_test_suite",
9+
"sass_binary",
10+
"sass_library",
11+
)
212

313
package(default_visibility = ["//visibility:public"])
414

@@ -75,6 +85,19 @@ ng_web_test_suite(
7585
],
7686
)
7787

88+
ng_e2e_test_library(
89+
name = "e2e_test_sources",
90+
srcs = glob(["**/*.e2e.spec.ts"]),
91+
deps = [
92+
"//src/cdk/testing/private/e2e",
93+
],
94+
)
95+
96+
e2e_test_suite(
97+
name = "e2e_tests",
98+
deps = [":e2e_test_sources"],
99+
)
100+
78101
markdown_to_html(
79102
name = "overview",
80103
srcs = [":select.md"],

src/material/legacy-select/select.e2e.spec.ts renamed to src/material/select/select.e2e.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ describe('select', () => {
1111
// accidentally. This could happen because the select panel is removed from DOM
1212
// immediately when an option is clicked. Usually ripples still fade-in at that point.
1313
it('should not accidentally persist ripples', async () => {
14-
const select = getElement('.mat-select');
15-
const options = element.all(by.css('.mat-option'));
14+
const select = getElement('.mat-mdc-select');
15+
const options = element.all(by.css('.mat-mdc-option'));
1616
const ripples = element.all(by.css('.mat-ripple-element'));
1717

1818
// Wait for select to be rendered.

0 commit comments

Comments
 (0)