You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For readability it would be awesome, if we could chain .dom() method calls:
assert.dom('h1") .exists('rendersafirst-levelheadline').hasText('My Blog Post','renders title of blog post as headline').dom('a').exists('renders a link inside the headline').hasAttribute('href','/posts/1','link target is the page for the post').hasText('My Blog Post','link has title of the blog post as text')
This would be the same as currently:
assert.dom('h1") .exists('rendersafirst-levelheadline').hasText('My Blog Post','renders title of blog post as headline')assert.dom('a','h1').exists('renders a link inside the headline').hasAttribute('href','/posts/1','link target is the page for the post').hasText('My Blog Post','link has title of the blog post as text')
Main pain point with this one is that it gets messy if the main selector is not as easy as 'h1'.
I'm not fully convinced by the API I proposed above. It would be best if the API would allow asserting against multiple childs of a main element using chaining. A good example is a form element, which we want to assert against label and input child elements. This is not supported using chaining by the API proposed above. Maybe someone else has a better idea, which would support even that.
The text was updated successfully, but these errors were encountered:
For readability it would be awesome, if we could chain
.dom()
method calls:This would be the same as currently:
Main pain point with this one is that it gets messy if the main selector is not as easy as
'h1'
.I'm not fully convinced by the API I proposed above. It would be best if the API would allow asserting against multiple childs of a main element using chaining. A good example is a form element, which we want to assert against
label
andinput
child elements. This is not supported using chaining by the API proposed above. Maybe someone else has a better idea, which would support even that.The text was updated successfully, but these errors were encountered: