Commit Graph

7 Commits

Author SHA1 Message Date
decabeza
800027728a Add description to legislation questions 2023-02-22 00:52:51 +01:00
taitus
9f90125fa7 Add attribute anchor to link
Anchor needs to be added to the link to redirect directly to the comments section.
2022-08-19 15:40:51 +02:00
decabeza
00f0c4410d Remove unnecessary alert on legislation processes 2022-05-04 12:51:21 +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
9cfcbf2f3b Use visible texts in tests
Content like lowercase letters with `text-transform: uppercase` or
spaces after elements with `display: block` or "You're on page:" are not
seen that way by users with a browser supporting CSS.

So we're testing what most users actually experience.
2021-04-07 14:41:06 +02:00
Javi Martín
5a7298cefc Explicitly disable JS in legislation answer tests
The user experience with JavaScript enabled is actually very bad;
there's a usability issue here because it's impossible to change an
answer once a "radio button" is selected, which goes against the
standard practice on basically any HTML form.

Issue 4123 already mentions this problem. Until we fix it, we're
disabling JavaScript in these tests.
2021-04-07 14:35:30 +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