Since end of October I switched from test automation using Groovy, Geb, Spock and SoapUI to test automation using Protractor, Cucumber and Jasmine. Different apps, different tools, new challenges and new knowledge. The biggest challenge is promises. Lots of samples on the web about promise chaining. The small "problem" - most of those samples are for browser interaction related functions. Well, that's what we are dealing most in e2e tests. But what if those simple functions are not enough, if you need to write some functions of your own which return non-browser related promises? E.g., just to compare some values of complex structure and return "true" or "false"? Or anything else not browser related. If you are new to this kind of testing, here's where "adventures" begin. When you don't know what to google for, it's not so easy to find out you are looking for a thing named "browser control flow". What it is about? Wel...