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
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
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
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
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
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
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
0bf31bde6c
Updates all active to is-active classes
2018-06-06 12:02:13 +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
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
Alberto
1b52ecc9ec
Merge pull request #2614 from microweb10/issue-2604
...
Fixes Issue #2604
2018-05-09 11:26:16 +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
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
rgarcia
3dcbb6b976
Run random order tests without javascript
...
Speeds it up a little, there is no need to take into account javascript
in these tests
2018-04-05 22:16:54 +02:00
rgarcia
ef30dc1efe
Add defensive test to display correctly a user's votes
...
This is a defensive test, just in case we decide to go back to using
`setseed` instead of the `modulus`[1] approach to display investments
in random order
The reason for this test is that `setseed` only ~works in the next
`select` statement. And as when loading a user’s votes for investments
we do a second `select` it does not work as expected 😌
To solve this… we could call `set_random_seed` before loading a user’s
votes for an investment[2]
[1] https://github.com/consul/consul/pull/2131
[2]
https://github.com/AyuntamientoMadrid/consul/blob/master/app/controllers
/budgets/investments_controller.rb#L37
2018-04-05 22:16:54 +02:00
rgarcia
ce3cb045f8
Convert random seed to a small value
...
We are trying out a modulus function to return investments in random
order https://github.com/consul/consul/pull/2131
However we ran into the gotcha of having a seed value too big for the
modulus function to work as expected
If the seed is bigger than the investment id, the records are returned
ordered by id
By dividing the seed by a big number, this problem seems to get fixed
2018-04-05 22:16:54 +02:00
rgarcia
c4b6ad9ee6
Use strings instead of method calls in expectations
2018-04-04 14:38:36 +02:00
rgarcia
71bb5b3dcf
Fix display of unfeasibility explanation
...
We were missing a check to make sure valuation had finished before
displaying the unfeasibility explanation
2018-04-04 14:38:31 +02:00
decabeza
2f5561bf03
Adds view mode on budget investments
2018-04-02 17:26:12 +02:00
Angel Perez
ea21fe859b
Format dates with .strftime('%d/%m/%Y') when filling datepickers
...
Advanced search scenarios for Budget::Investments, Debates and
Proposals need proper date formatting as they behave unexpectedly
when APIs such as `7.days.ago` are used
2018-03-27 14:47:49 -04:00
Angel Perez
38af45d450
Replace deprecated .trigger('click') API with .click
2018-03-27 14:47:49 -04:00
Raúl Fuentes
cd5923c41d
updated test, changed fixed seeds for the new seed function
2018-03-14 11:13:59 +01:00
decabeza
1cc799ef11
Adds links to milestone description
2018-02-14 18:13:46 +01:00
Raúl Fuentes
ebebbdf078
Added bigger pool for random seeds, now with a 9 * 10e-07 % of chance of appearing, also added test to cover edge cases (case in fact, the coincidence of the seeds it's correct)
...
Conflicts:
app/controllers/budgets/investments_controller.rb
2018-02-08 16:33:15 +01:00
Raúl Fuentes
ae25fdfc15
fix for the flaky
2018-02-08 16:29:21 +01:00
Bertocq
67663804c5
Improve investments milestone scenario for ordering
...
Milestones should be listed ordered by publication date instead of
creation date. The spec was creating only one milestone and not even
expecting the descriptions to be present in the page.
2018-02-03 18:46:43 +01:00
BertoCQ
4020720b32
Merge pull request #2370 from consul/improve_budget_heading_style
...
Improve budget heading style
2018-01-31 02:35:51 +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
Raúl Fuentes
93268fc5d6
changed advanced filter from budgets to budgets/investments
2018-01-22 09:59:09 +01:00
Bertocq
808c4eddfc
Fix budget investment feature spec
2018-01-18 18:59:57 +01:00