我想测试这个按钮在某些条件下是否可见
这是我在单元测试中的coffeescript代码
expect(@view.$send).to.have.css 'display', 'block'
测试失败,因为该值为空字符串。以下是错误消息:
1) View should enable "Send" button on successful request:
AssertionError: expected { Object (0, length, ...) } to have a 'display' CSS property with the value 'block', but the value was ''
at file:///Users/akong/project/TestView.spec.js:83
我想这是因为'display'属性是继承的,如下所示:
如何成功测试此按钮是否可见?