Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont display Cancel Order when order already paid
Is there some nice way of testing that a button with specific text is not shown? I tested via the number of visible buttons, which is not great. Overall the problem here is quite deep. In the views we have a "state machine" which resembles the one in Ordering::Order. We need it to know which buttons to display. The problem is similar to HATEOAS and rendering the possible links. How to do it without exposing aggregate internals? We can send new params with the state-changing events, but this leads to fatter events - maybe that's ok. Another problem here is that the test is integration level. This is wrong. Ideally, rendering the html would be part of the read model component. I don't know how to move the views to read model directories. I also don't know how to then call ERB rendering directly in the read model code. Hints welcome!
- Loading branch information