Commit Graph

11202 Commits

Author SHA1 Message Date
Bertocq
b2951b120a Update Rubocop gem to 0.53.0 2018-04-04 19:26:29 +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
Bertocq
633cc1283b Fix Date & DateTime parsings to use default timezone
Date.new(...) does not take into account the current timezone, while other
parts of the application do. By default always parsing any date with the
default timezone and converting the resulting Time to Date would prevent
this kind of issues

DateTime.parse(...).in_time_zone gives an unexpected result, as the
DateTime.parse(...) will create a DateTime with +0000 time zone and the
`in_time_zone` will modify the DateTime to adjust to the default zone.

Maybe its better explained with an example, using 'Lima' as timezone:

DateTime.parse("2015-01-01")
> Thu, 01 Jan 2015 00:00:00 +0000

DateTime.parse("2015-01-01").in_time_zone
> Wed, 31 Dec 2014 19:00:00 -05 -05:00

And that's not the desired date but the previous day!
2018-04-04 14:21:39 +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
8bb4dde6ac Fix conflicts with fork 2018-04-04 13:19:07 +02:00
rgarcia
00c965b715 Clean up 2018-04-04 13:19:01 +02:00
rgarcia
a9a4ae8867 Update rails-html-sanitizer gem version
Security fix
https://gemnasium.com/gems/rails-html-sanitizer/versions/1.0.4
2018-04-04 01:20:57 +02:00
rgarcia
2d3c4e1fbd Add group member count 2018-04-03 20:58:35 +02:00
rgarcia
7a01745188 Add valuation permissions to groups 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
decabeza
573a272ff9 Changes redirect path on create valuator group 2018-04-03 20:56:31 +02:00
decabeza
d7c822c61a Adds missing i18n to valuator groups notices 2018-04-03 20:56:31 +02:00
decabeza
3163293626 Improves valuator groups index count 2018-04-03 20:56:31 +02:00
decabeza
13d0b08cb4 Adds styles and missing i18n for valuator groups 👨🏻‍🎨 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
0e61d49800 Fix english phone note translation 2018-04-03 12:35:07 +02:00
decabeza
c4dc7bc831 Adds view mode on debates 2018-04-02 17:28:39 +02:00
decabeza
bdedb023d1 Adds view mode on proposals 2018-04-02 17:27:52 +02:00
decabeza
2f5561bf03 Adds view mode on budget investments 2018-04-02 17:26:12 +02:00
decabeza
74ed61d159 Adds missing i18n 2018-04-02 17:25:23 +02:00
decabeza
a966a5b4a1 Adds view mode i18n, styles and new icon 2018-04-02 17:24:52 +02:00
decabeza
92157e1b47 Removes custom i18n on budgets yml 2018-04-02 17:24:42 +02:00
decabeza
2fb51710f8 Removes custom content on budget investment index 2018-04-02 17:22:59 +02:00
decabeza
e9f140ff23 Removes custom content on proposal show 2018-04-02 17:21:29 +02:00
decabeza
d0420790e9 Removes custom content on proposal index 2018-04-02 17:20:58 +02:00
iagirre
e8b91356b3 Backend functionality to let managers update users password
The back button when the user changes the password
(in the print password page) redirects to the
edit manually page.

The routes to access password edit pages has been added,
along with the ones to send reset password email and
reset password manually.
2018-04-02 09:43:24 +02:00
iagirre
3a62fc9bda Add UI to let manager change users password
A submenu has been added to the side menu's
'Edit user account' option. This submenu has
two options:

- Reset password via email: an email is send
so that the user can change their password by
themselves.
- Reset password manually: the manager has to
write the password manually (or generate a random
one).

The passwords generated by the random password
generator don't contain characters like $ or !.
It uses some capital letters, some other lower
case letters and some numbers. Ambiguous
characters like 1, l, I has been removed.
2018-04-02 09:43:24 +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
María Checa
ff872db039 Update changelog 2018-03-28 12:06:37 +02:00
Bertocq
471fe52ecc Replace deprecated to: for action: at routes
Running test suite the following appears: DEPRECATION WARNING: Defining
a route where `to` is a symbol is deprecated. Please change
`to: :json_data` to `action: :json_data`.
2018-03-28 09:21:00 +02:00
Bertocq
c4049efa4a Fix notification expectations for read ones 2018-03-28 09:19:58 +02:00
Alberto Calderón Queimadelos
0de3c070ee Merge pull request #2561 from consul/master_spec_fails
Improve README code syntax
2018-03-28 09:18:51 +02:00
Bertocq
53533e3809 Improve README code syntax 2018-03-28 09:13:56 +02:00
Raimond Garcia
ab1bb061e8 Merge pull request #2534 from wairbut-m2c/aperez-headless-chrome
Migration from PhantomJS to Headless Chrome
2018-03-27 21:53:46 +02:00
Angel Perez
257a338916 Refactor flaky tests to avoid interaction with the UI 2018-03-27 14:47:51 -04:00
Angel Perez
0fce8ca787 Fix incorrect assertion for nested imageable example
The example tests if a certain selector is hidden after adding
one image but the assertion expected said selector to be visible,
which made the scenario to fail at random
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
4269627790 Include ChromeDriver as prerequisite 2018-03-27 14:47:50 -04:00