I am writing Angular unit tests, and want to query/get value of custom textbox by data-qa
attribute per e.g. https://dev.to/chriszie/data-qa-attribute-a-better-way-to-select-elements-for-ui-test-automation-48lm.
How can this be done?
<app-textbox
type="text"
data-qa="productname"
>
</app-textbox>
describe('ProductComponent', () => {
let component: ProductComponent;
let fixture: ComponentFixture<ProductComponent>;
it('test value', () => {
let data = fixture.debugElement.query(By -- (not sure what to write here)
});