Commit Graph

9098 Commits

Author SHA1 Message Date
Bertocq
d692ff781a Refactor Budget feature spec Index scenario
Budget's home page has changed, no longer we'll be showing a list of
active budgets, but only one current (open) budget and a list of
finished ones.

So no need to create 3 budgets in a row, but a finished budget (because
we already have a valid budget created)
2018-01-24 22:00:03 +01:00
Bertocq
62d7d08a10 Remove no longer valid scenarios: image&doc removal by admin 2018-01-24 21:50:13 +01:00
Bertocq
43c8506f84 Remove deprecated expecations about admin image&doc destroyal 2018-01-24 21:42:20 +01:00
Bertocq
6dcd01366c Preven admins from destroying others images&docs 2018-01-24 17:07:13 +01:00
Bertocq
97ec551178 Correctly check if user can destroy a document 2018-01-24 17:07:05 +01:00
Vicente Mendoza
c3327a5da0 rebase and fix test to attach max number of files 2018-01-24 16:55:39 +01:00
Bertocq
d6a6b99624 Fix rare flaky test, expect a price not just the number 2018-01-24 15:06:40 +01:00
Bertocq
e0abb86267 Update specs for new heading options naming rules
* Update budget heading order scenario to check new option name rules
* Update other scenarios that were expecting old heading naming convention
2018-01-24 14:15:10 +01:00
Vicente Mendoza
410caced3e test added for changes at documentable's view 2018-01-24 12:48:06 +01:00
Bertocq
31956312bf Make use of new single_heading_group? on existing similar logic 2018-01-24 12:17:46 +01:00
Bertocq
ce3bf20152 Add group name on heading options if more than one heading per group 2018-01-24 12:15:56 +01:00
Bertocq
9bb088a5c7 Add single_heading_group? helper at Budget::Group model 2018-01-24 12:15:43 +01:00
Bertocq
18a5bc6642 Make English the default locale 2018-01-24 11:37:43 +01:00
Bertocq
2a500a14bc Make budget admin feature spec linelenght compliant 2018-01-24 01:20:29 +01:00
Bertocq
bd64c4749f Update groups & headings management feature spec 2018-01-24 01:17:38 +01:00
Bertocq
d75fd59684 Align right heading amount & population at admin table 2018-01-24 01:12:38 +01:00
Bertocq
43137df4a5 Format heading price at admin table 2018-01-24 01:12:17 +01:00
Raimond Garcia
c96e8d1203 Merge pull request #2357 from consul/travis-logs
Clean up Travis logs
2018-01-23 21:31:29 +01:00
María Checa
3656c1d96f Updated changelog 2018-01-23 20:19:38 +01:00
María Checa
1c2949b60d Merge pull request #2344 from wairbut-m2c/aperez-investments-filters
Improvements for Admin::Budget::Investment filters
2018-01-23 20:09:54 +01:00
María Checa
0dd71e6bea Merge pull request #2349 from wairbut-m2c/iagirre-budgets-new-information-phase
Budget new "Information" phase
2018-01-23 19:46:49 +01:00
rgarcia
eee19ad690 Use scope to order headings by name 2018-01-23 19:35:42 +01:00
Bertocq
9e4559e374 Revert random district code on census api mock response 2018-01-23 18:38:07 +01:00
Bertocq
418dc6a1d6 Revert default map change 2018-01-23 17:30:42 +01:00
Alberto García
610e37870c Merge pull request #2367 from consul/budget-headings-order
Budgets groups headings order
2018-01-23 16:49:32 +01:00
Bertocq
2b8a32198b Improve dev_seeds generations around Budgets & Investments 2018-01-23 16:01:40 +01:00
Bertocq
c30c47cbb5 Improve default city map with 4 districts, and more real fake geozones 2018-01-23 15:59:24 +01:00
Bertocq
60515708e0 Fix indentations at dev seeds script 2018-01-23 15:57:38 +01:00
iagirre
4bb872bef7 Fixed errors detected in Travis 2018-01-23 15:42:01 +01:00
Raúl Fuentes
82b750de68 moved duplicated code to helper 2018-01-23 15:42:01 +01:00
iagirre
c37496601c Budget and phases specs updated (model specs) to include the new 'Information' phase 2018-01-23 15:42:01 +01:00
iagirre
846898f3ec New phase "Information" added and UI modified to not show the links.
Specs to test the functionality added.
2018-01-23 15:42:01 +01:00
decabeza
cb170766b4 orders budgets groups headings by name 2018-01-23 13:55:42 +01:00
iagirre
8f3df54453 Fixed errors detected in Travis 2018-01-23 13:33:10 +01:00
Bertocq
4dc07738b0 Fix rails translations for months, beware of crowdin PR's! 2018-01-23 12:51:05 +01:00
Bertocq
b998ca2e7a Add back nil at beginning of rails en months 2018-01-23 11:55:51 +01:00
Bertocq
b6cc816d0f Remove the end date adjustment at admin budget phase table 2018-01-23 02:13:11 +01:00
Bertocq
599442440b Correctly format Budget's phases dates 2018-01-23 02:07:49 +01:00
Bertocq
c41a8482d1 Fix spanish phase translations 2018-01-23 01:48:55 +01:00
Bertocq
2ad1f96d71 Fix rails english dates 2018-01-23 01:43:57 +01:00
Bertocq
d017b5bb49 Make Budget::Phase#invalid_dates_range? private 2018-01-23 00:23:22 +01:00
Bertocq
16b6abe2b8 Touch Budget object after updating a Budget::Pphase
Why:

We need to clear associated rails cache keys in order for changes to be
ready to be seen on the views

How:

* Just an after_save callback to a private method
2018-01-23 00:23:19 +01:00
Bertocq
e59ed81528 Return 404 accesing community without communitable
Why:

Somehow we're seeing communities without proposals at production. We
must find why and fix it, but first we need to throw a 404 at the user
instead of a 500 internal server error

How:

First catching the scenario of non-existent communitable at the
controller and raising a 404 error. Secondly preventing the author_id
access over a possibly nil object, this is a smell but it can't be
easily fixed right now... we need to correctly implement a relation
between Community and communitable and avoid the multiple occurences of
`community.from_proposal?` in the codebase that makes it impossible to
extend to a fourth communitable model.
2018-01-23 00:22:53 +01:00
Bertocq
cc69225b7a Assert phases list order in admins budget edit form 2018-01-23 00:15:06 +01:00
Bertocq
217f62116e Correctly scape budget phase summary on phases list 2018-01-22 23:29:48 +01:00
Alberto García
4ef3d54874 Merge pull request #2358 from consul/budgets-results-page
Budgets results page
2018-01-22 20:05:52 +01:00
decabeza
7a17db01ef adds links with filters on budgets results page 2018-01-22 19:27:54 +01:00
Angel Perez
3f6a9187ec Add 'current applied filters' message to investments partial 2018-01-22 14:04:57 -04:00
Angel Perez
1027896617 Reenable 'winners' tab under Admin::Budget::Investment 2018-01-22 14:04:57 -04:00
Angel Perez
a79e60ecd1 Add spec for Admin::Budget::Investment 'max_per_heading' filter 2018-01-22 14:04:56 -04:00