Alberto
bbcb96027b
Merge pull request #3137 from consul/key-dates-processes
...
[Backport] Processes key dates
2019-01-08 10:51:40 +01:00
decabeza
dd8e2d6311
Shows participation phases only if there is a phase enabled
2018-12-28 18:23:08 +01:00
decabeza
a8fb479be5
Adds specs for show view has document present on all phases
2018-12-28 17:22:08 +01:00
Raimond Garcia
d583c93ebf
Merge pull request #3118 from consul/rubocop-not-to
...
Apply Rubocop not_to rule
2018-12-19 12:47:37 +01:00
Raimond Garcia
ea435ac56c
Merge pull request #3112 from consul/rubocop_not_to
...
Add not_to Rubocop rule
2018-12-19 11:29:44 +01:00
voodoorai2000
b8cc7c5389
Apply rubocop not_to rule
2018-12-19 11:23:53 +01:00
dperez
bef404c443
add homepage for legislation processes
2018-12-15 18:04:24 +01:00
voodoorai2000
7917cea676
Change to_not for not_to
...
Eventhough some of us sentimentals still like the syntax `to_not` the current trend is to move to the new syntax `not_to`.
In this commit we are updating the references of expectations that used `to_not` to `not_to`.
2018-12-15 12:33:28 +01:00
Javi Martín
b95ca9df8a
Add milestones to legislation process view
2018-12-11 20:18:53 +01:00
Javier Martín
364321bf33
Merge pull request #3090 from consul/backport-time_related_specs
...
[Backport] Add frozen time condition to proposals phase spec
2018-12-10 13:47:38 +01:00
Javi Martín
a769c61c02
Add frozen time condition to proposals phase spec
...
Backport the part of AyuntamientoMadrid@ea6fcb5 which hadn't been
backported yet.
2018-12-07 15:09:07 +01:00
Javi Martín
09add3554f
Create less records in random pagination tests
...
We make the tests considerably faster, we make them more robust against
changes in the number of records shown per page, and we generate enough
records so the chance of randomly getting the same results twice in a
row is extremely low.
2018-12-05 13:11:23 +01:00
Javi Martín
64167a86b4
Be more consistent using double quotes
2018-12-05 13:11:23 +01:00
Javi Martín
637c188bee
Make test easier to follow
...
Checking the contents of the second page while on the second page makes
more sense than checking them after going back to the first page.
2018-12-05 13:11:22 +01:00
Javi Martín
f391023b7d
Group related specs together
2018-12-05 13:08:24 +01:00
Javi Martín
6f62d76c71
Simplify random seed conversion to float
...
The method `to_f` already returns `0.0` instead of raising an exception
when handling non-numeric values.
2018-12-05 13:03:10 +01:00
Julian Herrero
333098502e
fix typo
2018-12-02 18:12:03 +01:00
João Lutz
34b58a5208
Adds draft phase functionality in legislation processes
2018-11-19 22:18:50 -02:00
decabeza
5abeeb8588
Fixes date format on legislation helper
2018-11-14 12:41:22 +01:00
Javi Martín
2e6644d513
Fix crash with no translation for default locale
...
When we were visiting a page showing the content of a record which uses
globalize and our locale was the default one and there was no
translation for the default locale, the application was crashing in some
places because there are no fallbacks for the default locale.
For example, when visiting a legislation process, the line with
`CGI.escape(title)` was crashing because `title` was `nil` for the
default locale.
We've decided to solve this issue by using any available translations as
globalize fallbacks instead of showing a 404 error or a translation
missing error because these solutions would (we thinkg) either require
modifying many places in the application or making the translatable
logic even more complex.
Initially we tried to add this solution to an initializer, but it must
be called after initializing the application so I18n.fallbacks[locale]
gets the value defined in config.i18n.fallbacks.
Also note the line:
fallbacks[locale] = I18n.fallbacks[locale] + I18n.available_locales
Doesn't mention `I18n.default_locale` because the method
`I18n.fallbacks[locale]` automatically adds the default locale.
2018-10-22 16:36:18 +02:00
Javi Martín
959270b0bb
Separate setup, actions and expections in specs
2018-10-04 16:31:00 +02:00
Javi Martín
9c13f08c8e
Show selected legislation proposals by default
2018-10-04 16:31:00 +02:00
Javi Martín
d9410a132a
Always show filters for legislation proposals
...
As done in the rest of the application: we show the filters even if
there isn't any data to display.
2018-10-04 16:31:00 +02:00
Javi Martín
81871a56f8
Simplify legislation process specs
...
We kill two birds with one stone and also make each line less than 100
characters long.
2018-10-04 16:30:59 +02:00
Javi Martín
f1745f8040
Fix typo
2018-10-04 16:29:01 +02:00
Raúl Fuentes
a859de5d16
Test the selectable proposals
2018-10-04 16:29:01 +02:00
Javi Martín
ec18743251
Authorize resource after authenticating user
...
Just like it's done everywhere else in the application. Not doing so
means users who aren't logged in receive a "you aren't authorized"
message when they try to create a new legislation proposal instead of
being redirected to the login page.
2018-10-03 22:06:20 +02:00
María Checa
388c1a9bd9
Improved tests
2018-10-03 16:02:41 +02:00
María Checa
d73be15296
Added tests
2018-10-03 16:02:41 +02:00
Bertocq
52df63c2aa
Add legislation proposal feature scenario to check random order is consistent with pagination
2018-10-03 13:46:32 +02:00
Bertocq
89b8e51a93
Add helper function to get legislation proposals list order on feature spec
2018-10-03 13:46:32 +02:00
Bertocq
d36e47c740
Add legislation proposal spec, with random list order scenario
2018-10-03 13:46:00 +02:00
decabeza
7c194f6042
Adds imageable to legislation proposals
2018-10-01 16:48:46 +02:00
Javier Martín
758d3f8541
Merge pull request #2911 from consul/backport-fix_time_related_specs
...
Fix time related specs
2018-09-24 17:43:22 +02:00
decabeza
a1bbc82c8d
Changes allegations dates label
2018-09-20 17:33:04 +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
Angel Perez
43b040162d
fix(frontend): Only one menu element has 'active' CSS selector
2018-08-06 10:13:41 -04:00
decabeza
0bf31bde6c
Updates all active to is-active classes
2018-06-06 12:02:13 +02:00
decabeza
b93543cbf9
Shows message only if there is questions on legislation debate
2018-04-27 18:24:53 +02:00
Angel Perez
38af45d450
Replace deprecated .trigger('click') API with .click
2018-03-27 14:47:49 -04:00
decabeza
f2e5f6ff76
Adds specs for additional info button
2018-03-07 17:18:55 +01:00
Bertocq
4f6597b200
Enable RSpec/RepeatedDescription cop & fix all issues
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
2018-01-07 17:45:34 +01:00
Bertocq
34bb9d65b1
Enable RSpec/NotToNot cop and fix all issues
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
2018-01-07 17:39:48 +01:00
Bertocq
1441de5107
Enable RSpec/HookArgument cop and fix issues
...
To be consistent about before/after arguments, as `:each` or `:example`
are same and default scopes, best not to send an argument in those
scenarios.
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
2018-01-07 02:07:19 +01:00
Bertocq
fa017b664f
Enables RSpec/EmptyLineAfterFinalLet cop & fixes all issues
...
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
2018-01-07 00:49:37 +01:00
rgarcia
2b52d26d82
refactors notifications into concerns and shared examples
2017-12-14 16:15:30 +01:00
Manuel Ortega
b8a45eda58
Added legislation process documents
...
New test to ensure document is shown in process show
2017-10-19 12:10:54 +02:00
Bertocq
69f4e1c683
Fix all rubocop Metrics/LineLength issues (140+)
2017-07-10 13:22:49 +02:00
Eduardo Martinez Echevarria
0bc318c823
Add tests to check visibility of processes depending on published attribute
2017-06-30 15:08:23 +02:00
Eduardo Martinez Echevarria
3e5c5d7e49
Define some actions on legislation processes as member actions
2017-06-30 15:08:23 +02:00