Starting from Software Engineering (but summarizing). Unit tests are derived from test cases, which in turn are based on use cases. You would need to have a documentation of your system with:
List of Requirements or basic guidelines of your system. Nothing to include animations, interfaces. They should only treat description of functionalities, being as simple as possible and not generic. Ex: The system must allow the user to change his credentials.
For each requirement, assemble one or more Casos de Usos, detailing how the user will use the system to perform the Requirement.
So for each use case, creates more than one test case, with inputs, expected outputs, and obtained outputs. Note that it is not possible to create a test case for interface as the interface is not a System Requirement.
This is because the interface is a surface layer of the system it totally depends on something that needs to be tested, so it ceases to be a test unitary true. In addition its interface could transmit wrong inputs to the next levels of the system, making it difficult to identify the outputs.
There are cases where you don’t have the system and it happens to be a completely front-end application, but even so it would be difficult and costly to discover all the possible test cases. I am not saying that it is not possible to test GUI, but that it would not be feasible, and it is not guaranteed of better maintainability of the system, because the test cases would be superficial.
Doing tests is always a good practice, given that you do not how much a given system will evolve
– Yago Azedias