We were expecting translation parameters in legislation processes
`update` action. However, those parameters aren't sent when we get to
that action through the "proposals" tab.
There's no reason to only convert Markdown to HTML in translations when
their body changes but to always convert it when the "main" body field
changes.
Whether we should always use the condition or never use it is something
we can debate about, though.
They were failing if executed right before midnight. If the process is
created right before midnight and then the date changes, when we visit
the process path the phase will aready be open.
It was failing when executed right before midnight due to the date
changing between the moment the notification is created and the moment
the test checks the notification shows the current date.
Most factories were using dynamic times and dates since commit 0cf799a.
However:
* At the time, commits AyuntamientoMadrid/consul@71f5351 and
AyuntamientoMadrid/consul@a476a30 (which introduced static times/dates
in factories) hadn't been backported.
* The changes in commit 0cf799a overlooked the factory
`proposal_notification`.
This required changing the `voted_before_sign_in` slightly in order to
change what the method returns if the user signed in and voted at the
exact same microsecond.
It doesn't affect production code because it would be impossible for the
user to do both things at the same time.
As a side effect, the method now returns what the method name suggests.
Before this change, the correct method name would have been
`voted_before_or_at_the_same_time_of_sign_in`.
As a less desirable side effect, in the tests now we need to make sure
at least one second passes between the moment a user votes and the
moment a user signs in again. One microsecond wouldn't work because
the method `travel_to` automatically sets microseconds to zero in order
to avoid rounding issues.
In Madrid, the button text didn't change depending on whether the form
is for the "new" page or for the "edit" page.
In consul, the buttons texts were "create admin notification" and
"update admin notification" instead of "create notification" and "update
notification".
Also change translation key from "submit" to "submit_button" to
match other instances.
Using `have_content` detected textareas, but not text input contents.
All credit to Marko (mlovic) for finding the issue and suggesting the
implemented solution.