正如Angular.io框架测试文档所建议的那样,我一直试图使用使用角测试床+ Karma的DebugElement查询。以下使用DOM测试中的直接javascript进行的测试通过了GREEN
it('Elements of class jqx-tree-item-li found using getElementsByClassName(相同的测试</
</mat-option>在我的类型记录单元测试中,我想对option.text的内容进行测试,我尝试了以下两种方法,但都没有效果:const matSelect= fixture.debugElement.query(By.directive(MatSelect)).nativeElement;
mat