Commit Graph

25 Commits

Author SHA1 Message Date
Javi Martín
1ebfa04578 Check texts from the user's point of view
This way we also simplify the code by avoiding instance variables.
2019-09-30 14:29:15 +02:00
Javi Martín
da121ebc53 Remove redundant setting resets in after blocks
Settings are stored in the database, and so any changes to the settings
done during the tests are automatically rolled back between one test and
the next one.

There were also a few places where we weren't using an `after` block but
changing the setting at the end of the test.
2019-09-23 13:47:45 +02:00
Javi Martín
cf9e36c767 Replace single quotes with double quotes
Most of these quotes were in the dashboard branch before we added the
rule for double quotes.
2019-09-10 19:21:03 +02:00
taitus
9e94cf060e Refactor specs 2019-07-29 13:10:09 +02:00
taitus
71af3e8789 Add :tab param to others calls to _setting_table partial
Allow redirect to their tab after update a Setting
2019-07-29 13:10:09 +02:00
taitus
ca0979bd45 Allow redirect to remote census configuration tab
Currently after each update of any Settings is redirected to the first
tab by default.
As this new tab remote_census_configuation has a lot of fields to fill
in it is a bit uncomfortable to have to go back to the tab after each
update.

- Add hidden field :tag to set current tag value
- After update add tag value to request.referer
- To avoid errors when partial call has not param :tag, add the "define?"
  method on hidden_field value.
2019-07-29 13:10:09 +02:00
taitus
12b6b1df05 Add new param to partial '_setting_table'
When we reuse the partial '_setting_table' to render the 3 types
of remote census settings, we need customize setting_name key by
default to clarify the information to render.

- Add new param 'setting_name' to partial '_setting_table'
- Create new setting helper method to use new setting_name param
  to display a more clarify setting name on table.
2019-07-29 13:10:09 +02:00
taitus
0a901cb82f Enable remote census configuration when remote census is active
According to the feature setting["remote_census"]:
  - Display info to enable tab when remote_census feature is disabled.
  - Display all related setting to remote_census when feature is enabled
2019-07-29 13:10:09 +02:00
Julian Herrero
220bfb065a Add images and documents settings to admin panel 2019-06-04 11:47:22 +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
Julian Herrero
dbac4bc222 Change admin settings tab for maps
- Rename map settings keys
- Add fields for latitude, longitude and zoom
- Add a callout message on how to enable map feature
2019-03-19 18:14:57 +01:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Adan Amarillas
361518b57c Modify tests to reflect the new navigation on admin configuration settings 2018-05-24 14:49:31 -07:00
Adan Amarillas
1d974c41e3 Add missing i18n keys to locales 2018-05-24 12:27:07 -07:00
Adan Amarillas
2c5cefcfdd Adjust tests to new navigation. Add id tag to map tab so it can be found by id 2018-05-24 09:55:51 -07:00
Raúl Fuentes
83ca0656b4 Add test for all functinality
new setting set to nil on test to prevent prevent unforeseen
consequences on testing environment
2018-05-22 15:41:10 +02:00
Bertocq
ce0a7f6fad Rubocop autocorrections 2017-10-17 22:00:00 +02:00
taitus
a0603985ef Refactor. 2017-09-27 14:51:35 +02:00
taitus
7b54451491 Add missing specs on admin 2017-09-27 14:50:03 +02:00
Senén Rodero Rodríguez
6c1d1c2cde Add map settings to backend. Install leaflet assets to render maps. 2017-09-27 14:46:02 +02:00
rgarcia
bb3c4c6399 adds consistency to ruby code style
Keep a blank line before and after private
Keep a blank line before and after protected
Remove extra empty line at class body end
Remove extra blank line
Add final newline
Use 2 (not 3) spaces for indentation
Use 2 (not 4) spaces for indentation
Remove space before comma
Add space after comma
Remove trailing whitespaces
Remove unnecessary spacing
Use snake_case for variable names
Do not use then for multi-line if
Remove unused block argument - i
Use the new Ruby 1.9 hash syntax
Remove unused assignment to variable
Indent when as deep as case
Align attributes
Align end with def
2016-11-15 11:18:43 +01:00
Alberto Garcia Cabeza
abad54d01a Updates tests with new texts 2015-10-28 12:47:51 +01:00
Juanjo Bazán
c6c32a0795 adds translation for admin settings' keys names 2015-09-01 20:00:41 +02:00
Juanjo Bazán
29f4976a07 fix specs 2015-08-29 14:17:41 +02:00
Juanjo Bazán
5c630ac41d adds settings area to admin 2015-08-17 18:38:57 +02:00