Skip to content

Commit 417f689

Browse files
devversionmmalerba
authored andcommitted
refactor(material-experimental/mdc-list): update harness to work with new list API
Updates the harnesses to work with the new MDC-based list API.
1 parent 871a500 commit 417f689

File tree

7 files changed

+769
-84
lines changed

7 files changed

+769
-84
lines changed

scripts/check-mdc-tests-config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ export const config = {
100100
'should not change focus when pressing HOME with a modifier key',
101101
'should not change focus when pressing END with a modifier key',
102102

103-
// The indirect descendant test scenario never worked (even in the non-MDC list) and
104-
// therefore this test has been removed.
105-
'should pick up indirect descendant lines',
106103
// MDC-based list does not support more than three lines.
107104
'should apply a particular class to lists with more than 3 lines',
108105
],

src/material-experimental/mdc-list/testing/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ ng_test_library(
2929
),
3030
deps = [
3131
":testing",
32+
"//src/cdk/testing",
33+
"//src/cdk/testing/testbed",
3234
"//src/material-experimental/mdc-list",
3335
"//src/material/divider/testing",
34-
"//src/material/list/testing:harness_tests_lib",
3536
],
3637
)
3738

src/material-experimental/mdc-list/testing/list-harness-filters.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ export interface NavListHarnessFilters extends BaseHarnessFilters {}
1717
export interface SelectionListHarnessFilters extends BaseHarnessFilters {}
1818

1919
export interface BaseListItemHarnessFilters extends BaseHarnessFilters {
20+
title?: string | RegExp;
21+
secondaryText?: string | RegExp | null;
22+
tertiaryText?: string | RegExp | null;
23+
fullText?: string | RegExp;
24+
/**
25+
* @deprecated Use the `fullText` filter instead.
26+
* @breaking-change 16.0.0
27+
*/
2028
text?: string | RegExp;
2129
}
2230

0 commit comments

Comments
 (0)