Commit Graph

851 Commits

Author SHA1 Message Date
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
decabeza
f3ef5ae71e Fixes poll questions answer images absolute path spec 2018-05-03 20:12:44 +02:00
Alberto
a709f846be Merge pull request #2046 from wairbut-m2c/aperez-removable-admin-answer-images
Removable answer's associated images
2018-05-03 17:24:48 +02:00
Alberto
1e8f4c7f32 Merge pull request #2342 from wairbut-m2c/iagirre-budgets-column-show-valuators
Budget: add column show to valuators
2018-04-30 17:49:15 +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
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
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
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
Angel Perez
257a338916 Refactor flaky tests to avoid interaction with the UI 2018-03-27 14:47:51 -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
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
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
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
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
Bertocq
d3a572e542 Avoid explicity ID values on fixtures if possible
The specs don't care about the actual ID value, only about using the
same value. Fixed ID values cause flaky specs and high maintenance issues
2018-03-08 14:48:07 +01:00
Bertocq
16bec030ad Cleanup spec files from I18n calls 2018-03-02 09:17:29 +01:00
Raúl Fuentes
8f4d48690b Added tests for edit the name of any Budget::Group 2018-03-02 09:17:03 +01:00
Bertocq
6b41b6487b Add UserSegments#user_segment_emails helper method
Why:

Both Newsletters and Email Downloads need the same logic: To extract the
emails from all the users in the segment that have newsletter flag
active, removing all empty email values.

How:

1- UserSegments#user_segment_emails holds that repeated logic and is used
on both Newsletter & EmailDownload.

2- Rename Newsletter#list_of_recipients to list_of_recipient_emails as
it is more descriptive. There is no need to pass entire Users around,
only the emails are needed at Mailer#newsletter method.

3- Cleanup Newsletter#list_of_recipient_emails model spec scenario
2018-03-01 20:59:20 +01:00
Bertocq
99851e9588 Remove empty emails from users segments recipients
Why:

User with an empty email value (nil) should not appear in the recipient
list for a given UserSegment at Newsletters or Email Downloads.

How:

Using Enumerable#compact and Enumerable#select to filter out empty emails

Increasing Email Download feature spec and Newsletter model spec to cover
all possible scenarios including the nil email one.
2018-03-01 20:09:32 +01:00
Bertocq
7dfa056fe0 Add invalid newsletter scenarios to feature spec
Newsletters with an invalid user segment should display a warning on
show and index. Also those newsletters should not be sent.
2018-02-21 11:46:23 +01:00
Bertocq
4becd0eb35 Change Newsletter's segment_recipient to string
Why:

Newsletter attribute `segment_recipient` is an integer to be used as
enum. There's no advantage to store a number instead of an string if the
ammount of elements in the table is not going to be huge, or we can take
advantage of using an enum.

Also maintaining both Newsletters enum paired with UserSegments::SEGMENTS
would be a maintenance burden.

How:

* Migration to change segment_recipient column from integer to string
* Removing enumeration from Newsletter model class
* Using UserSegments::SEGMENTS instead of Newsletter.segment_recipients
or integer values
2018-02-21 11:46:11 +01:00
María Checa
752ffd678f Added download emails spec and renamed newsletters spec 2018-02-20 22:33:01 +01:00
María Checa
24bca36639 Merge branch 'master' into admin-newsletter-emails 2018-02-14 16:07:13 +01:00
María Checa
e8c797766a Added newsletter specs 2018-02-14 16:06:33 +01:00
Bertocq
9aa6d646d4 Remove usage of instance variables at specs 2018-02-10 19:34:54 +01:00
Raimond Garcia
f5c5293321 Merge pull request #2444 from consul/specs
Improve spec boot time and clean up logs
2018-02-06 17:15:03 +01:00
rgarcia
6f4d23fdef Remove circular argument reference warning
We were seeing this warning when running specs
`spec/features/admin/budgets_spec.rb:322: warning: circular argument
reference - phase_kind`

This commit should fix the warning
2018-02-06 12:22:34 +01:00
BertoCQ
087c8b0a99 Merge pull request #2395 from consul/hidden-comments
Hidden comments
2018-02-05 20:27:05 +01:00
Bertocq
d3d5b233c2 Increase admin investment feature spec for valuation comments feature 2018-01-31 17:08:08 +01:00
Angel Perez
47c9b343ee Admins can search investments by title or ID (#2401) 2018-01-31 09:52:55 -04:00
Angel Perez
137aa7e779 Add spec to test aggregation when filtering investments 2018-01-31 07:21:51 -04: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
f0f41b0403 Merge pull request #2373 from consul/single_heading_group_names
Improve heading names at select boxes
2018-01-31 02:35:11 +01:00