angular-test-runner icon indicating copy to clipboard operation
angular-test-runner copied to clipboard

expectElement multiple elements

Open woprzech opened this issue 7 years ago • 0 comments

When expectElement finds multiple elements he does not throw any error connected with that problem and test fails.

When first found element has correct value (for example text) error message is even stranger: html:

<div>
    <div class="test-subject">text</div>
    <div class="test-subject">wrong-text</div>
</div> 

html.verify(
    expectElement('.test-subject').toHaveText('text')
); 
Expected [
    <div class="test-subject">text</div>
] to have text 'text'.

woprzech avatar Aug 31 '17 09:08 woprzech