Commit Graph

7 Commits

Author SHA1 Message Date
Javi Martín
10cdfadb9b Move executions images system tests to the component
We forgot to do so in commit f0ab7bcfc. We're still leaving one system
spec to test that these images are rendered when browsing the site.

We're also changing the existing component tests to check the `alt`
attribute, just like the remaining system test does.
2024-11-07 14:21:55 +01:00
Javi Martín
75b03791b1 Extract component to render an execution
Note that, in order to be consistent with the name of the component,
we're renaming the `budget-execution` class to
`budget-executions-investment`.
2024-11-07 14:21:55 +01:00
Alberto
f563fc0b24 Replace back link on budget executions 2023-11-03 10:57:24 +01:00
Javi Martín
614e6da92b Use a submit button in budget executions filters
As mentioned in commit 5214d89c8, there are several issues with
submitting a form when a `<select>` tag changes. In particular, keyboard
users might accidentally fire the event while browsing the options, and
screen reader users will find a form with no obvious way to submit it.

In this case, there's an extra problem: in commit be8a0dbe8 we added a
second `<select>` field to this form, which also submitted on change.
Sometimes users changed one of the values and wanted to change the other
value as well before submitting the form. However, it wasn't possible,
because we would submit it before they had a chance to change the second
value.

So now we don't submit the form on change and add a submit button. This
is similar to what we do in the "Advanced filters" we use in several
places.
2021-06-30 14:14:43 +02:00
Javi Martín
ee4ef8d3a5 Use labels to select filters in executions tests
This way we check there's a label associated to these fields.
2021-06-29 20:07:55 +02:00
Javi Martín
92ddcb7aef Use JavaScript in system tests by default
JavaScript is used by about 98% of web users, so by testing without it
enabled, we're only testing that the application works for a very
reduced number of users.

We proceeded this way in the past because CONSUL started using Rails 4.2
and truncating the database between JavaScript tests with database
cleaner, which made these tests terribly slow.

When we upgraded to Rails 5.1 and introduced system tests, we started
using database transactions in JavaScript tests, making these tests much
faster. So now we can use JavaScript tests everywhere without critically
slowing down our test suite.
2021-04-07 14:41:06 +02:00
Javi Martín
9427f01442 Use system specs instead of feature specs
We get rid of database cleaner, and JavaScript tests are faster because
between tests we now rollback transactions instead of truncating the
database.
2020-04-24 15:43:54 +02:00