Julian Nicolas Herrero
a421df31db
Merge pull request #3115 from consul/backport-1758-flaky_spec_currency_symbol
...
[Backport] Fix flaky spec checking price without currency symbol
2018-12-19 17:27:54 +01:00
decabeza
7316c16edd
Adds price explanation link on budget investments show
2018-12-19 13:52:17 +01:00
Raimond Garcia
ea435ac56c
Merge pull request #3112 from consul/rubocop_not_to
...
Add not_to Rubocop rule
2018-12-19 11:29:44 +01:00
Julian Herrero
7a690acf6c
fix flaky spec
...
bin/rspec --seed 53044
Failures:
1) Budget Investments Balloting Phase Confirm
Failure/Error: expect(page).not_to have_content "#{sp3.price}"
expected not to find text "100" in "Global Group - Global Heading You still have €999,989 to invest. Amount spent €11 Budget Investment 1006 title €10 Budget Investment 1005 title €1"
# ./spec/features/budgets/investments_spec.rb:1466:in `block (4 levels) in <top (required)>'
# ./spec/features/budgets/investments_spec.rb:1458:in `block (3 levels) in <top (required)>'
# -e:1:in `<main>'
Failed examples:
rspec ./spec/features/budgets/investments_spec.rb:1419 # Budget Investments Balloting Phase Confirm
2018-12-18 17:56:32 +01:00
Javier Martín
4782ca37d6
Merge pull request #3111 from consul/backport-customize_toda_la_ciudad
...
Remove custom "toda la ciudad" code
2018-12-18 13:03:51 +01:00
Julian Nicolas Herrero
2175339609
Merge pull request #3106 from consul/2918-crud_budget_groups_headings
...
Change CRUD for budget groups and headings
2018-12-18 10:23:24 +01:00
voodoorai2000
7917cea676
Change to_not for not_to
...
Eventhough some of us sentimentals still like the syntax `to_not` the current trend is to move to the new syntax `not_to`.
In this commit we are updating the references of expectations that used `to_not` to `not_to`.
2018-12-15 12:33:28 +01:00
Javi Martín
91d91f2ebf
Remove city heading specific code
...
This code accidentally made it to consul, and it's specific to Madrid.
2018-12-14 18:15:51 +01:00
Julian Herrero
6439be44f1
change CRUD for budget groups and headings
...
To make it more consistent with the rest of the Admin panel,
the CRUD for budget groups and headings has been changed
from the old "all-in-one" form to a separate form for each resource.
2018-12-14 16:34:54 +01:00
Julian Herrero
25e1afea48
fix map rendering for budget headings
2018-12-14 15:37:22 +01:00
Javi Martín
df29b49d05
Make milestones view reusable
2018-12-11 19:22:55 +01:00
Julian Nicolas Herrero
9aab3ddd7b
Merge pull request #3038 from MatheusMiranda/add_map_to_heading_page
...
Add map to sidebar on Heading's page
2018-12-11 16:32:35 +01:00
Javi Martín
a6adc0b5ab
Reduce I18n.t usage in spec
...
We also make the line shorter so rubocop doesn't complain.
2018-11-30 14:15:21 +01:00
Marko Lovic
c0f6fa182f
Make Milestones general, and not specific to Budget Investments
...
Generalize the Budget::Investment::Milestone model to a
polymorphic Milestone model so it can be used for entities
other than Budget::Investment.
2018-11-30 14:15:21 +01:00
Marko Lovic
81f516efd7
Change BudgetInvestmentStatus to Milestone::Status
...
Generalize the BudgetInvestmentStatus model to Milestone::Status so it
is not specific to budget investments, but can be used for any entity
which has milestones. This is in preparation to make the Milestone
model polymorphic and usable by entities other than budget investments.
2018-11-30 14:15:21 +01:00
Raimond Garcia
ed9e501ae7
Merge branch 'master' into add_map_to_heading_page
2018-11-27 11:07:16 +01:00
Matheus Miranda
06f07b1139
Add map to sidebar on Heading's page
...
Signed-off-by: Matheus Miranda <matheusmirandalacerda@gmail.com >
2018-11-16 09:05:23 +01:00
decabeza
9284453e69
Adds spec when no message is displayed
2018-11-14 13:56:22 +01:00
decabeza
dfa7148406
Shows unselected message only on balloting or later phase
2018-11-12 17:23:58 +01:00
decabeza
0c5ac8cba6
Removes custom path on budgets executions specs
2018-11-08 11:59:29 +01:00
decabeza
1d5335c782
Display last milestones image
...
Also adds a second order to ensure the order to display milestones with same publication date is always the same
2018-11-07 18:25:02 +01:00
decabeza
ba1a6b4cc8
Display first image available for milestones
2018-11-07 18:09:23 +01:00
voodoorai2000
5856af03a5
Fix exception when no available milestones
...
We were getting an exception when quering[1] for milestones which were not present, due to for example having a publication date later than today
Adding a `try` statement and spec to avoid this situation
[1] 82efc3dd66/app/controllers/budgets/executions_controller.rb (L16)
2018-11-07 18:08:10 +01:00
Javi Martín
9bacf39647
Fix link to create a new budget investment
2018-11-06 13:19:34 +01:00
María Checa
b6fdf732f2
Add total Investments in the execution list
2018-11-06 13:02:35 +01:00
María Checa
d089cc14a5
Add logic to handle budget investments with an execution process
2018-11-06 13:02:35 +01:00
Marko Lovic
406bbb4cdb
Avoid unnecessary navigation for faster specs
2018-11-06 13:02:35 +01:00
Marko Lovic
375fbf775f
Order non-city headings by alphabetical order
2018-11-06 13:02:35 +01:00
Marko Lovic
4758c1b91a
Show city heading in first position on executions list
2018-11-06 13:02:35 +01:00
Marko Lovic
8376efce3f
Hide headings with no investments
...
The page should not show any headings which don't have any
winning investments. The "no content" message should only be
shown when there are no headings with investments to avoid an
otherwise blank page.
__Note:__ in the main @headings query, _both_ #includes and #joins
are needed to:
1. eager load all necessary data (#includes)
and
2. to perform an INNER JOIN on milestones to filter out investments
with no milestones (#joins).
2018-11-06 13:02:35 +01:00
Angel Perez
a3ef662509
Filtering investments are based on the latest milestone status
2018-11-06 13:02:35 +01:00
Angel Perez
749954267d
Use Budget::Investment#winners scope to fetch only winner investments
2018-11-06 13:02:34 +01:00
Angel Perez
62b99f01bc
Show message for headings without winner investments
2018-11-06 13:02:34 +01:00
Angel Perez
5114792941
Add specs for budgets/executions feature
2018-11-06 13:02:34 +01:00
Alberto
fb19aafee7
Merge pull request #2778 from wairbut-m2c/backport/investments-moderation
...
Allow budget investments to be moderated
2018-07-27 12:34:17 +02:00
Alberto
9eacc5c5ff
Merge pull request #2753 from consul/unfeasibility-explanation
...
Fix display of unfeasibility explanation
2018-07-26 13:21:21 +02:00
María Checa
2dd5fe22a8
Removes permissions for admins to access unfinished budget results
2018-07-26 11:07:19 +02:00
decabeza
b4f7f8e0f3
Fixes show investment's price & cost explanation spec
...
Backport from AyuntamientoMadrid/consul
2018-07-24 12:25:48 +02:00
María Checa
8c69871cfa
Add logic to show only winner investments if budget is finished
...
Backported from AyuntamientoMadrid/consul
2018-07-24 11:33:38 +02:00
Angel Perez
018de5a9f9
Add specs for investments moderation
2018-07-20 18:42:34 -04:00
Alberto
81b102f002
Merge pull request #2577 from consul/random-order
...
Fix random order for budget investments
2018-07-20 18:31:37 +02:00
decabeza
bbaec57c8a
Adds message in budget investment show if project is winner
2018-07-13 18:37:16 +02:00
rgarcia
b3978908b2
Use strings instead of method calls in expectations
2018-07-10 18:08:47 +02:00
rgarcia
90bb06e684
Fix display of unfeasibility explanation
...
We were missing a check to make sure valuation had finished before
displaying the unfeasibility explanation
2018-07-10 17:57:41 +02:00
María Checa
fb5b993920
Add Budget::Investment::Statuses tests
2018-06-27 18:34:02 +02:00
decabeza
56ee33d947
Removes content pending to backport
2018-06-08 19:46:07 +02:00
Alberto
f345786cc0
Merge pull request #2622 from consul/selected-investments-map
...
Adds message to selected budget investments
2018-06-06 19:21:24 +02:00
decabeza
0bf31bde6c
Updates all active to is-active classes
2018-06-06 12:02:13 +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
María Checa
1169c10907
Add condition to show only selected investments in publishing_prices phase
2018-05-29 08:40:32 -04:00