Commit Graph

2271 Commits

Author SHA1 Message Date
decabeza
ee884ed998 Updates active to is-active class for menus 2018-06-06 12:01:16 +02:00
Alberto
a05f6ac61a Merge pull request #2641 from consul/homepage
Add customization of homepage from admin section
2018-06-01 19:18:44 +02:00
Alberto
ec58ada817 Merge pull request #2650 from aamarill/2586-split_admin_settings
Split admin settings
2018-06-01 19:18:14 +02:00
decabeza
ef57396f9d Fixes styles for admin homepage 2018-06-01 18:00:19 +02:00
Raimond Garcia
eea0c74707 Merge pull request #2654 from wairbut-m2c/backport/budgets-map-fixes
Budgets homepage map fixes
2018-05-31 23:19:34 +02:00
Raimond Garcia
0ace0775b8 Merge pull request #2372 from wairbut-m2c/iagirre-move-calculate-winners-button
Budget: move calculate winners button
2018-05-31 22:53:59 +02:00
rgarcia
b672a4550d Add option to configure feed items displayed in homepage 2018-05-29 19:58:04 +02:00
Angel Perez
2c0475fc54 Fix failing specs for budget investments tags 2018-05-29 09:19:43 -04:00
María Checa
1169c10907 Add condition to show only selected investments in publishing_prices phase 2018-05-29 08:40:32 -04:00
decabeza
304143d051 Updates localization and home specs 2018-05-29 13:22:23 +02:00
iagirre
73b0fe5162 Modified feature spec to pass with the new UI
Add feature spec to test if the 'Calculate winners'
button is enabled or not, depending on the phase.
It also checks the message that clarifies why the
button is disabled.
2018-05-29 10:27:16 +02:00
decabeza
316c816836 Expands cards if feed processes is not enabled 2018-05-28 18:52:59 +02:00
rgarcia
ad181b0e10 Add label to cards
Also removes unused fields related to buttons and alignment
2018-05-28 18:17:26 +02:00
rgarcia
eaebf349df Fix specs
Regarding the feature ‘Carousel size’:
There is no need to test styling in specs, it changes too often
There are nice ways to test it, but it seems a little too much right
Review later on
2018-05-28 18:17:26 +02:00
rgarcia
5fe0dd46b9 Add homepage configuration for user recomendations 2018-05-28 18:17:26 +02:00
rgarcia
0e097973cc Add widget feeds to homepage
Note there is some funkiness going on with class loadings
Had to create a `feed` and `widget_feed` table even though in this
first version the Widget::Feed includes only uses ActiveModel instead
of ActiveRecord, otherwise some specs failed

We’ll figure it out and clean up 😌
2018-05-28 18:17:26 +02:00
rgarcia
c7f85c4173 Add widget header to homepage 2018-05-28 18:17:26 +02:00
rgarcia
664e77305c Add widget cards to homepage 2018-05-28 18:17:26 +02:00
rgarcia
85c08da7a6 Add homepage admin section 2018-05-28 18:17:26 +02:00
Angel Perez
9575aa5a42 Fix failing specs for skipping invalid map markers 2018-05-28 11:44:53 -04:00
rgarcia
994e15666e Skip invalid map markers
Why:
Sometimes the latitude or longitude it passed to the map as *********
instead of the actual latitude or longitud. The asterisks are not a
string, breaking the whole array
https://github.com/consul/consul/issues/2380

What:
This commits skips invalid markers and displays the rest

How:
- Substituting the mysterious asterisks for null
(cleanInvestmentCoordinates)

- Validating the coordinates are numbers before trying to pain
them(validCoordinates)

- Adding a numeric function to validate the latitude and longitude
(isNumeric)
https://stackoverflow.com/questions/9716468/is-there-any-function-like-i
snumeric-in-javascript-to-validate-numbers#answer-9716488
2018-05-28 11:44:53 -04:00
Adan Amarillas
361518b57c Modify tests to reflect the new navigation on admin configuration settings 2018-05-24 14:49:31 -07:00
Adan Amarillas
1d974c41e3 Add missing i18n keys to locales 2018-05-24 12:27:07 -07:00
Adan Amarillas
2c5cefcfdd Adjust tests to new navigation. Add id tag to map tab so it can be found by id 2018-05-24 09:55:51 -07:00
Angel Perez
4c0deb0eca Remove video_url attr from Admin::Poll::Question form 2018-05-23 07:27:12 -04:00
Angel Perez
44b1eb929a Move 'Show stats and results' form to Admin::Poll#results tab 2018-05-23 07:27:12 -04:00
Raúl Fuentes
83ca0656b4 Add test for all functinality
new setting set to nil on test to prevent prevent unforeseen
consequences on testing environment
2018-05-22 15:41:10 +02:00
Antonis Tzorvas
c21d806ecc Refs #2603 Show 'See Results' button in admin panel 2018-05-19 13:38:02 +03:00
decabeza
f1e722ac5c Adds message to selected budget investments 2018-05-10 14:54:34 +02:00
decabeza
5bcec351ef Improves admin content translatable ui 2018-05-10 09:01:12 +02:00
iagirre
4e5c9e2166 Modify specs to work with new features
Add specs to check that the translations
are being deleted correctly and the
current locale tab is highlighted when the
admin visits the edit milestone page.
2018-05-09 16:12:47 +02:00
rgarcia
f7486b9238 Add Globalize to Milestones 2018-05-09 16:05:44 +02:00
Alberto
1b52ecc9ec Merge pull request #2614 from microweb10/issue-2604
Fixes Issue #2604
2018-05-09 11:26:16 +02:00
decabeza
f3ef5ae71e Fixes poll questions answer images absolute path spec 2018-05-03 20:12:44 +02:00
Alberto
a709f846be Merge pull request #2046 from wairbut-m2c/aperez-removable-admin-answer-images
Removable answer's associated images
2018-05-03 17:24:48 +02:00
Alberto
1e8f4c7f32 Merge pull request #2342 from wairbut-m2c/iagirre-budgets-column-show-valuators
Budget: add column show to valuators
2018-04-30 17:49:15 +02:00
Julian Herrero
833670117e add test for not selected bugets investments 2018-04-30 13:59:57 +07:00
Julian Herrero
3a643f3c29 add test for unfeasible bugets investments 2018-04-30 13:55:48 +07:00
Alberto García
223c06f588 Merge pull request #2567 from consul/mode-view
Mode view
2018-04-27 19:28:54 +02:00
decabeza
b93543cbf9 Shows message only if there is questions on legislation debate 2018-04-27 18:24:53 +02:00
decabeza
3f7395fa19 Adds message on polls index if there are no open polls 2018-04-27 18:24:17 +02:00
Bertocq
33b6fa3a02 Refactor Investment csv download with filters test
There's no need to check again headers in this scenario, previous one
already does it.

Correctly naming variables, as well as using explicit expectations is a
good idea.

Last but not least, expectations where reversed but by luck or lack of
attention where passing.
2018-04-11 21:32:59 +02:00
Bertocq
71003875ae Refactor Investment CSV export download scenario
The created investment didn't had all data to correctly assert each
column values are correctly exported.

The expectations checking if each particular text appears are invalid in
this test. The objective is to check that the downloaded file contents
are exactly as they should be... not particular parts checked in an
independent way as for example "Yes" could appear in two different
columns and just looking if the text appears is not a valid assertion.
2018-04-11 21:32:57 +02:00
Bertocq
1dc8d29f2d Add Valuator Groups list to investment csv & table
We've added the list of valuator groups assigned to each investment at
 both admin investment list and investment csv exported file
2018-04-11 21:12:46 +02:00
iagirre
21a6d3495a Update PR with master
Rebase master branch so that this PR can
be updated with the latest changes.
Conflicts has been solved and some specs
updated to fit the new changes. dev_seeds
has been also adapted to the new format.
2018-04-09 16:11:06 +02:00
iagirre
d02b3e0486 Modifications to the spec to avoid using wait_for_ajax 2018-04-09 15:02:35 +02:00
iagirre
e2a91c6cc8 Modified the investments partial to fit the new budget_investments UI: valuating filter name has changed to under_valuation.
Modified the specs to fit the new UI for budget_investments
2018-04-09 15:02:35 +02:00
iagirre
b8cc10d218 Fix conflics after rebase 2018-04-09 15:02:35 +02:00
Bertocq
09fb4701b8 Fix Valuation Investment index heading filters
Why:

Heading filter where not being correctly displayed

How:

Increasing scenario to cover all possible combinations, and fixing the
heading_filters method of the Valuation Budget Investment Controller to
correctly:
  * Find how many investments the valuator can access
  * Count investments for each heading
2018-04-06 00:42:36 +02:00
rgarcia
65e2360650 Use a float smaller than 1 as a random seed
By using a random seed value smaller than 1, we solve the previous
situation[1] in a simpler way

This test is now obsolete.
It’s hard to write a tests to verify that even with a big seed in
params, we will covert it to a float smaller than 1.

We should refactor these `set_random_seed` methods into a nice model or
controller concern and test it thoroughly

[1]
https://github.com/AyuntamientoMadrid/consul/commit/ba3bf11526fc6ce9c66f
647c414946c61ff945fe
2018-04-05 22:16:54 +02:00