Skip to content

Commit

Permalink
feat(material/table): pass this rather than concrete classes in the…
Browse files Browse the repository at this point in the history
… harnesses (#25482)

some users are extending the harnesses, and passing the concrete class
broke them
  • Loading branch information
mmalerba committed Aug 17, 2022
1 parent e3b8032 commit 31a754c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/material/legacy-table/testing/cell-harness.ts
Expand Up @@ -20,7 +20,7 @@ export class MatLegacyCellHarness extends _MatCellHarnessBase {
* @return a `HarnessPredicate` configured with the given options.
*/
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatLegacyCellHarness> {
return _MatCellHarnessBase._getCellPredicate(MatLegacyCellHarness, options);
return _MatCellHarnessBase._getCellPredicate(this, options);
}
}

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

Expand All @@ -52,6 +52,6 @@ export class MatLegacyFooterCellHarness extends _MatCellHarnessBase {
* @return a `HarnessPredicate` configured with the given options.
*/
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatLegacyFooterCellHarness> {
return _MatCellHarnessBase._getCellPredicate(MatLegacyFooterCellHarness, options);
return _MatCellHarnessBase._getCellPredicate(this, options);
}
}
6 changes: 3 additions & 3 deletions src/material/table/testing/cell-harness.ts
Expand Up @@ -64,7 +64,7 @@ export class MatCellHarness extends _MatCellHarnessBase {
* @return a `HarnessPredicate` configured with the given options.
*/
static with(options: CellHarnessFilters = {}): HarnessPredicate<MatCellHarness> {
return _MatCellHarnessBase._getCellPredicate(MatCellHarness, options);
return _MatCellHarnessBase._getCellPredicate(this, options);
}
}

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

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

0 comments on commit 31a754c

Please sign in to comment.