forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cdk-experimental): expose root loader instance in testbed harnes…
…s environment (angular#16903) Adds a new method that can be used by harness consumers to load a harness through `HarnessLoader` from the document root. This is helpful for harnesses which need to match elements outside of testbed fixtures (e.g. snack-bars, overlays etc.). Needed for angular#16697 and angular#16709. (cherry picked from commit 3765433)
- Loading branch information
1 parent
034818c
commit 69f7693
Showing
5 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {ComponentHarness} from '../../component-harness'; | ||
|
||
export class FakeOverlayHarness extends ComponentHarness { | ||
static readonly hostSelector = '.fake-overlay'; | ||
|
||
/** Gets the description of the fake overlay. */ | ||
async getDescription(): Promise<string> { | ||
return (await this.host()).text(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters