Commit Graph

10136 Commits

Author SHA1 Message Date
Marko Lovic
06347062dd Make Legislation Questions translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
d78aea1fd3 Make Legistlation Processes translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
ee15295f54 Add migration for all collaborative legislation translations 2018-09-19 14:54:24 +02:00
Javi Martín
86aa56b5e8 Fix flaky legislation processes specs
They were failing if executed right before midnight. If the process is
created right before midnight and then the date changes, when we visit
the process path the phase will aready be open.
2018-09-19 14:24:09 +02:00
Javi Martín
c1bb1fb2e1 Fix flaky admin notifications spec
It was failing when executed right before midnight due to the date
changing between the moment the notification is created and the moment
the test checks the notification shows the current date.
2018-09-19 14:21:47 +02:00
Javi Martín
d7b9ed1bc4 Use dynamic times and dates in factories (part 2)
Most factories were using dynamic times and dates since commit 0cf799a.
However:

* At the time, commits AyuntamientoMadrid/consul@71f5351 and
AyuntamientoMadrid/consul@a476a30 (which introduced static times/dates
in factories) hadn't been backported.
* The changes in commit 0cf799a overlooked the factory
`proposal_notification`.
2018-09-19 14:21:21 +02:00
Raimond Garcia
c1d705ff30 Merge pull request #2910 from consul/backport-make-admin-notifications-translatable
[Backport] Make admin notifications translatable
2018-09-19 14:13:40 +02:00
Javi Martín
ec3d4c4449 Fix flaky officing dashboard spec
It was failing when executed right before midnight due to today's
officer assigments changing during the test.
2018-09-19 14:12:32 +02:00
Javi Martín
b787e33883 Use the same system to freeze time in all specs
This required changing the `voted_before_sign_in` slightly in order to
change what the method returns if the user signed in and voted at the
exact same microsecond.

It doesn't affect production code because it would be impossible for the
user to do both things at the same time.

As a side effect, the method now returns what the method name suggests.
Before this change, the correct method name would have been
`voted_before_or_at_the_same_time_of_sign_in`.

As a less desirable side effect, in the tests now we need to make sure
at least one second passes between the moment a user votes and the
moment a user signs in again. One microsecond wouldn't work because
the method `travel_to` automatically sets microseconds to zero in order
to avoid rounding issues.
2018-09-19 14:11:50 +02:00
Javi Martín
02b8bc6f69 Simplify the way to freeze time in specs 2018-09-19 14:10:18 +02:00
Marko Lovic
0731b137cf Add both English and Spanish translations to Admin Notification seeds 2018-09-19 12:15:45 +02:00
Marko Lovic
3be3b7342c Reinstate deleted translations for seed Admin Notifications
These were removed in 5c726e0, seemingly by mistake. The change
doesn't make sense in the context of the commit, and it breaks
the seed data.
2018-09-19 12:15:40 +02:00
Marko Lovic
f6749049c9 Make Admin Notifications translatable 2018-09-19 12:15:26 +02:00
Marko Lovic
5ff85d33d6 Fix submit button text for Admin Notifications admin form
In Madrid, the button text didn't change depending on whether the form
is for the "new" page or for the "edit" page.

In consul, the buttons texts were "create admin notification" and
"update admin notification" instead of "create notification" and "update
notification".

Also change translation key from "submit" to "submit_button" to
match other instances.
2018-09-19 12:05:18 +02:00
dependabot[bot]
de894cb917 Bump paranoia from 2.4.0 to 2.4.1
Bumps [paranoia](https://github.com/rubysherpas/paranoia) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/rubysherpas/paranoia/releases)
- [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md)
- [Commits](https://github.com/rubysherpas/paranoia/compare/v2.4.0...v2.4.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-19 06:57:10 +00:00
dependabot[bot]
77127cd226 Bump ancestry from 3.0.1 to 3.0.2
Bumps [ancestry](https://github.com/stefankroes/ancestry) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/stefankroes/ancestry/releases)
- [Changelog](https://github.com/stefankroes/ancestry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefankroes/ancestry/compare/v3.0.1...v3.0.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-19 06:56:26 +00:00
Juan Salvador Pérez García
2a0664d473 Enabled zoom for proposal progress graph 2018-09-18 17:42:34 +02:00
Juan Salvador Pérez García
475323ddd5 User Interface enhancements
Progress graph for the proposal dashboard now has its legend on the
bottom. This improves the visualization on mobile platforms.
2018-09-18 17:18:16 +02:00
María Checa
eeb7463ff4 Merge pull request #2860 from consul/backport_1582-icon-polls
[Backport] Adds status icons on polls poll group
2018-09-18 12:42:37 +02:00
Juan Salvador Pérez García
ee83238e32 Scope refactoring
complex scopes in Dashboard::Action have been refactored into static
methods. Specs for refactored scopes have been added as well.
2018-09-18 10:59:32 +02:00
dependabot[bot]
652c414218 Bump coveralls from 0.8.21 to 0.8.22
Bumps [coveralls](https://coveralls.io) from 0.8.21 to 0.8.22.

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-18 05:22:23 +00:00
Raimond Garcia
71a537b4db Merge pull request #2903 from consul/backport-refactor-translatable-specs
[Backport] Refactor translatable specs
2018-09-17 23:05:06 +02:00
Raimond Garcia
ea72cd058b Merge pull request #2876 from javierm/ckeditor4_update
Ckeditor4 update
2018-09-17 23:02:50 +02:00
Javi Martín
0552616764 Use have_field to detect text input contents
Using `have_content` detected textareas, but not text input contents.

All credit to Marko (mlovic) for finding the issue and suggesting the
implemented solution.
2018-09-17 20:34:43 +02:00
Javi Martín
612fdb09dd Share translatable specs 2018-09-17 20:34:43 +02:00
Javi Martín
726110c91e Share Globalize JavaScript interface specs 2018-09-17 20:34:20 +02:00
Javi Martín
a64a290392 Extract commentable_path to an initializer
By doing so and including it in ActionDispatch::Routing::UrlFor, we make
it available in controllers, helpers and specs, and so we can remove the
duplication we had there with methods dealing with the same problem.

Even if monkey-patching is ugly, using a different module and executing
ActionDispatch::Routing::UrlFor.send(:include, MyModule) wouldn't make
the method available in the controller.
2018-09-17 20:28:55 +02:00
Juan Salvador Pérez García
e8e01b184f Fixed issue accumulating supports 2018-09-17 19:49:33 +02:00
Juan Salvador Pérez García
a658536142 Fixed issue when filling holes in grouped supports query 2018-09-17 19:37:29 +02:00
dependabot[bot]
641421959e Bump savon from 2.11.2 to 2.12.0
Bumps [savon](https://github.com/savonrb/savon) from 2.11.2 to 2.12.0.
- [Release notes](https://github.com/savonrb/savon/releases)
- [Changelog](https://github.com/savonrb/savon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/savonrb/savon/compare/v2.11.2...v2.12.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-17 17:15:34 +00:00
Raimond Garcia
b49b3ade68 Merge pull request #2881 from consul/dependabot/bundler/autoprefixer-rails-9.1.4
Bump autoprefixer-rails from 8.2.0 to 9.1.4
2018-09-17 19:09:20 +02:00
Raimond Garcia
34589443e3 Merge pull request #2884 from consul/dependabot/bundler/capistrano-rails-1.4.0
Bump capistrano-rails from 1.3.1 to 1.4.0
2018-09-17 19:08:58 +02:00
Raimond Garcia
14edf4b603 Merge pull request #2892 from consul/dependabot/bundler/mdl-0.5.0
Bump mdl from 0.4.0 to 0.5.0
2018-09-17 19:08:22 +02:00
Raimond Garcia
5aa84c139e Merge pull request #2894 from consul/dependabot/bundler/unicorn-5.4.1
Bump unicorn from 5.4.0 to 5.4.1
2018-09-17 19:08:04 +02:00
Raimond Garcia
a160a9e694 Merge pull request #2895 from consul/dependabot/bundler/scss_lint-0.55.0
Bump scss_lint from 0.54.0 to 0.55.0
2018-09-17 19:07:39 +02:00
Raimond Garcia
cae210c155 Merge pull request #2887 from wairbut-m2c/backport/db_queries
[Backport] Replace `.all.each` with `.find_each` to reduce memory usage
2018-09-17 19:06:46 +02:00
Raimond Garcia
eb435930db Merge pull request #2888 from wairbut-m2c/backport/test-suite-maintenance
[Backport] Test suite maintenance
2018-09-17 19:06:07 +02:00
Raimond Garcia
0b7eb35b22 Merge pull request #2896 from javierm/backport-refactor-translatable-shared-code
[Backport] Refactor code shared by admin-translatable resources
2018-09-17 18:26:55 +02:00
Raimond Garcia
b6602348e2 Merge pull request #2852 from tiagozini/fix-issue-2848
Fix bug in facebook share link
2018-09-17 18:23:29 +02:00
Juan Salvador Pérez García
42d448248c Routes have been refactored
Dashboard routes have been refactored. Now instead of having resources
for dashboard and routes inside a dashboard namespace the proposal
routes contain a dashboar singleton containing everything related to it.
2018-09-17 15:44:45 +02:00
Juan Salvador Pérez García
6f1a866878 Dashboard graph shows achievents again
label has been moved to the bottom to improve its readability
2018-09-17 09:40:21 +02:00
Juan Salvador Pérez García
d6919155c8 Added comments regarding tests for dashboard graph
Added comment regarding tests for dashboard graph. This feature should
be migrated to Ecma6 and had its own tests once Consul reaches
compatibility with Rails 5.1.
2018-09-17 09:12:36 +02:00
Juan Salvador Pérez García
7c3213a55d Refactored complex scope
Complex scope has been refactored into an static method. Added tests to
validate this new method.
2018-09-17 09:11:51 +02:00
Juan Salvador Pérez García
e61eba4e97 locale key containing html has been renamed
locale key containing html has been renamed. Now it has the preffix:
_html.
2018-09-17 09:11:09 +02:00
Juan Salvador Pérez García
6412f95e56 Added comments
Added comment to clarify obscure method
2018-09-17 09:10:31 +02:00
Juan Salvador Pérez García
22907ad1fc Fixed failing specs 2018-09-17 09:10:12 +02:00
Raimond Garcia
12755b6446 Merge pull request #2900 from consul/smtp-configuration
Add placeholder configuration for SMTP
2018-09-14 18:13:41 +02:00
Juan Salvador Pérez García
091e1d492c Enhacements in navigation
Proposal menu will appear highlighted when the voting shown is related
to a proposal. The voting menu entry will appear disabled.
2018-09-14 16:52:30 +02:00
Juan Salvador Pérez García
2ca9a38915 Dashboard navigation enhancements
Dashboard links that bring the user outside the dashboard will be open
in a separate tab
2018-09-14 16:45:02 +02:00
Juan Salvador Pérez García
c763ca2f99 Fixed bug in x axis labels in dashboard
Dashboard progress graph was not showing all labels in x axis when there
were less than 12 samples.
2018-09-14 16:43:42 +02:00