Create True end-to-end Tests with Cypress

Share this video with your friends

Send Tweet

Integration tests let us keep our tests fast and reliable. They also allow us to test scenarios that are hard to recreate in a full end-to-end setup. That being said, we should round out our test suite with some high-level smoke tests. In this lesson, we’ll create some tests that seed our data-source and avoid stubbing our network calls, allowing us to test all parts of the application while using known data to keep our tests flake-free.

Alex Sol
Alex Sol
~ 6 years ago

There is a problem for newer versions of react if bulk load, delete are used from api of server.js: TypeError: router.db.setState(...).then is not a function (I got an 500 error in Cypress). It can be fixed by removing function in "then" construction and sending status 200 directly in server.js. E.g. for "delete": server.delete('/api/todos/all', (req, res) => { router.db.setState({todos:[]}).then(res.sendStatus(200)); });

Antal Tony Tettinger
Antal Tony Tettinger
~ 3 years ago

I am not sure how the wild card works, I don't see any parameters passed into the delete alias... I wonder.