Commit Graph

3706 Commits

Author SHA1 Message Date
decabeza
43dd3d2169 Include mailer header logo on custom images list 2019-05-21 11:22:04 +02:00
decabeza
035b11c460 Hide select text if budget finished 2019-05-17 17:42:58 +02:00
decabeza
625c34bac2 Add officer email on admin poll shifts table 2019-05-17 17:41:42 +02:00
decabeza
0c704c2f06 Replace i18n destroy to delete 2019-05-17 17:41:38 +02:00
Alberto
d845c6e973 Merge pull request #3476 from consul/delete-poll
Allow delete polls with associated questions and answers
2019-05-17 17:38:20 +02:00
Alberto
7c79965547 Merge pull request #3397 from consul/proposals-form
Remove question and external_url fields from proposals and legislation proposals
2019-05-17 17:08:56 +02:00
María Checa
fac99cfb10 Add web and booth participants in budget stats 2019-05-16 22:01:42 +02:00
María Checa
c2457e36a5 Add budget stats permissions for normal users and admins 2019-05-16 22:01:42 +02:00
Marko Lovic
70e108d593 Simplify spec 2019-05-16 22:01:42 +02:00
Marko Lovic
0c5f801c19 Keep DB clean after running budget stats spec
This spec was leaving the DB "dirty" because it was creating
records in a before(:all) hook. These records are not cleaned up
automatically when using the :transaction strategy for DatabaseCleaner.

Using before(:each), however, causes another problem. Some of the code
depends on the heading id being 1 (see app/models/budget/ballot/line.rb#L48).
Because of SQL auto-increment, this is only the case the first time the hook
is run, as different id's are assigned on subsequent runs. This is fixed
by forcing the id to always be 1.
2019-05-16 22:01:42 +02:00
María Checa
3291b3274a Added physical votes to stats 2019-05-16 22:01:42 +02:00
kikito
71fd3657d3 makes all users old enough to vote by default when created for the specs 2019-05-16 22:00:51 +02:00
Javier Martín
668b6cfd73 Merge pull request #3499 from consul/backport-admin_stats
Add admin budget stats
2019-05-16 20:41:39 +02:00
Juanjo Bazán
f22a97468b makes code heading_id agnostic 2019-05-16 14:45:46 +02:00
Juanjo Bazán
110ee961e3 adds budget stats for final voting to admin stats 2019-05-16 14:45:46 +02:00
Juanjo Bazán
5be54b57da reduces current admin budget stats as supporting phase 2019-05-16 14:45:45 +02:00
rgarcia
11437a1d40 add budget investment stats 2019-05-16 13:41:49 +02:00
rgarcia
be757f79d0 cleans up 2019-05-16 13:37:47 +02:00
rgarcia
b628631769 fixes specs 2019-05-16 13:37:47 +02:00
rgarcia
1f8d19c8ba adds basic graph specs 2019-05-16 13:37:47 +02:00
Javier Martín
c39a3d7525 Merge pull request #3492 from consul/backport-fix_delete_budget_with_polls
Don't destroy budgets with an associated poll
2019-05-16 13:07:18 +02:00
decabeza
e026412389 Add button to delete a poll 2019-05-14 16:46:56 +02:00
Javi Martín
1b323383a8 Don't destroy budgets with an associated poll
We were getting an exception due to foreign key database violations.
2019-05-13 13:44:58 +02:00
Javi Martín
9c991297c5 Fix typo 2019-05-13 13:44:58 +02:00
Alberto
60c02cc19a Merge pull request #3466 from consul/admin-documents
Add document uploads from admin section
2019-05-10 17:57:22 +02:00
Javier Martín
9c02f5d0c2 Merge pull request #3486 from consul/backport-fix_typo_in_executions_spec
Fix typo in budget executions spec
2019-05-10 17:09:46 +02:00
Javier Martín
48b8e0f9da Merge pull request #3487 from consul/backport-fix_widget_card_order
Remove unused (and flaky) card code and its spec
2019-05-10 17:09:23 +02:00
Javi Martín
574bd87b08 Remove unused (and flaky) card code and its spec
This code was introduced in commit 722a431b, but it stopped being used
in commit 7657a0e0.

The spec was failing sometimes because the method didn't order the
records, but the spec checked the records returned in a certain order.

Furthermore, the method `page` generated a potential conflict with
kaminari's `page method.
2019-05-10 15:21:58 +02:00
Javi Martín
5812779974 Fix typo in budget executions spec
We were expecting the page not to have content which is actually there.
The test passed (most of the time) because before clicking the
"Milestones" link the content was not present, and we checked the page
content before the AJAX request generated by clicking the link had
finished.
2019-05-10 15:17:34 +02:00
Javi Martín
55c8fa3297 Fix obsolete respond_with_bip usage
Since we removed the `best_in_place` gem, this method doesn't exist
anymore. We're replacing it with what the method actually does.

Note the test doesn't check the poll is correctly updated. We could add
a `visit proposal_dashboard_polls_path(proposal)` before checking the
"Show results" field, but then we would enter a race condition between
this request and the AJAX request. A proper solution would be to provide
actual feedback to the user so they know the poll has been updated, and
then checking that feedback is present in the tests.
2019-05-09 19:41:04 +02:00
Javi Martín
63fef66f41 Remove obsolete reference to proposal question 2019-05-09 12:58:14 +02:00
decabeza
a57397dd6c Always use map image from admin site customization images 2019-05-07 14:43:04 +02:00
decabeza
f40787561d Remove all references to question and external_url fields 2019-04-30 16:42:07 +02:00
decabeza
367c2e7b78 Fix hound warnings 2019-04-30 12:06:56 +02:00
decabeza
b023ceabdd Fixes not_to hound warnings 2019-04-30 12:00:54 +02:00
decabeza
62a29e2cf9 Adds missing i18n 2019-04-30 12:00:46 +02:00
voodoorai2000
19b7526421 Add document upload from admin section 2019-04-30 11:59:08 +02:00
decabeza
4648906591 Remove deprecated task proposals spec
After run the rake to move external_url to description for Proposals and Legislation proposals this spec is failing because external_url field doesn't exists anymore.
2019-04-30 11:39:04 +02:00
decabeza
0995480b73 Remove question and external_url fields from proposals 2019-04-30 11:35:47 +02:00
decabeza
9f973bf789 Add message on dashboard request to archived proposals 2019-04-29 15:46:44 +02:00
decabeza
20f505ab7c Fix specs 2019-04-29 15:44:41 +02:00
voodoorai2000
dfbdc0568c Allow actions to be unexecuted
Before actions could be marked as executed. With this commit we are also allowing actions to be marked as unexecuted.
2019-04-29 15:43:53 +02:00
voodoorai2000
e139057001 Disable dashboard email deliveries
We have to doble check all emails deliveries from the dashboard.

Using a setting to skip all dashboard email deliveries for now.

Note that a rake task to activated the `Setting["dashboard.emails"]` will need to be addded when we want to activate deliveries of these emails.
2019-04-29 15:43:46 +02:00
voodoorai2000
6f3b213612 Refactor proposal poll routes
Moving routes from custom file to the proposal's routes file.
2019-04-29 15:43:25 +02:00
voodoorai2000
93972eeb33 Use custom url for proposal poll results 2019-04-29 15:42:27 +02:00
voodoorai2000
93ff173a0d Use a custom url for proposal polls
Before we used the standard poll url (vota/:id) for a user generated poll.

However this url is considered too important for this kind of polls, so we are changing it to a namespaced url (proposals/:proposal_id/polls/:id)
2019-04-29 15:42:04 +02:00
decabeza
51ced318e0 Merge branch 'master' into proposal-dashboard 2019-04-29 13:48:23 +02:00
Javier Martín
e13c4d8d10 Merge pull request #3460 from consul/backport-fix_remove_ballot_spec
Fix flaky spec: Ballots Groups Change my heading
2019-04-25 22:22:30 +02:00
Javier Martín
e0484e45ec Merge pull request #3459 from consul/backport-fix_cross_origin_exception
Fix InvalidCrossOriginRequest response
2019-04-25 22:01:51 +02:00
Javi Martín
ca40e657fb Check page after an AJAX call removing a ballot
We were sending a new request without checking the previous one had
finished, and if it hadn't finished, the test failed.

This test started to fail after upgrading to Rails 5, since we removed
the change done in commit eda47eff which set `config.allow_concurrency`
to `false` in the test environment.

While we could re-introduce that configuration option, which might have
side effects, an easier solution is to check an AJAX request has been
completed before sending a new request depending on the previous one
seems to be a more solid option.

Note this test failed with two possible errors: "undefined method
`heading' for nil:NilClass" and "stale element reference: element is not
attached to the page document". This change fixes the second error; it
might fix the first error as well, but since I couldn't reproduce it
locally, we'll only be sure when this test stops failing in travis
builds.
2019-04-25 20:57:19 +02:00