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
Javi Martín
9a093d5f8a
Use let instead of instance variables
2018-11-30 14:15:21 +01:00
Marko Lovic
4c3dadf1fb
Add Rake task to migrate milestone data to new tables
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
Javi Martín
dc65c0cdb1
Fix space differences with Madrid's fork
2018-11-30 14:06:33 +01:00
Javi Martín
b153f5f902
Remove redundant Capybara actions
...
Resetting sessions and driver is automatically done by requiring
'capybara/rspec', as shown by the (lack of) that configuration for RSpec
in the Capybara README, manual testing of those settings, and Capybara's
code itself.
2018-11-30 13:37:16 +01:00
Javi Martín
2f860236a5
Reset page driver after every spec using it
...
There were some issues because some specs directly used the driver but
didn't reset it after the test.
2018-11-30 13:34:01 +01:00
Milber Champutiz Burbano
9f455b9165
Added feature to add content block to headings in sidebar -- rebase
2018-11-27 09:37:35 -05:00
Raimond Garcia
e23fbc8d58
Merge pull request #2970 from PierreMesure/Remove-icon-png-from-settings
...
Removed icon_home and fixed corresponding test
2018-11-27 11:11:51 +01:00
Raimond Garcia
181918330c
Merge pull request #3029 from clairezed/patch-1
...
Update debates_spec.rb
2018-11-27 11:09:15 +01:00
Raimond Garcia
ed9e501ae7
Merge branch 'master' into add_map_to_heading_page
2018-11-27 11:07:16 +01:00
Raimond Garcia
1b7a2adf56
Merge pull request #3034 from behraaang/bugfix/pagination-after-select
...
Fix pagination after selecting/unselecting budget investment
2018-11-27 11:04:41 +01:00
Raimond Garcia
2ef83619c3
Merge pull request #3048 from jaflutz/2930-draft-phase-processes
...
Adds draft phase functionality in legislation processes
2018-11-27 11:01:27 +01:00
decabeza
6d7c5f1b78
Refactors admin administrators spec
...
This refactoring avoids "Use let instead of an instance variable" rubocop warning
2018-11-22 11:41:59 +01:00
decabeza
ae3a2ed3f3
Adds administrator id on admin administrators index page
2018-11-22 11:41:54 +01:00
João Lutz
34b58a5208
Adds draft phase functionality in legislation processes
2018-11-19 22:18:50 -02: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
behraaang
88f01fb999
fix spec
2018-11-16 01:12:14 +03:30
behraaang
7a9888a793
Fix failed spec, add pagination spec for unselecting an investemnt
2018-11-15 23:30:08 +03:30
decabeza
46671fe447
Removes unnecessary pages
2018-11-15 11:52:57 +01:00
decabeza
9284453e69
Adds spec when no message is displayed
2018-11-14 13:56:22 +01:00
Javier Martín
40224fed39
Merge pull request #3008 from consul/backport-1194-fix_flaky_valuators_specs
...
Fix flaky spec: Admin budget investment mark/unmark visible to valuators
2018-11-14 13:34:45 +01:00
decabeza
5abeeb8588
Fixes date format on legislation helper
2018-11-14 12:41:22 +01:00
Raimond Garcia
6cfd0c2e13
Merge pull request #3030 from consul/fix-poll-results-accuracy
...
Fix poll results accuracy
2018-11-13 14:03:49 +01:00
Alberto
56a2978b87
Merge pull request #3033 from consul/budgets-unselected-message
...
[Backport] Budgets unselected message
2018-11-12 18:22:54 +01:00
decabeza
dfa7148406
Shows unselected message only on balloting or later phase
2018-11-12 17:23:58 +01:00
decabeza
13b3d9cebc
Fixes admin menu link when create a new widget
2018-11-12 17:11:17 +01:00
Juanjo Bazán
d8df2c1fa8
adds proper accuracy to spec
2018-11-11 14:54:58 +01:00
Claire Zuliani
3b5319508c
Update debates_spec.rb
...
If I trust https://github.com/consul/consul/blob/master/db/seeds.rb#L85 , debates recommendations Setting title is `recommendations_on_debates`, and not `recommendations_for_debates`.
2018-11-10 13:48:53 +01:00
Alberto
c25eb694bc
Merge pull request #3023 from consul/budget-executions
...
[Backport] Budget executions
2018-11-08 13:01:27 +01:00
decabeza
c8f49644ce
Fixes english translations
2018-11-08 12:07:13 +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
Javier Martín
bad750a896
Merge pull request #2864 from consul/backport_1543-budget_execution_list
...
Budget execution list
2018-11-07 15:44:57 +01:00
Javi Martín
579ea8ab43
Make capybara wait between valuation actions
...
As mentioned in the comments in PR #1256 :
"These failures take place because the checkbox is already present
before clicking in 'under valuation', and so Capybara doesn't have to
wait for the 'under valuation' request to finish before clicking the
checkbox."
So sometimes Capybara tries to check/uncheck the checkbox at the same
time that checkbox is being replaced by the new content, resulting in no
request being sent to the server.
Making Capybara check the page to ensure the new content is already
loaded before checking/unchecking the checkbox solves the problem.
2018-11-06 19:04:50 +01:00
decabeza
c049be6dae
Improves message when there are no budgets
2018-11-06 18:11:13 +01:00
Javi Martín
b2e15facce
Remove duplicated valuators specs
...
Since one of them was slightly different, I've kept the most recent one.
2018-11-06 17:23:22 +01:00
Javi Martín
9bacf39647
Fix link to create a new budget investment
2018-11-06 13:19:34 +01:00
Javi Martín
ab870c756a
Use Date.current to find published milestones
...
Using `Date.today` caused some milestones to be published before/after
the date defined by `Rails.application.config.time_zone`.
See also commit AyuntamientoMadird/consul@088c76d for a more detailed
explanation.
2018-11-06 13:02:35 +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