Open
Description
Feature Description
@yjaaidi proposed this idea in #20871. We could create a subclass of Promise
that would allow calling TestElement
methods directly on the Promise. Example: https://stackblitz.com/edit/test-element-promise
Use Case
This would allow people to write cleaner test code, e.g.
await harness.host().getText();
Instead of:
await (await harness.host()).getText();
// or
await harness.host().then(host => host.getText());
The idea would need a design doc and discussion with the team before proceeding.