Use JavaScript in test requiring to hover

Having all the text show when hovering over a cell is an
accessibility/usability issue that we now experience in the tests as
well.
This commit is contained in:
Javi Martín
2021-03-29 23:50:50 +02:00
parent cdd70a6116
commit e773f72a27

View File

@@ -1,13 +1,16 @@
require "rails_helper"
describe "Admin hidden proposals", :admin do
scenario "List shows all relevant info" do
scenario "List shows all relevant info", :js do
proposal = create(:proposal, :hidden)
visit admin_hidden_proposals_path
expect(page).to have_content(proposal.title)
expect(page).to have_content(proposal.summary)
expect(page).to have_content(proposal.description)
find("td", text: proposal.summary).hover
expect(page).to have_content(proposal.video_url)
end