How it works...

If this recipe looked like a lot of effort, don't despair, Vue templates already have this setup all sorted out inside them. You know how all this machinery works but when, in the later recipes, we use Webpack, you will only need one command to run e2e tests because everything is already set up.

Note how the title of the end-to-end test is rather generic, and it refers to a particular action flow rather than detailing the context and what is expected. This is common for e2e tests as you are usually better off building user stories and then branching them and naming each branch after a particular scenario. So, just to give an example, if we were expecting a response from the server and it didn't come back, we could test a scenario ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.