有没有办法在量角器中检查继承的CSS属性?

Che*_*pir 10 css jasmine angularjs protractor

我正在为Angular应用程序编写一些量角器测试.在模糊输入字段之后,在应用程序中重新加载CSS文件,并且我想测试该样式是否已经有效地应用于使用该CSS文件中的类的元素.

我已经看到我可以读取有效的样式属性值.

如果不可能,那么有没有办法测试一些元素使用量角器正确渲染?

element.all(by.css('.input')).get(0).then(function(styleProperty){
  styleProperty.clear();
  styleProperty.sendKeys('10px', protractor.Key.TAB);
  element(by.css('.element')).getCssValue('border').then(function (borderCssValue) {
    expect(borderCssValue).toBe('10px');
  });

Message:
     Expected '' to be '10px'.
Run Code Online (Sandbox Code Playgroud)

Jmr*_*Jmr 16

border是不是有效的CSS值,因为它扩展到border-top,border-left等试用

element(by.css('.element')).getCssValue('border-top').then(...)
Run Code Online (Sandbox Code Playgroud)