Commit Graph

14 Commits

Author SHA1 Message Date
Javi Martín
4cbf945228 Infer type for component specs automatically 2021-09-08 12:39:36 +02:00
Javi Martín
5f19d73b40 Use with_request_url in component specs
This method is available since view component 2.31.0, and greatly
simplifies tests depending on the current URL.
2021-08-12 22:58:29 +02:00
Javi Martín
6df7f7d052 Simplify changing controllers in component tests 2021-08-10 15:00:26 +02:00
Javi Martín
45517f659e Add SDG goals/targets to legislation proposals 2021-02-24 20:42:53 +01:00
Javi Martín
5f3279b9db Extract search form component in SDG Management
We're going to add some JavaScript which affect this component, and IMHO
it will be easier to know the JavaScript affects this form if both have
their own separate file.
2021-01-28 13:41:23 +01:00
Senén Rodero Rodríguez
c6407d82e3 Add filters to SDG relations controller
We have three filters: "pending", "all" and "reviewed". Where "pending"
is the default one.

Now we are rendering the `shared/_filter_subnav` partial we need to stub
helper methods defined at the controller and the helper methods that
rely on the request parameters to test the component.
2021-01-19 14:56:30 +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
36037bbc55 Merge pull request #4300 from consul/sdg_filters
Add SDG filters to advanced search
2021-01-11 13:11:09 +01:00
Javi Martín
cee4613d87 Merge pull request #4305 from consul/sdg_icons_in_index
Add SDG icons to related records
2021-01-11 13:07:11 +01:00
Javi Martín
8024c4bb69 Fix goal order in goal select 2021-01-10 15:54:23 +01:00
Javi Martín
c5a6ee74c4 Fix component specs using "within"
These specs were passing because the `within` method does not work in
components specs. We have to use `page.find` instead.
2021-01-09 15:48:12 +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
Senén Rodero Rodríguez
e9d52b5e11 Add subnavigation component to targets and goals
Add a new SDG component to make easier to create subnavigation menus.

Co-Authored-By: Javi Martín <35156+javierm@users.noreply.github.com>
2020-12-04 15:15:32 +01:00