Skip to content

Commit

Permalink
Fix Failing specs (decidim#11419)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecslupu authored Jul 31, 2023
1 parent 2dd4d72 commit 025fc4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section id="hero-<%= resource&.id %>" <%= "style=\"background-image:url('#{image_path}');\"" if image_path.present? %>>
<section id="hero-<%= resource&.id %>" <%= "style=\"background-image:url('#{image_path}');\"" if image_path.present? %> data-process-hero>
<div class="participatory-space__hero">
<div class="participatory-space__hero-text">
<h1 class="h1 text-5xl">
Expand Down
8 changes: 4 additions & 4 deletions decidim-core/spec/cells/decidim/user_activity_cell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
it "displays the latest items on the first page and a pagination" do
logs.last(10).each do |log|
root_link = Decidim::ResourceLocatorPresenter.new(log.resource.root_commentable).path
comment_link = "#{root_link}?commentId=#{log.resource.id}"
comment_link = "#{root_link}?commentId=#{log.resource.id}#comment_#{log.resource.id}"
title = html_truncate(translated_attribute(log.resource.root_commentable.title), length: 80)

expect(subject).to have_link(title, href: comment_link)
Expand All @@ -95,7 +95,7 @@
it "displays the oldest items and a pagination" do
logs.first(5).each do |log|
root_link = Decidim::ResourceLocatorPresenter.new(log.resource.root_commentable).path
comment_link = "#{root_link}?commentId=#{log.resource.id}"
comment_link = "#{root_link}?commentId=#{log.resource.id}#comment_#{log.resource.id}"
title = html_truncate(translated_attribute(log.resource.root_commentable.title), length: 80)

expect(subject).to have_link(title, href: comment_link)
Expand Down Expand Up @@ -124,14 +124,14 @@
# The first five items should be hidden through moderation
logs.first(5).each do |log|
root_link = Decidim::ResourceLocatorPresenter.new(log.resource.root_commentable).path
comment_link = "#{root_link}?commentId=#{log.resource.id}"
comment_link = "#{root_link}?commentId=#{log.resource.id}#comment_#{log.resource.id}"
title = html_truncate(translated_attribute(log.resource.root_commentable.title), length: 80)

expect(subject).not_to have_link(title, href: comment_link)
end
logs.last(10).each do |log|
root_link = Decidim::ResourceLocatorPresenter.new(log.resource.root_commentable).path
comment_link = "#{root_link}?commentId=#{log.resource.id}"
comment_link = "#{root_link}?commentId=#{log.resource.id}#comment_#{log.resource.id}"
title = html_truncate(translated_attribute(log.resource.root_commentable.title), length: 80)

expect(subject).to have_link(title, href: comment_link)
Expand Down

0 comments on commit 025fc4f

Please sign in to comment.