@@ -549,18 +549,19 @@ may need to explicitly wait for tasks outside `NgZone`, as this does not happen
549
549
550
550
### API for harness environment authors
551
551
552
- Out-of-the-box, Angular CDK's component harnesses can be used in Protractor E2E tests and Karma unit
553
- tests. Developers can support additional environments by creating custom implementations of
554
- ` TestElement ` and ` HarnessEnvironment ` .
552
+ Harness environment authors are developers who want to add support for using component harnesses in
553
+ additional testing environments. Out-of-the-box, Angular CDK's component harnesses can be used in
554
+ Protractor E2E tests and Karma unit tests. Developers can support additional environments by
555
+ creating custom implementations of ` TestElement ` and ` HarnessEnvironment ` .
555
556
556
557
#### Creating a ` TestElement ` implementation for the environment
557
558
558
559
The first step in adding support for a new testing environment is to create a ` TestElement `
559
560
implementation. The ` TestElement ` interface serves as an environment-agnostic representation of a
560
561
DOM element; it lets harnesses interact with DOM elements regardless of the underlying environment.
561
- Because some environments don't support interacting with DOM elements synchronous (e.g. webdriver),
562
- all of ` TestElement ` methods are asynchronous, returning a ` Promise ` with the result of the
563
- operation.
562
+ Because some environments don't support interacting with DOM elements synchronously
563
+ (e.g. webdriver), all of ` TestElement ` methods are asynchronous, returning a ` Promise ` with the
564
+ result of the operation.
564
565
565
566
| Method | Description |
566
567
| ------ | ----------- |
@@ -586,11 +587,11 @@ implementing the `sendKeys` method, is that the key codes in the `TestKey`
586
587
enum likely differ from the key codes used in the test environment. Environment authors should
587
588
maintain a mapping from ` TestKey ` codes to the codes used in the particular testing environment.
588
589
589
- Note: the
590
+ The
590
591
[ ` UnitTestElement ` ] ( https://github.com/angular/components/blob/master/src/cdk/testing/testbed/unit-test-element.ts#L57 )
591
592
and
592
593
[ ` ProtractorElement ` ] ( https://github.com/angular/components/blob/master/src/cdk/testing/protractor/protractor-element.ts#L67 )
593
- implementations that come with the CDK serve as good examples of implementations of this interface.
594
+ implementations in Angular CDK serve as good examples of implementations of this interface.
594
595
595
596
#### Creating a ` HarnessEnvironemnt ` implementation for the environment
596
597
0 commit comments