From c864c1435573e3c022bc1f8eb16474e8e1fdc083 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 28 Feb 2024 22:16:54 +0100 Subject: [PATCH] Fix selectors in answerbox comments view spec --- spec/views/answerbox/_comments.html.haml_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/views/answerbox/_comments.html.haml_spec.rb b/spec/views/answerbox/_comments.html.haml_spec.rb index cdf2d46f..c0daff76 100644 --- a/spec/views/answerbox/_comments.html.haml_spec.rb +++ b/spec/views/answerbox/_comments.html.haml_spec.rb @@ -40,7 +40,7 @@ describe "answerbox/_comments.html.haml", type: :view do it "shows the delete option" do html = Nokogiri::HTML.parse(rendered) - selector = %(li.comment[data-comment-id="#{comment.id}"] .btn-group a[data-action="ab-comment-destroy"]) + selector = %(li.comment[data-comment-id="#{comment.id}"] .dropdown a[data-action="ab-comment-destroy"]) element = html.css(selector) expect(element).to_not be_nil expect(element.text.strip).to eq("Delete") @@ -57,7 +57,7 @@ describe "answerbox/_comments.html.haml", type: :view do it "does not show the delete option" do html = Nokogiri::HTML.parse(rendered) - selector = %(li.comment[data-comment-id="#{comment.id}"] .btn-group a[data-action="ab-comment-destroy"]) + selector = %(li.comment[data-comment-id="#{comment.id}"] .dropdown a[data-action="ab-comment-destroy"]) expect(html.css(selector)).to be_empty end end