Skip to content

Commit

Permalink
Fix main tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laurajaime committed Jul 18, 2024
1 parent 580fd4b commit f422b75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

require "rails_helper"

describe "new registration" do
describe "new registration", type: :system do
let(:organization) { create :organization }

before do
app_host = (organization.host ? "http://#{organization.host}:3000" : nil)
Capybara.app_host = app_host
switch_to_host(organization.host)
visit decidim.root_path
end

it "display feder logo on footer on homepage" do
Expand Down
6 changes: 3 additions & 3 deletions spec/system/homepage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

before do
switch_to_host(organization.host)
visit decidim.root_path
visit decidim.root_path(locale: I18n.locale)
end

it "loads and shows organization name and main blocks" do
Expand All @@ -28,8 +28,8 @@
within "section.hero .hero__container" do
expect(page).to have_content("Benvinguda a Participa Gencat")
end
within "section.subhero:not(.footer__subhero)" do
subhero_msg= translated(organization.description).gsub(%r{</p>\s+<p>}, "<br><br>").gsub(%r{<p>(((?!</p>).)*)</p>}mi, "\\1")
within "section.subhero" do
subhero_msg= translated(organization.description).gsub(%r{</p>\s+<p>}, "<br><br>").gsub(%r{<p>(((?!</p>).)*)</p>}mi, "\\1").gsub(%r{<script>(((?!</script>).)*)</script>}mi, "\\1")
expect(page).to have_content(subhero_msg)
end
end
Expand Down

0 comments on commit f422b75

Please sign in to comment.