docs-bug(COMPONENT): TITLE
Documentation Feedback
I can't find specific documentation around Test harness API's for specific components...
on the main test harness documentation page there is an example for a select component:
const select = await loader.getHarness(MatSelectHarness);
await select.open();
const bugOption = await select.getOption({text: 'Bug'});
await bugOption.click();
This does not work similarly for MatAutocompleteHarness:
There is a .selectOption() method which does not accept {text: string} but instead only {selector: string, ancestor: string} but nowhere this is explained.
Affected documentation page
https://material.angular.io/guide/using-component-harnesses
Each component on the docs site has one live example showing how to use its harness. Here's the one for the autocomplete: https://material.angular.io/components/autocomplete/examples#autocomplete-harness. There's also a "Testing" section in the API reference: https://material.angular.io/components/autocomplete/api#classes
Thanks, I now see why I missed this: I don't think it's a very obvious place to put documentation around test harnesses in the middle of component usage examples. I would have expected a tab up top stating "testing" or "harness" or something similar.
On the top right hand side for the API page, you can see the testing section in the table of contents. I'll add a comment to #25614 to make sure we track making the harness documentation more discoverable.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.