Commit Graph

10136 Commits

Author SHA1 Message Date
taitus
a4673c8b3e Add shared nested_documentable specs to admin dashboard actions specs.
Not render Documents count on dashboard actions views.
Add skips on nested_documentable when factory_name is equal to dashboard_actions.
2019-02-02 15:30:35 +01:00
taitus
931bf18562 Adds styles (direct-uploads) to admin dashboard actions form 2019-02-02 15:30:35 +01:00
taitus
054bbc5d7b Allow zip, png and jpeg on dashboard action. 2019-02-02 15:30:33 +01:00
taitus
aa908d8d60 Add progress tab as initial page on Dashboard. 2019-02-02 14:49:28 +01:00
taitus
959fe67bf9 Bug fixes: Wrong html.
Add form into <td>
2019-02-02 14:05:34 +01:00
taitus
b6b49c435c Add .hound.yml, .rubocop_basic.yml and update .rubocop.yml 2019-02-02 13:50:54 +01:00
taitus
573495d208 BugFixes: generate new schema according to migrations. 2019-01-08 13:20:28 +01:00
Alberto
a1decd3092 Merge pull request #2984 from consul/dashboard-master
Dashboard master
2018-10-19 13:18:47 +02:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
Alberto
5bb9225c52 Merge pull request #2979 from consul/dashboard-clean
Dashboard clean
2018-10-18 23:26:45 +02:00
Alberto
3878946c9e Merge pull request #2823 from consul/remove-guides
Removes guide feature
2018-10-18 13:19:33 +02:00
decabeza
4db54092e6 Removes unrelated dashboard changes 2018-10-18 01:26:07 +02:00
Raimond Garcia
e2e9d8ed60 Merge pull request #2973 from consul/i18n_defensive_spec
[Backport] Fix pluralization spec when using different default locale
2018-10-17 20:26:26 +02:00
Javier Martín
e117218d68 Merge pull request #2977 from consul/backport-reenable_ckeditor_images
Bring back CKEditor images button
2018-10-17 20:21:18 +02:00
Javi Martín
6f96265a0b Bring back CKEditor images button
It was accidentally deleted in commit 914bfa6.

Note the following spec passes on my machine if we add a `sleep 0.1`
call in the `:wait_readable` part of ruby's `Net::Protocol#rbuf_fill`.
Otherwise, it hangs forever after clicking the `.fileupload-file` div,
which closes its window. It might be solved when upgrading rails,
capybara, selenium or chromedriver.

scenario "Allows images in CKEditor", :js do
  visit edit_admin_site_customization_page_path(custom_page)

  within(".ckeditor") do
    within_frame(0) { expect(page).not_to have_css("img") }

    expect(page).to have_css(".cke_toolbar .cke_button__image_icon")
    find(".cke_toolbar .cke_button__image_icon").click
  end

  within_window(window_opened_by { click_link "Browse Server" }) do
    attach_file :file,
                Rails.root.join('spec/fixtures/files/clippy.jpg'),
                visible: false
    find(".fileupload-file").click
  end

  click_link "OK"

  within(".ckeditor") do
    within_frame(0) { expect(page).to have_css("img") }
  end
end
2018-10-17 19:39:37 +02:00
Javier Martín
4f831b9e1d Merge pull request #2976 from consul/backport-1603-fix_flaky_legislation_questions_spec
Fix flaky spec: Admin legislation questions Update Valid legislation question
2018-10-17 19:18:54 +02:00
Alberto
938494aef5 Merge pull request #2972 from consul/dashboard-pdf
Dashboard PDF
2018-10-17 17:19:29 +02:00
Javi Martín
893f29a27a Fix flaky legislation question spec
The test was failing sometimes because of the sequence:

within('#side_menu') do
  click_link "Collaborative Legislation"
end

click_link "All"
expect(page).to have_content 'An example legislation process'
click_link 'An example legislation process'

Right after clicking the "Collaborative Legislation" link, the link 'An
example legislation process' is already available. So sometimes Capybara
might click the links "All" and 'An example legislation process' at more
or less the same time, causing the second link not to be correctly
clicked.

Making sure the "All" link doesn't exist anymore we guarantee Capybara
will wait for the previous AJAX request to finish before clicking the
next link.

Note the test to "Create Valid legislation question" is almost identical
but it doesn't fail because it doesn't use Capybara's JavaScript driver.
2018-10-17 15:54:59 +02:00
decabeza
dbf41421ed Removes guide feature 2018-10-17 14:58:29 +02:00
Raimond Garcia
74925a7022 Merge pull request #2964 from consul/i18n_all_language_names
Add all available languages
2018-10-17 13:34:26 +02:00
voodoorai2000
3976b2f4f2 Fix pluralization spec when using different default locale
This spec was failing due to using :es as the default_locale in application.rb[1], but using :en as the default_locale in the test environment[2]

The fallback rules where getting a little confused and not including the default locale, for the test environment, in the fallback rules

With this commit we are making sure that rule is created, as it would in a production environment that uses the default_locale in application.rb

[1] https://github.com/AyuntamientoMadrid/consul/blob/master/config/application.rb#L22

[2] https://github.com/AyuntamientoMadrid/consul/blob/master/spec/rails_helper.rb#L15
2018-10-17 13:26:47 +02:00
voodoorai2000
8eb399150e Remove fallback rules for locales not yet added 2018-10-17 12:47:35 +02:00
voodoorai2000
e771440d18 Remove duplicate language names 2018-10-17 12:47:35 +02:00
voodoorai2000
3b8bb5038d Add fallback i18n locales
All other languages will fallback to the default locale

Rails also, seems to pick up dialect fallbacks, for locales with this format: es-CO, es-PE, etc, which will fallback to "es", so that is great 😌
2018-10-17 12:47:35 +02:00
voodoorai2000
f2fe230a15 Add all available locales
Only addding those with significant number of translations
2018-10-17 12:47:35 +02:00
voodoorai2000
d8fa322763 Remove obsolete language name translations 2018-10-17 12:47:35 +02:00
voodoorai2000
7fb6f6a7a6 Add all language names 2018-10-17 12:47:35 +02:00
Raimond Garcia
2f5fc5d863 Merge pull request #2963 from consul/locale_names
Fix locale folder names
2018-10-17 12:46:28 +02:00
Raimond Garcia
8864168e3c Merge pull request #2962 from consul/flaky_i18n
Fix flaky spec for translations
2018-10-17 12:45:51 +02:00
Alberto
e08f031be6 Merge pull request #2971 from consul/dashboard-mailer
Dashboard mailer
2018-10-17 01:18:13 +02:00
Alberto
c049f7a9da Merge pull request #2968 from consul/dashboard-admin
Dashboard admin design
2018-10-17 01:17:27 +02:00
decabeza
52b515134f Updates i18n 2018-10-17 01:12:45 +02:00
decabeza
f4d9fe2417 Updates dashboard poster controller 2018-10-17 01:12:34 +02:00
decabeza
bd1ba2bc78 Adds styles to dashboard poster 2018-10-17 01:12:09 +02:00
decabeza
35dca0a17a Removes dashboard poster css file 2018-10-17 01:11:11 +02:00
decabeza
79ecbb225e Improves styles for admin links views 2018-10-13 13:20:13 +02:00
decabeza
c33d9fa97b Improves styles for dashboard mailer forward
Uses layout with tables and inline styles to avoid display errors in mail readers
2018-10-13 13:03:02 +02:00
decabeza
5d00952b05 Improves styles for dashboard mailer preview 2018-10-13 13:01:38 +02:00
decabeza
eeea1acd9f Updates i18n for dashboard mailer 2018-10-13 13:00:01 +02:00
decabeza
84975143bb Removes dashboard mailer layout 2018-10-13 12:59:24 +02:00
decabeza
e0c5a79fae Removes dashboard mailer css 2018-10-13 12:59:05 +02:00
decabeza
2dae197eaa Updates i18n 2018-10-11 17:54:03 +02:00
decabeza
f0ef7c7e30 Improves styles for admin dashboard settings 2018-10-11 17:50:14 +02:00
decabeza
670eb52d6f Improves styles for admin dashboard administrator tasks views 2018-10-11 17:47:15 +02:00
Javier Martín
5f8311845b Merge pull request #2967 from consul/backport-1609-fix_skip_flaky_specs
Fix flaky spec: Admin feature flags Enable a disabled feature
2018-10-11 17:46:59 +02:00
decabeza
83634c992a Improves styles for admin dashboard actions views 2018-10-11 17:45:37 +02:00
Javi Martín
5ae7a5512d Skip spec before doing any requests
Skipping a spec in the middle of it, particularly after doing some
requests, caused Capybara to keep using the same driver in the following
spec.

Since the current spec uses the JavaScript driver, the next test would
also use the JavaScript driver, causing apparently random failures if
that test was supposed to use the Rack driver.
2018-10-11 17:14:53 +02:00
Alberto
bc6a02788a Merge pull request #2953 from consul/dashboard-design
Dashboard design
2018-10-11 13:17:41 +02:00
Alberto
83869725cd Merge pull request #2966 from kreopelle/image-doc-settings
Change spelling for constant to TITLE_LENGTH_RANGE
2018-10-11 10:59:59 +02:00
kreopelle
14a1eeb44f Change spelling for constant to TITLE_LENGTH_RANGE, instead of TITLE_LEGHT_RANGE 2018-10-10 21:02:55 -04:00