Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spike] Test templates that contain forms #4317

Open
iaindillingham opened this issue May 1, 2024 · 1 comment
Open

[Spike] Test templates that contain forms #4317

iaindillingham opened this issue May 1, 2024 · 1 comment

Comments

@iaindillingham
Copy link
Member

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
  • Tool support e.g. Playwright
  • Performance. Should these tests be run locally? in CI?
@iaindillingham
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant