Commit Graph

227 Commits

Author SHA1 Message Date
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
decabeza
0ff7a327b7 Refactor selected proposals specs 2019-09-11 22:18:56 +02:00
decabeza
8440208597 Hide comments count on selected proposals 2019-09-11 22:18:43 +02:00
decabeza
1a0f0215a7 Hide related content on selected proposals 2019-09-11 22:18:42 +02:00
decabeza
b15048ec7d Hide proposal code on selected proposals 2019-09-11 22:17:40 +02:00
decabeza
e879fddba4 Hide view mode on selected proposals list 2019-09-11 22:17:40 +02:00
Javi Martín
c05b9c2aac Apply Capybara/CurrentPathExpectation rubocop rule 2019-09-10 21:43:39 +02:00
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Javi Martín
b5b07bccd3 Apply PercentLiteralDelimiters rubocop rule 2019-09-10 20:02:15 +02:00
Javi Martín
57bda006b5 Don't click two places at the same time
When clicking the button "Search", the link "newest" is already present,
so capybara might click the "newest" link before the "Search" request is
finished, leading to unexpected results.

Checking the page to make sure the "Search" request has finished before
clicking the "newest" link solves the problem.
2019-08-07 14:18:50 +02:00
Senén Rodero Rodríguez
b2d8851bcc Add the option to disable languages managment to cover special cases
We understand languages management as the ability to add new languages
or remove existing ones. When no option is passed it will allow language
manipulation by default.

There are 3 special places where we want block languages management:
- admin legislation processes homepage
- admin legislation processes milestones summary
- proposals retired form

Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
2019-07-01 15:03:48 +02:00
taitus
c1f3a4ad3b Add remote translations to debates and proposals
Include RemotelyTranslatable concern on commentable actions to detect
remote translations on index and show controllers actions.
2019-06-27 09:21:19 +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
7e3f0b5c18 Add translation interface feature setting
Allow to enable/disable translation interface at frontend
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
Senén Rodero Rodríguez
d0bf0f8857 Add "new_translatable" shared example to proposals feature specs 2019-06-27 09:20:25 +02:00
Senén Rodero Rodríguez
0f4fcfb20e Fix proposals suggest feature
Now we need one suggest placeholder for each translation. This also
fixes invalid usage of id HTML attribute.
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
bd3bb72370 Add proposals translation interface
* Convert proposal form into translatable one.
 * Adapt translatable shared spec to define an owner when running at
   frontend feature specs.
 * Remove old attributes from strong parameters.
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
78c2f54c5d Fix proposal specs
After adding proposal translatable fields to forms, they will be generated with nested translations names and ids so we can no longer
use standard id locator.

Using input label text to fill in fields works with both types of forms.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
02be0c61f9 Add proposal translations
Adapt retire form to include needed translations and move validations
from controller to model.

Also change sanitizable concern to sanitize not marked for destruction
translations.
2019-06-27 09:19:36 +02:00
German Galia
9d1ca3bfd4 Report generation. Download csv 2019-06-12 10:17:31 +02:00
Julian Nicolas Herrero
3ba7bd1cab Merge pull request #3567 from consul/select_proposals_by_admins
Make proposals to be selected by administrators
2019-05-31 15:30:39 +02:00
decabeza
a3799aa87c Update link to selected proposals on proposals spec 2019-05-31 12:25:01 +02:00
decabeza
7ed80d7883 Move link to selected proposals on proposals index 2019-05-31 12:24:10 +02:00
Julian Herrero
d4ec750428 Show archived proposals in selected proposals list 2019-05-30 11:19:38 +02:00
Julian Herrero
4be4d96710 Don't show order links in selected proposals list 2019-05-30 11:19:38 +02:00
Julian Herrero
6e905c517f Don't show recommented proposals in selected proposals list 2019-05-30 11:19:38 +02:00
Julian Herrero
dfe3764616 Don't show featured proposals in selected proposals list 2019-05-30 11:19:38 +02:00
Julian Herrero
5952c2664d Show a 'Selected proposal' message in the show view 2019-05-30 11:19:38 +02:00
Julian Herrero
a852696eeb Remove not selected proposals from other lists 2019-05-30 11:19:38 +02:00
Julian Herrero
6beb11f0a9 Show completed progress bar for successful proposals
Show a completed progress bar with total supports intead of showing
a message telling the proposal has reached the needed supports.
2019-05-30 11:19:38 +02:00
Julian Herrero
b68a872298 Change links for proposals lists
Changed applied:

- Remove Archived proposals from tab and add a link under Proposals
  lists
- Remove Popular proposals link from custom section and add it to the
  Proposals lists
- Remove Retired proposals link from custom section and add it to the
  Proposals lists
- Remove Selected proposals link from custom section and add it to the
  Proposals lists
2019-05-30 11:19:38 +02:00
Julian Herrero
ad5f7a06e1 Allow admins to select proposals and users to list them 2019-05-30 11:19:33 +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
Javi Martín
605da522cb Resize Capybara window back to its original size
The `maximize` method didn't work as we expected and didn't resize the
window, causing issues in tests expecting the window to be larger.
2019-05-24 13:30:49 +02:00
decabeza
4b3172912e Add spec to show sticky button on mobile screens
Also remove some unnecessary css lines that were causing some unrelated specs to fail.
2019-05-22 12:41:52 +02:00
decabeza
f40787561d Remove all references to question and external_url fields 2019-04-30 16:42:07 +02:00
decabeza
0995480b73 Remove question and external_url fields from proposals 2019-04-30 11:35:47 +02:00
decabeza
4100bf2ddf Update dashboard specs 2019-04-24 14:00:38 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
c82b2a975a Add new settings tab for participation processes
- Rename setting keys
- New tab por participation processes
- Hide these settings from features tab
2019-03-19 19:45:32 +01:00
decabeza
e520a51d57 Replace default feature proposals to nil 2019-03-13 13:18:53 +01:00
decabeza
25c8212e80 Remove proposal improvement path setting 2019-02-19 11:07:58 +01:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
taitus
aa908d8d60 Add progress tab as initial page on Dashboard. 2019-02-02 14:49:28 +01:00
decabeza
aebd29f7e2 Adds create question button to admin proposals show 2018-12-19 16:08:57 +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
2fcbee6261 Manage proposal milestones 2018-12-11 20:09:47 +01:00
decabeza
37da986014 Adds settings for featured proposals 2018-12-04 18:04:36 +01:00
decabeza
4ea1f7732b Updates i18n on specs 2018-10-08 11:26:53 +02:00