pioneer
pioneer copied to clipboard
isVisible and isPresent should never throw and only return booleans
Isn't this already how it works? I tried to check if a DOM element is not present today and this (sadly) didn't work:
@Then /^there should be no "([^"]*)" form field$/, (fieldClass) ->
@currentForm.isPresent(".#{fieldClass}").should.eventually.be.rejected
But this works:
@Then /^there should be no "([^"]*)" form field$/, (fieldClass) ->
@currentForm.isPresent(".#{fieldClass}")
.then((isPresent) -> isPresent.should.be.false)
So it seems that isPresent
never throws but only returns boolean values :wink: