有没有一种方法可以测试是否存在Fontawesome图标层?

时间:2020-08-07 17:46:09

标签: html angular typescript testing jasmine

我添加了一个响铃图标,然后在其上添加了一个计数器。仅当counter变量大于0时,计数器才会出现。(我正在使用ngIf来确定是否显示了图层元素)有没有一种方法可以测试是否存在分层图标?我尝试了许多不同的方法,包括这种方法:

How do I unit test if an element is visible when the *ngIf directive is used using Jasmine in Angular

,但是我的测试未能说它期望null为真。它没有获取html元素,我似乎无法弄清楚为什么。

0 个答案:

没有答案