Julian Herrero
3a643f3c29
add test for unfeasible bugets investments
2018-04-30 13:55:48 +07:00
Julian Herrero
9a35389222
add locales (en) for unfeasible and not selected bugets investments
2018-04-30 13:49:41 +07:00
Julian Herrero
b7a16c3917
add message views for unfeasible and not selected bugets investments
2018-04-30 13:46:05 +07:00
Alberto Calderón Queimadelos
26f72e437b
Merge pull request #2599 from consul/remove_sitemap_generator_output
...
Remove sitemap generator output when running specs
2018-04-15 12:15:42 +02:00
Bertocq
23b15490ce
Remove sitemap generator output when running specs
...
When running tests there is no need to pollute rspec's output with any
kind of log/info.
2018-04-14 22:26:03 +02:00
Bertocq
a31b80fd76
Remove duplicated mailer entry
2018-04-13 07:40:09 +02:00
Alberto Calderón Queimadelos
5e7c522cc7
Merge pull request #2592 from consul/investment_valuator_groups_csv_table
...
Add valuator groups assigned to investments to admin tables & csv export
2018-04-11 22:52:13 +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
aacac71362
Extract Budget Investment to_csv to its own class
...
The csv generation doesn't seem like a Model concern, at least not taking
into account the amount of lines of the method (36+). Just a simple ruby
class that encapsulates the logic makes it easier to read and maintain as
we increase the columns exported.. also customize in case other forks need
different values.
2018-04-11 21:30:16 +02:00
Bertocq
83f4f4f65c
Remove unnecesary parameter at Investment to_csv
...
If there's only one usage of `to_csv` and the parameter has always the
same value... there's no good reason to bother using an additional argument.
2018-04-11 21:14:13 +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
Bertocq
b364fc475e
Move assigned_valuators from helper to model
...
There's no good reason to call assigned_valuators(investment) when the
logic can be at the model.
Also removed the valuator_groups texts to be added in an independent
method
2018-04-11 21:07:01 +02:00
Alberto Calderón Queimadelos
494062300b
Merge pull request #2585 from consul/document_upload_setting
...
Document upload setting
2018-04-10 13:59:32 +02:00
Bertocq
21ead40e26
Disable document upload & show with new setting
...
When Setting allow_attached_documents is disabled (false value) the user
should not be able to upload documents neither see the documents lists
2018-04-10 13:10:14 +02:00
Bertocq
e36c6c7781
Translate admin setting banner sections
2018-04-10 13:05:00 +02:00
Bertocq
35c156ba7a
Create setting to enable/disable attached documents
...
Add setting to both seed and dev_seeds as well as a rake task to make it
easier to set.
2018-04-10 12:46:09 +02:00
Alberto Calderón Queimadelos
01f421717d
Merge pull request #2578 from consul/fix_valuation_heading_filters
...
Fix valuation heading filters
2018-04-06 12:02:27 +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
Bertocq
0fceb1381f
Fix line length at admin investment controller
2018-04-06 00:37:10 +02:00
Alberto Calderón Queimadelos
cbd06c2e1c
Merge pull request #2576 from consul/refactor_for_valuator_groups
...
Add Valuator Group name validation & related specs
2018-04-06 00:22:58 +02:00
Bertocq
43d78c6c72
Adding Investment#by_valuator_group test scenario
...
Budget::Investment#by_valuator_group scope didn't had a test scenario
2018-04-06 00:22:41 +02:00
rgarcia
59805e9b73
Fix specs
2018-04-05 22:16:36 +02:00
Bertocq
48286f7de9
Validate ValuatorGroup#name presence & uniqueness
...
Why:
ValuatorGroup name should be unique and present to be able to identify
correctly each of them.
How:
- Adding a presence & uniqueness validation at the model
- Adding a sequenced value for name attribute at its factory
- Adding missing model spec that covers validations
2018-04-05 22:12:06 +02:00
Raimond Garcia
1692abc54a
Merge pull request #2374 from wairbut-m2c/upload_documents_feature
...
Upload documents feature
2018-04-05 19:39:12 +02:00
Raimond Garcia
5fae3c3c75
Merge pull request #2548 from wairbut-m2c/backport-let-manager-reset-users-password
...
Let managers reset user's password
2018-04-05 17:03:24 +02:00
Raimond Garcia
329a46888d
Merge pull request #2575 from consul/no-budgets
...
Display message in budget's index when there are no budgets
2018-04-05 16:39:17 +02:00
decabeza
563c1ebc93
Adds styles to no budgets message
2018-04-05 14:25:38 +02:00
rgarcia
39c6ac4a91
Display message in budget's index when there are no budgets
...
When there are no budgets we were seeing an exception in the budgets’
index
There are two parts to take into account here:
1) Making sure there is a current_budget present, otherwise we display
the “no budgets” message
2) The map helper is called from the controller, so we need to make
sure current_budget is present there too
Note: We could have added a bunch of `try` statements in the budgets’s
index, instead of using a conditional, however there are quite a few
`current_budget` calls so it seems more appropriate to use a conditional
2018-04-05 14:25:32 +02:00
Alberto Calderón Queimadelos
43390a632a
Merge pull request #2574 from consul/rubocop_update
...
Update rubocop gem from 0.53.0 to 0.54.0
2018-04-05 09:20:43 +02:00
Raimond Garcia
65f5ab424b
Merge pull request #2570 from consul/unfeasibility-explanation
...
Display unfeasibility explanation only when valuation has finished
2018-04-05 00:21:31 +02:00
Raimond Garcia
573885d0be
Merge pull request #2569 from consul/change-email
...
Fix to change email address from my account
2018-04-05 00:21:20 +02:00
Raimond Garcia
787657e07e
Merge pull request #2510 from consul/valuator-groups
...
Add valuator groups
2018-04-05 00:21:04 +02:00
Raimond Garcia
b9a1e19cbb
Merge pull request #2568 from consul/gems
...
Update rails-html-sanitizer gem version to 1.0.4
2018-04-05 00:20:49 +02:00
Bertocq
9a21734805
Update rubocop gem from 0.53.0 to 0.54.0
2018-04-05 00:08:13 +02:00
Alberto Calderón Queimadelos
288ec75fcd
Merge pull request #2524 from consul/rubocop_update
...
Rubocop & rubocop-rspec gem & config updates
2018-04-04 20:10:39 +02:00
Alberto Calderón Queimadelos
86d5fe3700
Merge pull request #2572 from consul/i18n_master
...
New Crowdin translations
2018-04-04 20:10:26 +02:00
Alberto Calderón Queimadelos
cb7e9f32f1
Merge pull request #2560 from consul/fix_route_deprecation_warning
...
Fix routes deprecation warning for `to:` usage
2018-04-04 20:10:11 +02:00
Alberto Calderón Queimadelos
d7d9f587da
Merge pull request #2559 from consul/fix_date_new_to_use_timezone
...
Fix date parsing to take the TimeZone in account
2018-04-04 19:45:15 +02:00
Bertocq
746fef60da
Add indonesian translations
2018-04-04 19:39:54 +02:00
Bertocq
3aaf466939
Update galician translations
2018-04-04 19:39:12 +02:00
Bertocq
3ef955101b
Add german translations
2018-04-04 19:38:20 +02:00
Bertocq
16bf8bcdd0
Update nl translation
2018-04-04 19:37:07 +02:00
Bertocq
c863b0724a
Update catalan translation
2018-04-04 19:36:42 +02:00
Bertocq
db02dd26ab
Update french translations
2018-04-04 19:36:26 +02:00
Bertocq
c1bfd99be5
Update hebrew translations
2018-04-04 19:35:16 +02:00
Bertocq
988e7d44ed
Update Valencian translations
2018-04-04 19:34:31 +02:00
Bertocq
2bf019f08b
Disable DynamicAttributeDefinedStatically cop
...
rubocop-rspec includes a FactoryBot cop DynamicAttributeDefinedStatically
that enforces declaring dynamic attribute values in a block. It was
decided not to follow this convention. Explicitly disabling it gives
more insight about current rubocop rules.
http://www.rubydoc.info/gems/rubocop-rspec/1.24.0/RuboCop/Cop/RSpec/FactoryBot/DynamicAttributeDefinedStatically
2018-04-04 19:28:15 +02:00
Bertocq
e2c42a3c63
Enable StaticAttributeDefinedDynamically cop & fix
...
rubocop-rspec gem includes cops for FactoryBot like the new
FactoryBot/StaticAttributeDefinedDynamically to enforce declaring
static attribute values without a block.
* http://www.rubydoc.info/gems/rubocop-rspec/1.24.0/RuboCop/Cop/RSpec/FactoryBot/StaticAttributeDefinedDynamically
2018-04-04 19:28:15 +02:00
Bertocq
d3d9573086
Enable new Rails/HttpStatus cop without issues
...
rubocop-rspec 1.23.0 release introduced the cop RSpec/Rails/HttpStatus
to enforce consistent usage of the status format (numeric or symbolic).
* https://github.com/rubocop-rspec/rubocop-rspec/pull/553
* https://github.com/rubocop-rspec/rubocop-rspec/releases/tag/v1.23.0
2018-04-04 19:28:15 +02:00