Commit Graph

2271 Commits

Author SHA1 Message Date
Marko Lovic
05bfa193cd Make Legislation Draft Versions translatable 2018-09-19 14:54:24 +02:00
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
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
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
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
Papaya Labs
f7c10de627 Fix indentation and include specs 2018-09-18 15:16:31 -05: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
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
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
Javi Martín
29b9f172f6 Fix test for Portuguese
It fails because we try to follow a link without a Portuguese
translation. In Madrid they use Spanish as fallback, but in consul we
use English as fallback, and so the text in the link is different in
those repos.

A proper solution would be to update the Portuguese locales. However,
since this test is going to be removed in our next backport, I'm just
doing a quick patch.
2018-09-12 10:52:00 +02:00
Marko Lovic
d2dd5f2a58 Test Translatable logic with a locale with non-underscored name
In the past there have been issues with the `pt-BR` locale because
it has a hyphen `-` and a uppercase letters.

I am adding the test only to spec/features/translations_spec.rb (which
tests Milestones) for now. We might want to also add it to the other
translatable resource specs in the future (banners, etc.).
2018-09-11 18:48:23 +02:00
Angel Perez
d86103db5a Disable unnecessary JS usage on comments/topics specs 2018-09-10 11:45:41 -04:00
Angel Perez
19b0c410da Remove JS driver usage for legislation/processes#update scenarios 2018-09-10 11:45:29 -04:00
Angel Perez
84b616256f Fix spec to properly check emails are sent based on current locale 2018-09-10 11:45:13 -04:00
Angel Perez
08755524ef Replace I18n calls with explicit text expectations 2018-09-10 11:44:00 -04: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
fa9da9d573 Usage of let on emails specs to DRY scenarios 2018-09-10 11:41:25 -04:00
Angel Perez
ffe421ae69 Replace .all.each with .find_each on admin specs 2018-09-10 11:40:24 -04:00
Marko Lovic
9fdc8a8a35 Avoid checking DB records in feature spec 2018-09-10 17:34:02 +02:00
Marko Lovic
3aa53449c8 Fix Translatable when field values are changed to blank
If we ignore all params that are blank, there is no way to
"remove" an attribute (i.e. change its value to blank)

On the other hand, we don't want to create new translations
where all fields are empty, so the new code keeps only the
blank fields which belong to existing translations.
2018-09-10 17:16:42 +02:00
Raimond Garcia
4f2ed27f8c Merge pull request #2865 from consul/backport_1585-make_banners_translatable
[Backport] Make banners translatable
2018-09-10 16:41:33 +02:00
Raimond Garcia
778b10d181 Merge pull request #2835 from wairbut-m2c/backport/fix-proposals-menu
Fix navigation menu under Legislation::Proposal show view
2018-09-07 18:44:31 +02:00
Raimond Garcia
09482aad09 Merge pull request #2785 from ziyan-junaideen/feature/1-nav-content-blocks
Configurable Top Right and Main Navigation Menus
2018-09-05 19:50:59 +02:00
Alberto
21f36e6be5 Merge branch 'master' into feature/1-nav-content-blocks 2018-09-05 12:41:07 +02:00
Marko Lovic
0fa4b60f39 Make Banners translatable 2018-08-30 16:29:29 +02:00
decabeza
bc5741fb16 Adds status icons on polls poll group 2018-08-23 18:46:14 +02:00
Angel Perez
43b040162d fix(frontend): Only one menu element has 'active' CSS selector 2018-08-06 10:13:41 -04:00
Juan Fernandez
653d36c9e6 Translate static pages 2018-08-04 15:28:41 -04:00
decabeza
56bdcf4be2 Updates text on admin notifications spec 2018-07-31 13:25:53 +02:00
decabeza
3fee56e8fe Updates admin site customization specs 2018-07-31 12:55:05 +02:00
decabeza
bb05f86156 Updates admin legislation specs 2018-07-31 12:54:59 +02:00
Alberto
5546f5b125 Merge pull request #2817 from consul/custom-content
Custom content
2018-07-31 12:43:21 +02:00
decabeza
d80e7f9864 Updates emails specs 2018-07-30 19:35:21 +02:00
Raimond Garcia
2c79197a05 Merge pull request #2809 from wairbut-m2c/backport/translatable-content-for-admin
Basic content for I18n on Admin panel
2018-07-27 18:01:00 +02:00
Alberto
65e4435822 Merge pull request #2137 from wairbut-m2c/iagirre-admin-menu-in-management
Add admin menu in management view (if user is admin)
2018-07-27 12:35:07 +02:00
Alberto
fb19aafee7 Merge pull request #2778 from wairbut-m2c/backport/investments-moderation
Allow budget investments to be moderated
2018-07-27 12:34:17 +02:00
Angel Perez
a943c24aa7 Replace Madrid-specific texts with CONSUL ones 2018-07-26 21:13:53 -04:00
Angel Perez
1255389ef7 Remove redundant translation specs 2018-07-26 20:49:12 -04:00
rgarcia
78a5c0356e Add globalization javascript interface specs 2018-07-26 20:49:00 -04:00
Angel Perez
9c74fa393d Translations can be removed 2018-07-26 20:49:00 -04:00
Angel Perez
ad252ca835 Translations can be updated correctly 2018-07-26 20:49:00 -04:00
rgarcia
82f496ccfa Fix globalization for information texts
Refactoring and making similar specs to the milestones globalization specs
2018-07-26 20:48:56 -04:00
Angel Perez
42eb784922 Add specs for basic Admin Globalize feature 2018-07-26 19:08:42 -04:00