Commit Graph

1868 Commits

Author SHA1 Message Date
iagirre
d02b3e0486 Modifications to the spec to avoid using wait_for_ajax 2018-04-09 15:02:35 +02:00
iagirre
e2a91c6cc8 Modified the investments partial to fit the new budget_investments UI: valuating filter name has changed to under_valuation.
Modified the specs to fit the new UI for budget_investments
2018-04-09 15:02:35 +02:00
iagirre
b8cc10d218 Fix conflics after rebase 2018-04-09 15:02:35 +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
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
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
iagirre
d84895b800 Add test suite for the feature
The tests that will check the featute
is working well added. There are four test:

1. Checks that the emails are been send to
the user. The test looks for the link in there
and takes the token. Visits the page and
changes the password.

2 and 3. Both change the password by hand. One
uses a password written by the manager, whilst
the other uses the 'Generate random password'
option. Both tests check that the user can
sign in with the new passwords.

4. Checks that the password can be printed
when it is saved.
2018-04-02 09:43:17 +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