3 ms·
Like a couple other people I'm very surprised by the negativity around this tool. I was introduced to it when I started my current position a few months ago and
by djlewald 6y ago
Like a couple other people I'm very surprised by the negativity around this tool. I was introduced to it when I started my current position a few months ago and I've found it everything BUT hard to use.
The method chaining feels good as long as you check the return type of the function your calling. Most of the time it returns the element you just asserted against. And when you're trying to drill down into deeper sections of the DOM you can speed up tests by calling .within from a higher level element to keep the search to a specific part of the tree.
The individual steps with their state available for viewing in the sidebar is great as others have mentioned. The test doesn't run at light speed, so locally you can actually VIEW what is happening. Plus when it does fail there's typically a long timeout (~40 seconds) before the test actually fails. So it's very noticeable when your test hits a snag.
Also helper functions are not hard at all, and we have a few useful ones we use in almost every section. I have more I could say, but I'm not going to write a huge raving post. Just wanted to try to post some positive contrarian perspective.