Skip to content

Commit 31a754c

Browse files
authored
feat(material/table): pass this rather than concrete classes in the harnesses (#25482)
some users are extending the harnesses, and passing the concrete class broke them
1 parent e3b8032 commit 31a754c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/material/legacy-table/testing/cell-harness.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class MatLegacyCellHarness extends _MatCellHarnessBase {
2020
* @return a `HarnessPredicate` configured with the given options.
2121
*/
2222
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatLegacyCellHarness> {
23-
return _MatCellHarnessBase._getCellPredicate(MatLegacyCellHarness, options);
23+
return _MatCellHarnessBase._getCellPredicate(this, options);
2424
}
2525
}
2626

@@ -36,7 +36,7 @@ export class MatLegacyHeaderCellHarness extends _MatCellHarnessBase {
3636
* @return a `HarnessPredicate` configured with the given options.
3737
*/
3838
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatLegacyHeaderCellHarness> {
39-
return _MatCellHarnessBase._getCellPredicate(MatLegacyHeaderCellHarness, options);
39+
return _MatCellHarnessBase._getCellPredicate(this, options);
4040
}
4141
}
4242

@@ -52,6 +52,6 @@ export class MatLegacyFooterCellHarness extends _MatCellHarnessBase {
5252
* @return a `HarnessPredicate` configured with the given options.
5353
*/
5454
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatLegacyFooterCellHarness> {
55-
return _MatCellHarnessBase._getCellPredicate(MatLegacyFooterCellHarness, options);
55+
return _MatCellHarnessBase._getCellPredicate(this, options);
5656
}
5757
}

src/material/table/testing/cell-harness.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class MatCellHarness extends _MatCellHarnessBase {
6464
* @return a `HarnessPredicate` configured with the given options.
6565
*/
6666
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatCellHarness> {
67-
return _MatCellHarnessBase._getCellPredicate(MatCellHarness, options);
67+
return _MatCellHarnessBase._getCellPredicate(this, options);
6868
}
6969
}
7070

@@ -80,7 +80,7 @@ export class MatHeaderCellHarness extends _MatCellHarnessBase {
8080
* @return a `HarnessPredicate` configured with the given options.
8181
*/
8282
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatHeaderCellHarness> {
83-
return _MatCellHarnessBase._getCellPredicate(MatHeaderCellHarness, options);
83+
return _MatCellHarnessBase._getCellPredicate(this, options);
8484
}
8585
}
8686

@@ -96,6 +96,6 @@ export class MatFooterCellHarness extends _MatCellHarnessBase {
9696
* @return a `HarnessPredicate` configured with the given options.
9797
*/
9898
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatFooterCellHarness> {
99-
return _MatCellHarnessBase._getCellPredicate(MatFooterCellHarness, options);
99+
return _MatCellHarnessBase._getCellPredicate(this, options);
100100
}
101101
}

0 commit comments

Comments
 (0)