-
Notifications
You must be signed in to change notification settings - Fork 16
Description
We've started using cypress for integration tests, which has provided high value, easy to write tests that reflect real user usage. However, many of the new features in the 0.4 release don't have integration tests written for these features.
Prepare some very small (a few kb at most, just a couple pixels of resolution like a 5x5 image) test files and add them to the fixtures folder. For example,
- a project with one cell
- a project with one division
- a project with an incorrect division (parent after division, parent with one daughter, daughter before division, etc. See the DivisionAlert components)
Write tests with cypress that use these fixtures and perform some simple operations and verify that the UI reflects the expected result of the action.
- editing cells
- editing divisions (add daughter, remove daughter)
- undoing an action
- redoing an action
- reloading the page
- combinations of the above (edit, undo, and reload; edit, undo, redo, and reload; etc.)
It's likely worth validating the data in cellsMachine/divisionsMachine itself in addition to the UI. Even though this is getting closer to testing the implementation than Cypress usually does, you can think of this as testing the future contents of a downloaded file, which is still part of the interface and worth testing.