decidim-dev 0.24.3 → 0.25.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/decidim/dev/needs_development_tools.rb +25 -0
  3. data/app/mailers/decidim/dummy_resources/dummy_resource_mailer.rb +8 -2
  4. data/app/packs/entrypoints/decidim_dev.js +7 -0
  5. data/app/packs/entrypoints/decidim_dev.scss +1 -0
  6. data/app/{assets/images/decidim/dummy.svg → packs/images/decidim/decidim_dev_dummy.svg} +0 -0
  7. data/app/{assets/images/decidim/gamification/badges/test.svg → packs/images/decidim/gamification/badges/decidim_gamification_badges_test.svg} +0 -0
  8. data/app/packs/src/decidim/dev/accessibility.js +168 -0
  9. data/app/packs/stylesheets/decidim/dev.scss +1 -0
  10. data/app/packs/stylesheets/decidim/dev/_accessibility.scss +133 -0
  11. data/config/assets.rb +8 -0
  12. data/config/locales/ar.yml +5 -11
  13. data/config/locales/bg.yml +5 -11
  14. data/config/locales/ca.yml +5 -11
  15. data/config/locales/cs.yml +5 -11
  16. data/config/locales/de.yml +5 -11
  17. data/config/locales/el.yml +5 -11
  18. data/config/locales/en.yml +5 -11
  19. data/config/locales/es-MX.yml +5 -11
  20. data/config/locales/es-PY.yml +5 -11
  21. data/config/locales/es.yml +5 -11
  22. data/config/locales/eu.yml +5 -11
  23. data/config/locales/fi-plain.yml +5 -11
  24. data/config/locales/fi.yml +5 -11
  25. data/config/locales/fr-CA.yml +5 -11
  26. data/config/locales/fr-LU.yml +50 -0
  27. data/config/locales/fr.yml +5 -11
  28. data/config/locales/gl.yml +5 -11
  29. data/config/locales/hu.yml +5 -11
  30. data/config/locales/id-ID.yml +5 -11
  31. data/config/locales/is-IS.yml +0 -4
  32. data/config/locales/it.yml +5 -11
  33. data/config/locales/ja.yml +5 -11
  34. data/config/locales/lb-LU.yml +1 -0
  35. data/config/locales/lv.yml +3 -9
  36. data/config/locales/nl.yml +5 -11
  37. data/config/locales/no.yml +5 -11
  38. data/config/locales/pl.yml +5 -11
  39. data/config/locales/pt-BR.yml +21 -11
  40. data/config/locales/pt.yml +5 -11
  41. data/config/locales/ro-RO.yml +5 -11
  42. data/config/locales/ru.yml +5 -11
  43. data/config/locales/sk.yml +5 -11
  44. data/config/locales/sv.yml +5 -11
  45. data/config/locales/tr-TR.yml +5 -11
  46. data/config/locales/uk.yml +5 -11
  47. data/config/locales/zh-CN.yml +5 -11
  48. data/lib/decidim-dev.rb +3 -0
  49. data/lib/decidim/dev/assets/import_participatory_space_private_users_with_bom.csv +1 -0
  50. data/lib/decidim/dev/assets/import_proposals.xlsx +0 -0
  51. data/lib/decidim/dev/assets/import_voting_census.csv +5 -0
  52. data/lib/decidim/dev/assets/import_voting_census_with_ballot_styles.csv +5 -0
  53. data/lib/decidim/dev/engine.rb +17 -0
  54. data/lib/decidim/dev/test/rspec_support/accessibility_examples.rb +19 -0
  55. data/lib/decidim/dev/test/rspec_support/capybara.rb +2 -0
  56. data/lib/decidim/dev/test/rspec_support/capybara_data_picker.rb +1 -1
  57. data/lib/decidim/dev/test/rspec_support/capybara_scopes_picker.rb +7 -1
  58. data/lib/decidim/dev/test/rspec_support/component.rb +10 -1
  59. data/lib/decidim/dev/test/rspec_support/geocoder.rb +1 -1
  60. data/lib/decidim/dev/test/rspec_support/migration.rb +50 -0
  61. data/lib/decidim/dev/test/rspec_support/time_helpers.rb +5 -0
  62. data/lib/decidim/dev/test/rspec_support/webmock.rb +1 -1
  63. data/lib/decidim/dev/test/rspec_support/wicked_pdf_assets_mock.rb +17 -0
  64. data/lib/decidim/dev/test/spec_helper.rb +2 -0
  65. data/lib/decidim/dev/version.rb +1 -1
  66. data/lib/tasks/generators.rake +4 -1
  67. metadata +59 -45
  68. data/config/locales/ja-JP.yml +0 -56
  69. data/lib/decidim/dev/assets/import_proposals.xls +0 -0
  70. data/lib/decidim/dev/test/rspec_support/attachments.rb +0 -13
  71. data/lib/decidim/dev/test/rspec_support/puffing_billy.rb +0 -55
  72. data/lib/decidim/dev/test/rspec_support/vcr.rb +0 -27
@@ -40,17 +40,11 @@ ja:
40
40
  next_level_in: '%{score} 個のテストを作成して、次のレベルに到達しましょう!'
41
41
  unearned_another: この参加者はまだテストを作成していません。
42
42
  unearned_own: テストはまだ作成されていません。
43
- pages:
44
- home:
45
- statistics:
46
- bar: バー
47
- dummies_count_high: 高いダミー数
48
- dummies_count_medium: Dummies Medium
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: 高いダミー数
53
- dummies_count_medium: Dummies Medium
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: 関連ダミー
46
+ statistics:
47
+ bar: バー
48
+ dummies_count_high: 高いダミー数
49
+ dummies_count_medium: Dummies Medium
50
+ foo: Foo
@@ -0,0 +1 @@
1
+ lb:
@@ -40,15 +40,9 @@ lv:
40
40
  next_level_in: Izveidojiet vēl dažus %{score} testus, lai sasniegtu nākamo līmeni!
41
41
  unearned_another: Šis dalībnieks vēl nav izveidojis nevienu testu.
42
42
  unearned_own: Jūs vēl neesat izveidojis nevienu testu.
43
- pages:
44
- home:
45
- statistics:
46
- dummies_count_high: Augstie vietturi
47
- dummies_count_medium: Vidējie vietturi
48
- participatory_processes:
49
- statistics:
50
- dummies_count_high: Augstie vietturi
51
- dummies_count_medium: Vidējie vietturi
52
43
  resource_links:
53
44
  test_link:
54
45
  dummy_resource_dummy: Saistītie vietturi
46
+ statistics:
47
+ dummies_count_high: Augstie vietturi
48
+ dummies_count_medium: Vidējie vietturi
@@ -40,17 +40,11 @@ nl:
40
40
  next_level_in: Maak %{score} extra tests om het volgende niveau te bereiken!
41
41
  unearned_another: Deze gebruiker heeft nog geen tests gemaakt.
42
42
  unearned_own: U hebt nog geen tests gemaakt.
43
- pages:
44
- home:
45
- statistics:
46
- bar: Bar
47
- dummies_count_high: Dummies hoog
48
- dummies_count_medium: Dummies medium
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: Hoog aantal dummies
53
- dummies_count_medium: Gemiddeld aantal dummies
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: Gerelateerde dummy
46
+ statistics:
47
+ bar: Bar
48
+ dummies_count_high: Dummies hoog
49
+ dummies_count_medium: Dummies medium
50
+ foo: Foo
@@ -25,17 +25,11 @@
25
25
  next_level_in: Opprett %{score} flere tester for å nå neste nivå!
26
26
  unearned_another: Denne deltakeren har ikke opprettet en test ennå.
27
27
  unearned_own: Du har ikke laget noen tester ennå.
28
- pages:
29
- home:
30
- statistics:
31
- bar: Felt
32
- dummies_count_high: Dukker høy
33
- dummies_count_medium: Dukker medium
34
- foo: Foo
35
- participatory_processes:
36
- statistics:
37
- dummies_count_high: Dukker høy
38
- dummies_count_medium: Dukker medium
39
28
  resource_links:
40
29
  test_link:
41
30
  dummy_resource_dummy: Relaterte dukke
31
+ statistics:
32
+ bar: Felt
33
+ dummies_count_high: Dukker høy
34
+ dummies_count_medium: Dukker medium
35
+ foo: Foo
@@ -40,17 +40,11 @@ pl:
40
40
  next_level_in: Stwórz %{score} dodatkowych testów, aby przejść do następnego poziomu!
41
41
  unearned_another: Ten użytkownik nie utworzył jeszcze żadnych testów.
42
42
  unearned_own: Nie stworzyłeś jeszcze żadnych testów.
43
- pages:
44
- home:
45
- statistics:
46
- bar: Bar
47
- dummies_count_high: Przykładowa duża liczba
48
- dummies_count_medium: Przykładowa średnia liczba
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: Przykładowa duża liczba
53
- dummies_count_medium: Przykładowa średnia liczba
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: Przykładowe powiązanie
46
+ statistics:
47
+ bar: Bar
48
+ dummies_count_high: Przykładowa duża liczba
49
+ dummies_count_medium: Przykładowa średnia liczba
50
+ foo: Foo
@@ -3,11 +3,27 @@ pt:
3
3
  attributes:
4
4
  dummy_resource:
5
5
  created_at: Criado em
6
+ decidim_scope_id: Escopo
6
7
  field: Meu campo
7
8
  start_date: Data de início
8
9
  title: Título
10
+ translatable_text: Texto traduzido
9
11
  updated_at: Atualizado em
10
12
  decidim:
13
+ components:
14
+ dummy:
15
+ settings:
16
+ global:
17
+ readonly_attribute: Atributo somente leitura
18
+ test: Teste A
19
+ test_choices:
20
+ a: Escolha A
21
+ b: Escolha B
22
+ c: Escolha C
23
+ step:
24
+ endorsements_blocked: Endossos bloqueados
25
+ endorsements_enabled: Endossos habilitados
26
+ readonly_step_attribute: Atributo passo somente leitura
11
27
  dummy:
12
28
  admin:
13
29
  exports:
@@ -24,17 +40,11 @@ pt:
24
40
  next_level_in: Crie mais %{score} testes para alcançar o próximo nível!
25
41
  unearned_another: Este usuário ainda não criou nenhum teste.
26
42
  unearned_own: Você não criou testes ainda.
27
- pages:
28
- home:
29
- statistics:
30
- bar: Bar
31
- dummies_count_high: Dummies alta
32
- dummies_count_medium: Dummies medium
33
- foo: Foo
34
- participatory_processes:
35
- statistics:
36
- dummies_count_high: Dummies alta
37
- dummies_count_medium: Dummies médio
38
43
  resource_links:
39
44
  test_link:
40
45
  dummy_resource_dummy: Manequim relacionado
46
+ statistics:
47
+ bar: Bar
48
+ dummies_count_high: Dummies alta
49
+ dummies_count_medium: Dummies medium
50
+ foo: Foo
@@ -40,17 +40,11 @@ pt:
40
40
  next_level_in: Crie mais %{score} testes para alcançar o próximo nível!
41
41
  unearned_another: Este participante ainda não criou nenhum teste.
42
42
  unearned_own: Ainda não criou qualquer teste.
43
- pages:
44
- home:
45
- statistics:
46
- bar: Barra
47
- dummies_count_high: Fictícias alto
48
- dummies_count_medium: Fictícias médio
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: Fictícias alto
53
- dummies_count_medium: Dummies médio
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: Manequim relacionado
46
+ statistics:
47
+ bar: Barra
48
+ dummies_count_high: Fictícias alto
49
+ dummies_count_medium: Fictícias médio
50
+ foo: Foo
@@ -40,17 +40,11 @@ ro:
40
40
  next_level_in: Crează încă %{score} teste pentru a atinge următorul nivel!
41
41
  unearned_another: Acest participant nu a creat încă niciun test.
42
42
  unearned_own: Nu ați creat încă niciun test.
43
- pages:
44
- home:
45
- statistics:
46
- bar: Bară
47
- dummies_count_high: Dummieri mari
48
- dummies_count_medium: Medie de ficare
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: Dummieri mari
53
- dummies_count_medium: Medie de ficare
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: Legat de manechin
46
+ statistics:
47
+ bar: Bară
48
+ dummies_count_high: Dummieri mari
49
+ dummies_count_medium: Medie de ficare
50
+ foo: Foo
@@ -25,17 +25,11 @@ ru:
25
25
  next_level_in: Напишите еще %{score} тестов, чтобы достичь следующего уровня!
26
26
  unearned_another: Этот участник еще не написал тестов.
27
27
  unearned_own: Вы еще не написали тестов.
28
- pages:
29
- home:
30
- statistics:
31
- bar: Пример переменной 1
32
- dummies_count_high: Пример наибольшего количества
33
- dummies_count_medium: Пример среднего количества
34
- foo: Пример переменной 2
35
- participatory_processes:
36
- statistics:
37
- dummies_count_high: Пример наибольшего количества
38
- dummies_count_medium: Пример среднего количества
39
28
  resource_links:
40
29
  test_link:
41
30
  dummy_resource_dummy: Пример соотносящегося ресурса
31
+ statistics:
32
+ bar: Пример переменной 1
33
+ dummies_count_high: Пример наибольшего количества
34
+ dummies_count_medium: Пример среднего количества
35
+ foo: Пример переменной 2
@@ -31,17 +31,11 @@ sk:
31
31
  next_level_in: Vytvorte o %{score} testov viac pre dosiahnutie ďalšej úrovne!
32
32
  unearned_another: Tento účastník nevytvoril žiadny test.
33
33
  unearned_own: Zatiaľ ste nevytvorili žiadny test.
34
- pages:
35
- home:
36
- statistics:
37
- bar: Stĺpec
38
- dummies_count_high: Vysoký počet testovacích premenných
39
- dummies_count_medium: Stredný počet testovacích premenných
40
- foo: Test
41
- participatory_processes:
42
- statistics:
43
- dummies_count_high: Vysoký počet testovacích premenných
44
- dummies_count_medium: Stredný počet testovacích premenných
45
34
  resource_links:
46
35
  test_link:
47
36
  dummy_resource_dummy: Súvisiace indikátory
37
+ statistics:
38
+ bar: Stĺpec
39
+ dummies_count_high: Vysoký počet testovacích premenných
40
+ dummies_count_medium: Stredný počet testovacích premenných
41
+ foo: Test
@@ -40,17 +40,11 @@ sv:
40
40
  next_level_in: Skapa %{score} till tester för att nå nästa nivå!
41
41
  unearned_another: Deltagaren har inte skapat några tester än.
42
42
  unearned_own: Du har inte skapat några tester än.
43
- pages:
44
- home:
45
- statistics:
46
- bar: Bar
47
- dummies_count_high: Dummies höga
48
- dummies_count_medium: Dummies medium
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: Dummies höga
53
- dummies_count_medium: Dummies medium
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: Relaterad dummy
46
+ statistics:
47
+ bar: Bar
48
+ dummies_count_high: Dummies höga
49
+ dummies_count_medium: Dummies medium
50
+ foo: Foo
@@ -40,17 +40,11 @@ tr:
40
40
  next_level_in: Bir sonraki seviyeye ulaşmak için %{score} test daha oluştur!
41
41
  unearned_another: Bu katılımcı henüz bir test oluşturmadı.
42
42
  unearned_own: Henüz bir test oluşturmadınız.
43
- pages:
44
- home:
45
- statistics:
46
- bar: Çubuk
47
- dummies_count_high: Çok sahte
48
- dummies_count_medium: Orta sahte
49
- foo: Sahte değişken
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: Çok sahte
53
- dummies_count_medium: Orta sahte
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: İlgili sahte konu
46
+ statistics:
47
+ bar: Çubuk
48
+ dummies_count_high: Çok sahte
49
+ dummies_count_medium: Orta sahte
50
+ foo: Sahte değişken
@@ -12,17 +12,11 @@ uk:
12
12
  admin:
13
13
  exports:
14
14
  dummies: Приклади збереження
15
- pages:
16
- home:
17
- statistics:
18
- bar: Приклад змінної 1
19
- dummies_count_high: Приклад найвищої кількості
20
- dummies_count_medium: Приклад середньої кількості
21
- foo: Приклад змінної 2
22
- participatory_processes:
23
- statistics:
24
- dummies_count_high: Приклад найвищої кількості
25
- dummies_count_medium: Приклад середньої кількості
26
15
  resource_links:
27
16
  test_link:
28
17
  dummy_resource_dummy: Приклад пов'язаного ресурсу
18
+ statistics:
19
+ bar: Приклад змінної 1
20
+ dummies_count_high: Приклад найвищої кількості
21
+ dummies_count_medium: Приклад середньої кількості
22
+ foo: Приклад змінної 2
@@ -40,17 +40,11 @@ zh-CN:
40
40
  next_level_in: 再创建 %{score} 个测试以达到下一关!
41
41
  unearned_another: 此参与者尚未创建任何测试。
42
42
  unearned_own: 您还没有创建测试。
43
- pages:
44
- home:
45
- statistics:
46
- bar: 条形图
47
- dummies_count_high: 倾角高
48
- dummies_count_medium: 虚拟机介质
49
- foo: Foo
50
- participatory_processes:
51
- statistics:
52
- dummies_count_high: 倾角高
53
- dummies_count_medium: 虚拟机介质
54
43
  resource_links:
55
44
  test_link:
56
45
  dummy_resource_dummy: 相关虚假的
46
+ statistics:
47
+ bar: 条形图
48
+ dummies_count_high: 倾角高
49
+ dummies_count_medium: 虚拟机介质
50
+ foo: Foo
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/dev/engine" if Rails.env.development? || ENV["DECIDIM_DEV_ENGINE"]
@@ -0,0 +1 @@
1
+ my_user@example.org,My User Name
@@ -0,0 +1,5 @@
1
+ Document ID;Document Type;Date of Birth;Full name;Full address;Postal Code;Mobile phone number;Email address
2
+ 12345678X;DNI;20010101;John Doe;The full address one;08001;123456789;user@example.org
3
+ 87654321X;DNI;19800215;Alice Doe;The full address 2;08002;987654321;user2@example.org
4
+ 88854321X;DNI;20000815;Bob Doe;The full address 2;08002;111111111;
5
+ 87654321X;DNI;20101111;Alice Doe;The full address 2;08002;;user4@example.org
@@ -0,0 +1,5 @@
1
+ Document ID;Document Type;Date of Birth;Full name;Full address;Postal Code;Mobile phone number;Email address;Ballot Style Code
2
+ 12345678X;DNI;20010101;John Doe;The full address one;08001;123456789;user@example.org;district1
3
+ 87654321X;DNI;19800215;Alice Doe;The full address 2;08002;987654321;user2@example.org;DISTRICT1
4
+ 88854321X;DNI;20000815;Bob Doe;The full address 2;08002;111111111;;district2
5
+ 87654321X;DNI;20101111;Alice Doe;The full address 2;08002;;user4@example.org;DISTRICT2
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Dev
5
+ # Decidim's development Rails Engine.
6
+ class Engine < ::Rails::Engine
7
+ isolate_namespace Decidim::Dev
8
+ engine_name "decidim_dev"
9
+
10
+ initializer "decidim_dev.tools" do
11
+ ActiveSupport.on_load :action_controller do
12
+ ActionController::Base.include Decidim::Dev::NeedsDevelopmentTools
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples_for "accessible page" do
4
+ it "passes accessibility tests" do
5
+ expect(page).to be_axe_clean
6
+ end
7
+
8
+ it "passes HTML validation" do
9
+ # Capybara is stripping the doctype out of the HTML which is required for
10
+ # the validation. If it doesn't exist, add it there.
11
+ html = page.source
12
+ html = "<!DOCTYPE html>\n#{html}" unless html.strip.match?(/^<!DOCTYPE/i)
13
+
14
+ # This would cause a validation error (added by Foundation JS).
15
+ html = html.gsub(/<meta class="foundation-mq">/, "")
16
+
17
+ expect(html).to be_valid_html
18
+ end
19
+ end
@@ -59,6 +59,8 @@ Capybara.asset_host = "http://localhost:3000"
59
59
 
60
60
  Capybara.server_errors = [SyntaxError, StandardError]
61
61
 
62
+ Capybara.default_max_wait_time = 10
63
+
62
64
  RSpec.configure do |config|
63
65
  config.before :each, type: :system do
64
66
  driven_by(:headless_chrome)
@@ -17,7 +17,7 @@ module Capybara
17
17
 
18
18
  def data_picker_pick_current
19
19
  body = find(:xpath, "//body")
20
- expect(body).to have_selector("#data_picker-modal .picker-footer a[data-picker-choose]")
20
+ expect(body).to have_selector("#data_picker-modal .picker-footer a[data-picker-choose]", wait: 2)
21
21
  body.find("#data_picker-modal .picker-footer a[data-picker-choose]").click
22
22
  end
23
23