diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index c60fa4d11..56223e06a 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -2491,7 +2491,6 @@ table { @include breakpoint(medium) { .score-actions { - display: none; float: right; } } @@ -2499,14 +2498,6 @@ table { &:first-child { border-top: 1px solid $border; } - - &:hover { - background: #f9f9f9; - - .score-actions { - display: block; - } - } } h3 { diff --git a/app/views/relationable/_score.html.erb b/app/views/relationable/_score.html.erb index be481fdae..ef66c7b4e 100644 --- a/app/views/relationable/_score.html.erb +++ b/app/views/relationable/_score.html.erb @@ -5,13 +5,11 @@ score_positive_related_content_path(related), method: :put, remote: true, - id: "score-positive-related-#{related.id}", class: "score-positive" %> <%= link_to t("related_content.score_negative"), score_negative_related_content_path(related), method: :put, remote: true, - id: "score-negative-related-#{related.id}", class: "score-negative" %> diff --git a/spec/shared/system/relationable.rb b/spec/shared/system/relationable.rb index ee2a2013a..3e7088f04 100644 --- a/spec/shared/system/relationable.rb +++ b/spec/shared/system/relationable.rb @@ -97,9 +97,10 @@ shared_examples "relationable" do |relationable_model_name| visit relationable.url within("#related-content-list") do - find("#related-content-#{related_content.opposite_related_content.id}").hover - find("#score-positive-related-#{related_content.opposite_related_content.id}").click - expect(page).not_to have_css "#score-positive-related-#{related_content.opposite_related_content.id}" + click_link "Yes" + + expect(page).not_to have_link "Yes" + expect(page).not_to have_link "No" end expect(related_content.related_content_scores.find_by(user_id: user.id, related_content_id: related_content.id).value).to eq(1) @@ -113,9 +114,10 @@ shared_examples "relationable" do |relationable_model_name| visit relationable.url within("#related-content-list") do - find("#related-content-#{related_content.opposite_related_content.id}").hover - find("#score-negative-related-#{related_content.opposite_related_content.id}").click - expect(page).not_to have_css "#score-negative-related-#{related_content.opposite_related_content.id}" + click_link "No" + + expect(page).not_to have_link "Yes" + expect(page).not_to have_link "No" end expect(related_content.related_content_scores.find_by(user_id: user.id, related_content_id: related_content.id).value).to eq(-1)