decidim-dev 0.27.0.rc1 → 0.27.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/config/locales/am-ET.yml +0 -1
  3. data/config/locales/ca.yml +6 -0
  4. data/config/locales/cs.yml +4 -0
  5. data/config/locales/da.yml +0 -1
  6. data/config/locales/en.yml +6 -0
  7. data/config/locales/eo.yml +0 -1
  8. data/config/locales/es-MX.yml +6 -0
  9. data/config/locales/es-PY.yml +6 -0
  10. data/config/locales/es.yml +6 -0
  11. data/config/locales/et.yml +0 -1
  12. data/config/locales/fi-plain.yml +6 -0
  13. data/config/locales/fi.yml +6 -0
  14. data/config/locales/fr-CA.yml +6 -0
  15. data/config/locales/fr.yml +6 -0
  16. data/config/locales/hr.yml +0 -1
  17. data/config/locales/ja.yml +6 -0
  18. data/config/locales/ko.yml +0 -1
  19. data/config/locales/lb.yml +0 -1
  20. data/config/locales/lt.yml +63 -0
  21. data/config/locales/mt.yml +0 -1
  22. data/config/locales/om-ET.yml +0 -1
  23. data/config/locales/pt-BR.yml +1 -1
  24. data/config/locales/si-LK.yml +0 -1
  25. data/config/locales/so-SO.yml +0 -1
  26. data/config/locales/sw-KE.yml +0 -1
  27. data/config/locales/ti-ER.yml +0 -1
  28. data/config/locales/val-ES.yml +0 -1
  29. data/config/locales/vi.yml +0 -1
  30. data/config/locales/zh-TW.yml +0 -1
  31. data/lib/decidim/dev/assets/import_voting_census_only_headers.csv +1 -0
  32. data/lib/decidim/dev/assets/ssl-cert.pem +22 -0
  33. data/lib/decidim/dev/assets/ssl-key.pem +28 -0
  34. data/lib/decidim/dev/test/rspec_support/capybara.rb +37 -7
  35. data/lib/decidim/dev/test/rspec_support/{cookies.rb → data_consent.rb} +10 -10
  36. data/lib/decidim/dev/test/rspec_support/helpers.rb +12 -0
  37. data/lib/decidim/dev/version.rb +1 -1
  38. data/lib/tasks/generators.rake +2 -1
  39. metadata +8 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 352297a2285a46b08d1d758ef879cb997dd0c4cd6fc5d4413a3db9503ba04a24
4
- data.tar.gz: '0099b3b7b5e6566b5f3f3dfb1c44cbf5e3e871b976e8e453d3d668e2a4f161cb'
3
+ metadata.gz: '08a9bbef78590b71efd7993671db0fa5fab2beb3e27b4f35210cf861cdc34833'
4
+ data.tar.gz: 13cfd77cde2ebbb9a187f4b6c35331d5d9c5f1494cf6cd07ccb37a460436b891
5
5
  SHA512:
6
- metadata.gz: 3dff37974008ead98152ef3f156e3f73e082af7477c72c84c0f5e8f18204510d3a3c46605a88842289da7a57e228e2f2da3744d9aab59de2497f8aca5e5075e9
7
- data.tar.gz: ed2983e1a820fa3686cf6f5a7cae8d64d9aaf4e473ccda2952f291d795ffe87f95555864d30c56b91523a4ce0ee003b1d1dd3eefa8226c96266ea2a59b183537
6
+ metadata.gz: 6a679208414756a5b9b71959dd7be81e6a7415ec7adfa56fa534b5eaee8f6d2ffda2e631acd52b613541926fb45b5208eb7296bda3351d18687cd7ad2151e7de
7
+ data.tar.gz: 7010d009057c3e5897cebc848812ca251dbb5d3dd7dc3b9d77f6dbd09dfdcde41533c8dc3797bc855ee91faf68ffa887d8822b0c7672fbf35481f55224f3348f
@@ -1,2 +1 @@
1
- ---
2
1
  am:
@@ -15,6 +15,12 @@ ca:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrada guiada
19
+ guided_help: Text d'ajuda
20
+ guided_readonly: Entrada deshabilitada
21
+ guided_rich: Entrada guiada enriquida
22
+ guided_rich_help_html: HTML <strong>ajuda</strong> text
23
+ guided_rich_readonly_html: HTML <strong>ajuda</strong> text per l'entrada deshabilitada
18
24
  readonly_attribute: Atribut de només lectura
19
25
  test: Una prova
20
26
  test_choices:
@@ -15,6 +15,10 @@ cs:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided_help: Text nápovědy
19
+ guided_readonly: Zakázaný zápis
20
+ guided_rich_help_html: HTML textová <strong>nápověda</strong>
21
+ guided_rich_readonly_html: HTML <strong>nápověda</strong> text pro zakázaný zápis
18
22
  readonly_attribute: Atribut pouze pro čtení
19
23
  test: Zkouška A
20
24
  test_choices:
@@ -1,2 +1 @@
1
- ---
2
1
  da:
@@ -15,6 +15,12 @@ en:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Guided input
19
+ guided_help: Help text
20
+ guided_readonly: Disabled input
21
+ guided_rich: Guided rich input
22
+ guided_rich_help_html: HTML <strong>help</strong> text
23
+ guided_rich_readonly_html: HTML <strong>help</strong> text for disabled input
18
24
  readonly_attribute: Readonly attribute
19
25
  test: A test
20
26
  test_choices:
@@ -1,2 +1 @@
1
- ---
2
1
  eo:
@@ -15,6 +15,12 @@ es-MX:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrada guiada
19
+ guided_help: Texto de ayuda
20
+ guided_readonly: Entrada deshabilitada
21
+ guided_rich: Entrada guiada enriquecida
22
+ guided_rich_help_html: Texto de <strong>ayuda</strong> HTML
23
+ guided_rich_readonly_html: Texto de <strong>ayuda</strong> HTML para la entrada deshabilitada
18
24
  readonly_attribute: Atributo de sólo lectura
19
25
  test: Test A
20
26
  test_choices:
@@ -15,6 +15,12 @@ es-PY:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrada guiada
19
+ guided_help: Texto de ayuda
20
+ guided_readonly: Entrada deshabilitada
21
+ guided_rich: Entrada guiada enriquecida
22
+ guided_rich_help_html: Texto de <strong>ayuda</strong> HTML
23
+ guided_rich_readonly_html: Texto de <strong>ayuda</strong> HTML para la entrada deshabilitada
18
24
  readonly_attribute: Atributo de sólo lectura
19
25
  test: Test A
20
26
  test_choices:
@@ -15,6 +15,12 @@ es:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrada guiada
19
+ guided_help: Texto de ayuda
20
+ guided_readonly: Entrada deshabilitada
21
+ guided_rich: Entrada guiada enriquecida
22
+ guided_rich_help_html: Texto de <strong>ayuda</strong> HTML
23
+ guided_rich_readonly_html: Texto de <strong>ayuda</strong> HTML para la entrada deshabilitada
18
24
  readonly_attribute: Atributo de sólo lectura
19
25
  test: Una prueba
20
26
  test_choices:
@@ -1,2 +1 @@
1
- ---
2
1
  et:
@@ -15,6 +15,12 @@ fi-pl:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Ohjeistettu syöte
19
+ guided_help: Ohjeteksti
20
+ guided_readonly: Käytöstä poistettu syöte
21
+ guided_rich: Ohjeistettu rikas tekstisyöte
22
+ guided_rich_help_html: HTML <strong>ohjeteksti</strong>
23
+ guided_rich_readonly_html: Käytöstä poistettu HTML <strong>ohjeteksti</strong>
18
24
  readonly_attribute: Vain luku -attribuutti
19
25
  test: Testi
20
26
  test_choices:
@@ -15,6 +15,12 @@ fi:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Ohjeistettu syöte
19
+ guided_help: Ohjeteksti
20
+ guided_readonly: Käytöstä poistettu syöte
21
+ guided_rich: Ohjeistettu rikas tekstisyöte
22
+ guided_rich_help_html: HTML <strong>ohjeteksti</strong>
23
+ guided_rich_readonly_html: Käytöstä poistettu HTML <strong>ohjeteksti</strong>
18
24
  readonly_attribute: Vain luku -attribuutti
19
25
  test: Testi
20
26
  test_choices:
@@ -15,6 +15,12 @@ fr-CA:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrée guidée
19
+ guided_help: Texte d'aide
20
+ guided_readonly: Entrée désactivée
21
+ guided_rich: Entrée riche guidée
22
+ guided_rich_help_html: Texte <strong>d'aide</strong> HTML
23
+ guided_rich_readonly_html: Texte <strong>d'aide</strong> HTML pour les entrées désactivées
18
24
  readonly_attribute: Attribut en lecture seule
19
25
  test: Un test
20
26
  test_choices:
@@ -15,6 +15,12 @@ fr:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrée guidée
19
+ guided_help: Texte d'aide
20
+ guided_readonly: Entrée désactivée
21
+ guided_rich: Entrée riche guidée
22
+ guided_rich_help_html: Texte <strong>d'aide</strong> HTML
23
+ guided_rich_readonly_html: Texte <strong>d'aide</strong> HTML pour les entrées désactivées
18
24
  readonly_attribute: Attribut en lecture seule
19
25
  test: Un test
20
26
  test_choices:
@@ -1,2 +1 @@
1
- ---
2
1
  hr:
@@ -15,6 +15,12 @@ ja:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: ガイド付き入力
19
+ guided_help: ヘルプテキスト
20
+ guided_readonly: 無効化された入力
21
+ guided_rich: ガイド付きリッチ入力
22
+ guided_rich_help_html: HTML <strong>ヘルプ</strong> のテキスト
23
+ guided_rich_readonly_html: HTML <strong>ヘルプ</strong> の入力を無効にする
18
24
  readonly_attribute: 読み取り専用属性
19
25
  test: テスト
20
26
  test_choices:
@@ -1,2 +1 @@
1
- ---
2
1
  ko:
@@ -1,2 +1 @@
1
- ---
2
1
  lb:
@@ -1,2 +1,65 @@
1
1
  ---
2
2
  lt:
3
+ activemodel:
4
+ attributes:
5
+ dummy_resource:
6
+ created_at: Sukurta
7
+ decidim_scope_id: Apimtis
8
+ field: Mano laukas
9
+ start_date: Pradžios data
10
+ title: Pavadinimas
11
+ translatable_text: Verčiamas tekstas
12
+ updated_at: Atnaujinta
13
+ decidim:
14
+ components:
15
+ dummy:
16
+ settings:
17
+ global:
18
+ guided: Vedama įvestis
19
+ guided_help: Pagalbos tekstas
20
+ guided_readonly: Išjungta įvestis
21
+ guided_rich: Vedama turtinga įvestis
22
+ guided_rich_help_html: HTML <strong>pagalbos</strong> tekstas
23
+ guided_rich_readonly_html: HTML <strong>pagalbos</strong>tekstas išjungtai įvesčiai
24
+ readonly_attribute: Tik skaitomas atributas
25
+ test: Bandymas
26
+ test_choices:
27
+ a: A pasirinkimas
28
+ b: B pasirinkimas
29
+ c: C pasirinkimas
30
+ test_options:
31
+ bar: Juosta
32
+ baz: Baz
33
+ foo: Foo
34
+ step:
35
+ endorsements_blocked: Pritarimai užblokuoti
36
+ endorsements_enabled: Pritarimai aktyvuoti
37
+ readonly_step_attribute: Tik skaitomas veiksmo atributas
38
+ test_options:
39
+ bar: Juosta
40
+ baz: Baz
41
+ foo: Foo
42
+ dummy:
43
+ admin:
44
+ exports:
45
+ dummies: Fiktyvūs elementai
46
+ gamification:
47
+ badges:
48
+ test:
49
+ conditions:
50
+ - Naudokite testinę aplinką.
51
+ description: Dalyviai šį ženklelį pelno kurdami testus.
52
+ description_another: Šis dalyvis sukūrė %{score} testus.
53
+ description_own: Jūs sukūrėte %{score} testus.
54
+ name: Testai
55
+ next_level_in: Parenkite dar %{score} testus ir pasiekite kitą lygį!
56
+ unearned_another: Šis dalyvis dar nesukūrė jokių testų.
57
+ unearned_own: Jūs dar nesukūrėte jokių testų.
58
+ resource_links:
59
+ test_link:
60
+ dummy_resource_dummy: Susijęs fiktyvus elementas
61
+ statistics:
62
+ bar: Bar
63
+ dummies_count_high: Daug fiktyvių elementų
64
+ dummies_count_medium: Vidutiniškai fiktyvių elementų
65
+ foo: Foo
@@ -1,2 +1 @@
1
- ---
2
1
  mt:
@@ -1,2 +1 @@
1
- ---
2
1
  om:
@@ -1,5 +1,5 @@
1
1
  ---
2
- pt:
2
+ pt-BR:
3
3
  activemodel:
4
4
  attributes:
5
5
  dummy_resource:
@@ -1,2 +1 @@
1
- ---
2
1
  si:
@@ -1,2 +1 @@
1
- ---
2
1
  so:
@@ -1,2 +1 @@
1
- ---
2
1
  sw:
@@ -1,2 +1 @@
1
- ---
2
1
  ti:
@@ -1,2 +1 @@
1
- ---
2
1
  val:
@@ -1,2 +1 @@
1
- ---
2
1
  vi:
@@ -1,2 +1 @@
1
- ---
2
1
  zh-TW:
@@ -0,0 +1 @@
1
+ Document ID;Document Type;Date of Birth;Full name;Full address;Postal Code;Mobile phone number;Email address
@@ -0,0 +1,22 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDuzCCAqOgAwIBAgIUK548SGgd4RimiJRsHG/eydDD7dMwDQYJKoZIhvcNAQ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't switch to a custom host unless it really exists. Use `whatever.lvh.me` as a workaround." unless /lvh\.me$/.match?(host)
10
10
 
11
- app_host = (host ? "http://#{host}" : nil)
11
+ app_host = (host ? "#{protocol}://#{host}" : nil)
12
12
  Capybara.app_host = app_host
13
13
  end
14
14
 
@@ -17,7 +17,13 @@ module Decidim
17
17
  end
18
18
 
19
19
  def switch_to_secure_context_host
20
- Capybara.app_host = "http://localhost"
20
+ Capybara.app_host = "#{protocol}://localhost"
21
+ end
22
+
23
+ def protocol
24
+ return "https" if ENV["TEST_SSL"]
25
+
26
+ "http"
21
27
  end
22
28
  end
23
29
  end
@@ -31,6 +37,7 @@ Capybara.register_driver :headless_chrome do |app|
31
37
  else
32
38
  "--window-size=1920,1080"
33
39
  end
40
+ options.args << "--ignore-certificate-errors" if ENV["TEST_SSL"]
34
41
  Capybara::Selenium::Driver.new(
35
42
  app,
36
43
  browser: :chrome,
@@ -38,7 +45,16 @@ Capybara.register_driver :headless_chrome do |app|
38
45
  )
39
46
  end
40
47
 
41
- Capybara.server_port = rand(5000..6999)
48
+ 1.step do
49
+ port = rand(5000..6999)
50
+ begin
51
+ Socket.tcp("127.0.0.1", port, connect_timeout: 5).close
52
+ rescue Errno::ECONNREFUSED
53
+ # When connection is refused, the port is available for use.
54
+ Capybara.server_port = port
55
+ break
56
+ end
57
+ end
42
58
 
43
59
  # In order to work with PWA apps, Chrome can't be run in headless mode, and requires
44
60
  # setting up special prefs and flags
@@ -81,9 +97,18 @@ Capybara.register_driver :iphone do |app|
81
97
  )
82
98
  end
83
99
 
84
- Capybara.server = :puma, { Silent: true, queue_requests: false }
85
-
86
- Capybara.asset_host = "http://localhost:3000"
100
+ server_options = { Silent: true, queue_requests: false }
101
+ if ENV["TEST_SSL"]
102
+ dev_gem = Bundler.load.specs.find { |spec| spec.name == "decidim-dev" }
103
+ cert_dir = "#{dev_gem.full_gem_path}/lib/decidim/dev/assets"
104
+ server_options.merge!(
105
+ Host: "ssl://#{Capybara.server_host}:#{Capybara.server_port}?key=#{cert_dir}/ssl-key.pem&cert=#{cert_dir}/ssl-cert.pem"
106
+ )
107
+ Capybara.asset_host = "https://localhost:3000"
108
+ else
109
+ Capybara.asset_host = "http://localhost:3000"
110
+ end
111
+ Capybara.server = :puma, server_options
87
112
 
88
113
  Capybara.server_errors = [SyntaxError, StandardError]
89
114
 
@@ -95,12 +120,17 @@ RSpec.configure do |config|
95
120
  switch_to_default_host
96
121
  domain = (try(:organization) || try(:current_organization))&.host
97
122
  if domain
123
+ # Javascript sets the cookie also for all subdomains but localhost is a
124
+ # special case.
125
+ domain = ".#{domain}" unless domain == "localhost"
98
126
  page.driver.browser.execute_cdp(
99
127
  "Network.setCookie",
100
128
  domain: domain,
101
129
  name: Decidim.consent_cookie_name,
102
130
  value: { essential: true }.to_json,
103
- path: "/"
131
+ path: "/",
132
+ expires: 1.day.from_now.to_i,
133
+ same_site: "Lax"
104
134
  )
105
135
  end
106
136
  end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- module Cookies
5
- # Update cookie consent
6
- def select_cookies(cookies = "all", options = {})
4
+ module DataConsent
5
+ # Update data consent
6
+ def data_consent(categories = "all", options = {})
7
7
  visit decidim.root_path if options[:visit_root]
8
8
 
9
9
  dialog_present = begin
10
- find("#cc-dialog-wrapper")
10
+ find("#dc-dialog-wrapper")
11
11
  rescue Capybara::ElementNotFound => _e
12
12
  false
13
13
  end
@@ -20,16 +20,16 @@ module Capybara
20
20
  end
21
21
  end
22
22
 
23
- if [true, "all"].include?(cookies)
23
+ if [true, "all"].include?(categories)
24
24
  click_button "Accept all"
25
- elsif cookies.is_a?(Array)
26
- cookies.each do |cookie|
27
- within "[data-id='#{cookie}']" do
25
+ elsif categories.is_a?(Array)
26
+ categories.each do |category|
27
+ within "[data-id='#{category}']" do
28
28
  find(".switch-paddle").click
29
29
  end
30
30
  end
31
31
  click_button "Save settings"
32
- elsif [false, "essential"].include?(cookies)
32
+ elsif [false, "essential"].include?(categories)
33
33
  click_button "Accept only essential"
34
34
  end
35
35
  end
@@ -37,5 +37,5 @@ module Capybara
37
37
  end
38
38
 
39
39
  RSpec.configure do |config|
40
- config.include Capybara::Cookies, type: :system
40
+ config.include Capybara::DataConsent, type: :system
41
41
  end
@@ -39,6 +39,18 @@ module Decidim::ComponentTestHelpers
39
39
  def have_admin_callout(text)
40
40
  have_selector(".callout--full", text: text)
41
41
  end
42
+
43
+ def stub_get_request_with_format(rq_url, rs_format)
44
+ stub_request(:get, rq_url)
45
+ .with(
46
+ headers: {
47
+ "Accept" => "*/*",
48
+ "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
49
+ "User-Agent" => "Ruby"
50
+ }
51
+ )
52
+ .to_return(status: 200, body: "", headers: { content_type: rs_format })
53
+ end
42
54
  end
43
55
 
44
56
  RSpec.configure do |config|
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-dev version.
5
5
  module Dev
6
6
  def self.version
7
- "0.27.0.rc1"
7
+ "0.27.0.rc2"
8
8
  end
9
9
  end
10
10
  end
@@ -52,7 +52,8 @@ namespace :decidim do
52
52
  "--demo",
53
53
  "--profiling",
54
54
  "--locales",
55
- "en,ca,es"
55
+ "en,ca,es",
56
+ "--dev_ssl"
56
57
  )
57
58
  end
58
59
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0.rc1
4
+ version: 0.27.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-06-27 00:00:00.000000000 Z
13
+ date: 2022-09-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capybara
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.27.0.rc1
35
+ version: 0.27.0.rc2
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.27.0.rc1
42
+ version: 0.27.0.rc2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: factory_bot_rails
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -515,6 +515,7 @@ files:
515
515
  - lib/decidim/dev/assets/import_proposals.xlsx
516
516
  - lib/decidim/dev/assets/import_proposals_broken.csv
517
517
  - lib/decidim/dev/assets/import_voting_census.csv
518
+ - lib/decidim/dev/assets/import_voting_census_only_headers.csv
518
519
  - lib/decidim/dev/assets/import_voting_census_with_ballot_styles.csv
519
520
  - lib/decidim/dev/assets/import_voting_census_without_headers.csv
520
521
  - lib/decidim/dev/assets/invalid.jpeg
@@ -532,6 +533,8 @@ files:
532
533
  - lib/decidim/dev/assets/public_key.jwk
533
534
  - lib/decidim/dev/assets/public_key2.jwk
534
535
  - lib/decidim/dev/assets/public_key3.jwk
536
+ - lib/decidim/dev/assets/ssl-cert.pem
537
+ - lib/decidim/dev/assets/ssl-key.pem
535
538
  - lib/decidim/dev/assets/test_excel.xlsx
536
539
  - lib/decidim/dev/assets/verify_user_groups.csv
537
540
  - lib/decidim/dev/common_rake.rb
@@ -560,7 +563,7 @@ files:
560
563
  - lib/decidim/dev/test/rspec_support/confirmation_helpers.rb
561
564
  - lib/decidim/dev/test/rspec_support/content_processing.rb
562
565
  - lib/decidim/dev/test/rspec_support/controller_example_group.rb
563
- - lib/decidim/dev/test/rspec_support/cookies.rb
566
+ - lib/decidim/dev/test/rspec_support/data_consent.rb
564
567
  - lib/decidim/dev/test/rspec_support/dynamic_attach.rb
565
568
  - lib/decidim/dev/test/rspec_support/factory_bot.rb
566
569
  - lib/decidim/dev/test/rspec_support/frontend.rb