You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several templates contain forms that allow users to update model instances. However, these forms are mostly untested. Consider the following scenario:
A user, who has permission to access the staff area, intends to change a project's status from "Ongoing" to "Retired". The project is associated with the "B" org. The user opens the project edit page, changes the project's status, and clicks "Save". The project's status is "Retired", which is what the user intended. However, because of a bug in the project edit page, the project is associated with the "A" org, which is not what the user intended.
We should test templates that contain forms. However, before we write tests, we should consider:
The type of these tests. Where would this type live in the testing pyramid? (see TESTING.md)
Whether any existing unit or integration tests are of this type
I'm going to remove this from the board. Whilst we could test templates that contain forms, we could also consider whether there's a deeper issue with how we have modelled the domain. I'm hoping to sketch some ideas, when I've finished reading the Domain Driven Design book.
Several templates contain forms that allow users to update model instances. However, these forms are mostly untested. Consider the following scenario:
We should test templates that contain forms. However, before we write tests, we should consider:
TESTING.md
)The text was updated successfully, but these errors were encountered: