Skip to content

Commit 7911c5f

Browse files
committed
a few more edits
1 parent 3debb95 commit 7911c5f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/cdk/testing/test-harnesses.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -549,18 +549,19 @@ may need to explicitly wait for tasks outside `NgZone`, as this does not happen
549549

550550
### API for harness environment authors
551551

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`.
555556

556557
#### Creating a `TestElement` implementation for the environment
557558

558559
The first step in adding support for a new testing environment is to create a `TestElement`
559560
implementation. The `TestElement` interface serves as an environment-agnostic representation of a
560561
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.
564565

565566
| Method | Description |
566567
| ------ | ----------- |
@@ -586,11 +587,11 @@ implementing the `sendKeys` method, is that the key codes in the `TestKey`
586587
enum likely differ from the key codes used in the test environment. Environment authors should
587588
maintain a mapping from `TestKey` codes to the codes used in the particular testing environment.
588589

589-
Note: the
590+
The
590591
[`UnitTestElement`](https://github.com/angular/components/blob/master/src/cdk/testing/testbed/unit-test-element.ts#L57)
591592
and
592593
[`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.
594595

595596
#### Creating a `HarnessEnvironemnt` implementation for the environment
596597

0 commit comments

Comments
 (0)