Commit Graph

8 Commits

Author SHA1 Message Date
Senén Rodero Rodríguez
d3422acbb7 Add validation to check translations amount on updates
In order to not allow users to remove all persited
translations from any resource. A few exceptions were
added:

* Does not apply to globalizable models without
   translatable attributes required
* Make a copy of main model error on current translations to be more realistic
2019-07-02 17:15:16 +02:00
Senén Rodero Rodríguez
0bbc6be141 Add specs to check how visibility of translations interface behaves
Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
2019-07-01 14:49:44 +02:00
Senén Rodero Rodríguez
c0b4bb67eb Adapt shared specs to new translations interface 2019-07-01 14:49:44 +02:00
Senén Rodero Rodríguez
faed5857c3 Adapt specs to new translation interface
As translatable translations already exists in these specs it has more
sense to me to use select_language intead of adding an already existing
language. Anyway both versions behaves the same and specs pass.
2019-07-01 14:49:43 +02:00
Senén Rodero Rodríguez
9fd77d4042 Add languages in use description
New interface now shows a description to ensure the user
knows how many languages are currently in use.
2019-07-01 14:49:43 +02:00
voodoorai2000
83b43c6bc6 Fix milestone translatable specs
Milestones do not have an author so we can not update that attribute.

Adding this conditional fixes this spec: ./spec/features/admin/budget_investment_milestones_spec.rb[1:1:1:10]
2019-06-27 10:07:38 +02:00
Senén Rodero Rodríguez
264b3f0f82 Simpler calls to *_translatable shared specs
Enable translations interface setting inside shared specs when needed.

Co-Authored-By: javierm <javim@elretirao.net>
2019-06-27 09:20:25 +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