Commit Graph

95 Commits

Author SHA1 Message Date
Anna Anks Nowak
0affaaee7e Refactor sorting specs to work with direction 2019-01-10 16:11:46 +01:00
Javi Martín
7c06320f39 Fix typo 2019-01-09 12:55:27 +01:00
Javi Martín
be864ee92f Make sure selected investment is visibile in spec
After changing the order for budget investments, the selected investment
didn't appear on the first page anymore, and so it couldn't be clicked
on during the test.
2019-01-09 12:55:22 +01:00
María Checa
650fe2553e Add default order for admin budget investments list
When there's no sorting option selected, by default it orders the investment list by supports and, for those with the same number of supports, by ID.
2019-01-02 12:52:28 +01:00
Javi Martín
3e83b5893c Make milestone specs reusable 2018-12-11 19:22:55 +01:00
Julian Nicolas Herrero
14d4d175d4 Merge pull request #3064 from microweb10/budget_investments_valuator_group_spec
Add missing feature spec Admin budget investments Edit Do not display valuators of an assigned group
2018-12-05 10:10:09 +01:00
Julian Herrero
43dac8d276 add missing spec 2018-12-02 17:45:39 +01:00
Raimond Garcia
1b7a2adf56 Merge pull request #3034 from behraaang/bugfix/pagination-after-select
Fix pagination after selecting/unselecting budget investment
2018-11-27 11:04:41 +01:00
behraaang
88f01fb999 fix spec 2018-11-16 01:12:14 +03:30
behraaang
7a9888a793 Fix failed spec, add pagination spec for unselecting an investemnt 2018-11-15 23:30:08 +03:30
Javi Martín
579ea8ab43 Make capybara wait between valuation actions
As mentioned in the comments in PR #1256:

"These failures take place because the checkbox is already present
before clicking in 'under valuation', and so Capybara doesn't have to
wait for the 'under valuation' request to finish before clicking the
checkbox."

So sometimes Capybara tries to check/uncheck the checkbox at the same
time that checkbox is being replaced by the new content, resulting in no
request being sent to the server.

Making Capybara check the page to ensure the new content is already
loaded before checking/unchecking the checkbox solves the problem.
2018-11-06 19:04:50 +01:00
Javi Martín
b2e15facce Remove duplicated valuators specs
Since one of them was slightly different, I've kept the most recent one.
2018-11-06 17:23:22 +01:00
Angel Perez
601391954a Refactor tests to interact directly with the UI rather than with the DOM 2018-09-10 11:41:37 -04:00
Angel Perez
c240c57171 Add budget investment factory to fix failing scenario
Changes introduced in commits 41f66fa and dc87b75 will render the
'See results' button under `admin/budget_investments` only if a
finished budget has winner investments associated with it
2018-07-26 14:54:20 +02:00
María Checa
15a07ad4eb Adds logic to show 'see results' button only for finished budgets 2018-07-26 14:31:42 +02:00
Alberto
89f2f53e75 Merge pull request #2799 from wairbut-m2c/backport-2588-fix_supports_filter
Fix `max_per_heading` filter in Admin budget investments list
2018-07-26 14:11:03 +02:00
Alberto
f93b1e24fb Merge pull request #2797 from wairbut-m2c/fix-admin-budget-investments-spec
Fix order-dependent spec
2018-07-26 13:57:04 +02:00
Alberto
d17b628426 Merge branch 'master' into backport-2588-fix_supports_filter 2018-07-26 13:44:20 +02:00
María Checa
5dfefbbe2f Change admin budget investments list order by supports from less to more
Sorting by id is in descending order and by title ascending

Backported from AyuntamientoMadrid/consul
2018-07-26 12:24:53 +02:00
Marko Lovic
b816a5be00 Fix order-dependent specs
Due to how DB IDs are assigned with AUTO INCREMENT, tests
cannot assume that any specific ID will be available.
2018-07-26 11:25:51 +02:00
Alberto
7b8003dcb9 Merge pull request #2790 from wairbut-m2c/backport-1421-investments_csv_fixes
Add visible_to_valuators and author_username to admin investments CSV
2018-07-25 18:41:29 +02:00
María Checa
e9d73eb687 Fix max_per_heading filter in Admin budget investments list
Also changed the name of the param to `min_total_supports`, which is more descriptive on what it actually does.

Backport of 75f20d5 and 07f0806 from AyuntamientoMadrid/consul fork
2018-07-25 15:44:51 +02:00
Marko Lovic
601e3058d8 Add visible_to_valuators and author username to admin investments CSV
Backport based on 012e4be by María Checa from AyuntamientoMadrid/consul fork
2018-07-25 15:10:56 +02:00
Alberto
61589122ef Merge pull request #2723 from wairbut-m2c/backport_2400_combine_free_text_search_and_filters
Combine text search and filters for Investments on Admin panel
2018-07-25 14:42:19 +02:00
Marko Lovic
53a1ea8847 Fix spec 2018-07-25 14:15:37 +02:00
decabeza
f213768035 Removes duplicated spec 2018-07-05 18:14:22 +02:00
Raúl Fuentes
275f9ad812 Added new test to budget/investment/index, tested the combination between text search and any other option in the search form 2018-07-04 11:55:13 +02:00
Raúl Fuentes
ee19c2fef0 Fixed test for updated form 2018-07-04 11:55:13 +02:00
Raúl Fuentes
df899cde6e Fixed html, now it reflects the current search also added serach by name or id to the Budget::Invesment search function 2018-07-04 11:55:13 +02:00
Raúl Fuentes
4cd2f11723 Fixed test for the refactored form 2018-07-04 11:55:13 +02:00
decabeza
55097ac643 Updates specs for show to valuators checkbox 2018-06-08 18:59:53 +02:00
iagirre
73b0fe5162 Modified feature spec to pass with the new UI
Add feature spec to test if the 'Calculate winners'
button is enabled or not, depending on the phase.
It also checks the message that clarifies why the
button is disabled.
2018-05-29 10:27:16 +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
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
ab498d6d93 Assign groups to investments 2018-04-03 20:55:44 +02: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
decabeza
acebb07ddd Adds link to image and docs on admin budget investment info 2018-03-14 15:14:47 +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
9aa6d646d4 Remove usage of instance variables at specs 2018-02-10 19:34:54 +01:00
Bertocq
d3d5b233c2 Increase admin investment feature spec for valuation comments feature 2018-01-31 17:08:08 +01:00