Commit Graph

24 Commits

Author SHA1 Message Date
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
6fa67b5e53 Use active record translations for labels
This way we can simplify the way we generate form fields. In some cases,
we also use the human attribute in table headers, which IMHO makes
sense.

I haven't moved all of them: for example, sometimes a label is
different depending on whether it's shown to administrators, valuators,
or users. And I haven't touched the ones related to devise, since I
wasn't sure about possible side effects.

Note I've also removed placeholders when they had the same text as their
labels, since they weren't helpful. On the contrary, the added redundant
text to the form, potentially distracting users.
2019-10-07 01:56:23 +02:00
Javi Martín
44d137a4c0 Simplify translatable tests in admin section
These feature tests were taking too long, we can't run them for every
single model.

I'm taking the approach of using one different model for each test, but
in theory only using a few models covering every possible scenario
would be enough.
2019-09-23 18:01:44 +02:00
Senén Rodero Rodríguez
12d20b481d Fix error during rebase 2019-07-01 16:40:24 +02:00
Senén Rodero Rodríguez
f7417d6479 Adapt specs to new translations interface markup 2019-07-01 14:49:43 +02:00
Senén Rodero Rodríguez
3176be43d9 Rename "translatable" shared example to "edit_translatable"
Also rename all specs calls
2019-06-27 09:20:25 +02:00
Senén Rodero Rodríguez
7c137faf53 Fix broken spec
Use existing I18n translations in broken spec.
2019-06-27 09:19:37 +02:00
German Galia
9d1ca3bfd4 Report generation. Download csv 2019-06-12 10:17:31 +02:00
Javi Martín
307cf24846 Use describe on feature tests
The `type: :feature` is automatically detected by RSpec because these
tests are inside the `spec/features` folder. Using `feature` re-adds a
`type: :feature` to these files, which will result in a conflict when we
upgrade to Rails 5.1's system tests.

Because of this change, we also need to change `background` to `before`
or else these tests will fail.
2019-05-28 16:36:54 +02:00
decabeza
a2cb7501f7 Create new basic tab for admin information texts 2019-05-21 14:06:58 +02:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Javi Martín
4770217373 Add proposals index in admin 2018-12-11 20:09:30 +01:00
decabeza
884580206a Fixes houndci-bot warnings 2018-10-31 14:22:10 +01:00
decabeza
dbf41421ed Removes guide feature 2018-10-17 14:58:29 +02:00
Raimond Garcia
1fbb428004 Merge pull request #2898 from papayalabs/2889-show-active-tab-in-custom-info-texts
Show active tab in custom info texts
2018-09-24 21:11:25 +02:00
Papaya Labs
45da512ce9 Add Spec 2018-09-24 20:38:42 +02:00
Javi Martín
726110c91e Share Globalize JavaScript interface specs 2018-09-17 20:34:20 +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