Commit Graph

6 Commits

Author SHA1 Message Date
Javi Martín
ea913f9332 Use Capybara methods to find/click/check links
We applied the Capybara/SpecificMatcher in commit f52a86b46.  However,
this rule doesn't convert methods finding <a> tags to methods finding
links because <a> tags only count as links when they've got the `href`
attribute. For instance, in the `xss_spec.rb` file we check what happens
when clicking on an anchor tag because we're testing that the `href`
attribute has been removed and so we can't use `click_link`.

So, basically, we can't enable a rule to automatically detect when we're
using `have_css` instead of `have_link`, but we should still do it
because `have_link` adds an extra check which affects accessibility
since it makes sure the tag has the `href` attribute and so it's
recognizable as a link by screen readers.
2023-09-11 14:10:41 +02:00
Javi Martín
4cbf945228 Infer type for component specs automatically 2021-09-08 12:39:36 +02:00
Javi Martín
45517f659e Add SDG goals/targets to legislation proposals 2021-02-24 20:42:53 +01:00
Javi Martín
2968275a1c Add empty SDG homepage configuration page
Here we'll eventually display links to edit the homepage and the cards
in it.
2021-01-14 17:35:38 +01:00
Javi Martín
53af5749b9 Extract class to check SDG rendering conditions
This class provides a method which shows whether a certain process is
enabled.

Even if it uses a helper, this class is inside the models folder because
the helper it uses actually only uses model methods. We might eventually
remove/simplify this helper and cache inside the model, like we did with
I18n content translations in commit 41dba842a.
2021-01-09 14:19:00 +01:00
Javi Martín
ee06dcc05a Disable SDG sections when settings are disabled 2020-12-21 18:04:48 +01:00