Commit Graph

1862 Commits

Author SHA1 Message Date
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
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
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
rgarcia
5a041e89c4 Fix change email address
Not sure how this error creeped in 😕 probably a new gem version or
other conflicting code

The problem was we were getting an `unpermitted param email` when
updating a user’s email address

This stackoverflow solution seems to work nicely 😌
https://stackoverflow.com/questions/17384289/unpermitted-parameters-addi
ng-new-fields-to-devise-in-rails-4-0#answer-19036427
2018-04-04 14:01:51 +02:00
rgarcia
7386a39f2d Fix specs 2018-04-04 13:21:21 +02:00
rgarcia
00c965b715 Clean up 2018-04-04 13:19:01 +02:00
rgarcia
2d3c4e1fbd Add group member count 2018-04-03 20:58:35 +02:00
rgarcia
1152f95965 Display valuator group assignments 2018-04-03 20:56:31 +02:00
rgarcia
fcb377c9e5 Remove description when creating valuator from index 2018-04-03 20:56:31 +02:00
rgarcia
7e839e7815 Filter by valuator group 2018-04-03 20:56:31 +02:00
rgarcia
bb82d533a3 Display valuators on valuator group's show 2018-04-03 20:56:31 +02:00
decabeza
6c68e9f8e7 Fixes specs 2018-04-03 20:56:31 +02:00
rgarcia
ab498d6d93 Assign groups to investments 2018-04-03 20:55:44 +02:00
rgarcia
1dbbe331c9 Assign valuators to groups 2018-04-03 20:55:44 +02:00
rgarcia
cddfdf4b84 Add valuator groups 2018-04-03 20:55:44 +02:00
Bertocq
c4049efa4a Fix notification expectations for read ones 2018-03-28 09:19:58 +02:00
Angel Perez
257a338916 Refactor flaky tests to avoid interaction with the UI 2018-03-27 14:47:51 -04:00
Angel Perez
dfbf4b8489 Refactor spec to use let syntax to DRY scenarios 2018-03-27 14:47:51 -04:00
Angel Perez
0a6ee897a7 Configure Capybara sessions to reset after each example 2018-03-27 14:47:51 -04:00
Angel Perez
92af93e8bd Fix failing tests that simulated a click against the DOM
The now-deprecated `.trigger('click')` API simulated a click against
the DOM rather a click on the UI, which made our tests fragile and
wouldn't simulate actual user interaction
2018-03-27 14:47:51 -04:00
Angel Perez
ff74d66405 Remove unnecessary extra expectation for 'Voting in booth' scenario 2018-03-27 14:47:50 -04:00
Angel Perez
26f2f2fea6 Refactor test to avoid interaction with non-visible element 2018-03-27 14:47:50 -04:00
Angel Perez
765d273bdf Fix failing scenario related to focused DOM element 2018-03-27 14:47:50 -04:00
Angel Perez
eb2926ab42 Fix failing scenario related to Headless Chrome window-size flag 2018-03-27 14:47:50 -04:00
Angel Perez
b3ce674ffc Enable previously disabled test scenarios 2018-03-27 14:47:50 -04: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
375c43b5f1 Replace deprecated .trigger('mouseover') API with .hover 2018-03-27 14:47:49 -04:00
Angel Perez
5c53466e86 Remove unnecessary status code related assertion 2018-03-27 14:47:49 -04:00
Angel Perez
450e8597eb Disable JavaScript on IE-specific scenarios 2018-03-27 14:47:49 -04:00
Angel Perez
122b17033b Use Selenium API to accept/dismiss JS modals/browser alerts
JS modals/browser alerts are not automatically accepted now with
Selenium, events that trigger such events must be wrapped in one
of the following methods: `accept_alert`, `accept_confirm` or
`dismiss_confirm`
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
Raimond Garcia
678faa17ec Merge pull request #2539 from consul/admin-budget-investments
Admin budget investment info
2018-03-27 20:21:03 +02:00
Raimond Garcia
c83dc13c56 Merge pull request #2538 from consul/admin-users
Admin users
2018-03-27 20:12:53 +02:00
rgarcia
09c44ee583 Extend notifications to be marked as read and unread 2018-03-23 11:47:06 +01:00
rgarcia
bdffb9765e Allow voting in multiple headings
Now that we have the option of voting in multiple headings per group,
the method of voting in a “different heading assigned” has become
deprecated and thus removed
2018-03-22 22:24:58 +01:00
rgarcia
730072e91e Add max votable headings to groups 2018-03-22 22:24:58 +01:00
Raimond Garcia
c1d7378c92 Merge pull request #2504 from consul/budget_group_name_edit
Allow Budget Group names to be edited
2018-03-22 22:12:04 +01:00
Alberto Calderón Queimadelos
7fad642f8d Merge pull request #2543 from wairbut-m2c/backport_1200_flaky_spec_poll_officing_officing_dashboard
Fix for flaky spec in Officing spec test file
2018-03-21 18:51:31 +01:00
Alberto Calderón Queimadelos
aeec82ca91 Merge pull request #2536 from wairbut-m2c/update_backport_1191_flaky_budget_investments_orders_random
Fix flaky spec: random investments order scenario
2018-03-21 18:41:44 +01:00
Raúl Fuentes
b9bd121655 Added test using have_content before selecting DNI or passport, the existence of the container is assured because have_conten waits for js to finish loading before checking 2018-03-21 17:24:00 +01:00
iagirre
7e90021cdf Change the method have_css for find
The old method have_css didn't wait, apparently,
the Capybara's max_wait_time.
It has been changed in favor of find,
one that waits the stablished time for
an element to appear in the screen.
2018-03-21 09:58:39 +01:00
decabeza
acebb07ddd Adds link to image and docs on admin budget investment info 2018-03-14 15:14:47 +01:00
decabeza
f05fdb88ea Adds link to username on admin users index view 2018-03-14 15:09:30 +01:00
Raúl Fuentes
cd5923c41d updated test, changed fixed seeds for the new seed function 2018-03-14 11:13:59 +01:00
Bertocq
c0986c7bfb Fix investment creation for single budget usage
Budget Investment factory creates a secondary budget as a collateral
effect because it has a Heading factory that has a Group factory that
creates a Budget.

This was resulting in problems due to having two "active" Budgets created
and `current_budget` method not choosing the one that we expected
2018-03-12 23:06:32 +01:00
Bertocq
8fd6f8f1d6 Valuators access to edit/valute on right phase
When a valuator tries to edit/valuate an investment outside valuating
phase, an explanatory message will be shown along with a redirect to
prevent access.
2018-03-12 20:22:53 +01:00
Alberto García
eba4a3c6cb Merge pull request #2528 from consul/budgets-message
Heading link on budgets message
2018-03-09 13:25:39 +01:00
Alberto García
8c6c567c76 Merge pull request #2525 from consul/social-share
Fixes social share buttons
2018-03-08 17:46:24 +01:00