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:
@@ -1,13 +1,16 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe "Admin hidden proposals", :admin do
|
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)
|
proposal = create(:proposal, :hidden)
|
||||||
visit admin_hidden_proposals_path
|
visit admin_hidden_proposals_path
|
||||||
|
|
||||||
expect(page).to have_content(proposal.title)
|
expect(page).to have_content(proposal.title)
|
||||||
expect(page).to have_content(proposal.summary)
|
expect(page).to have_content(proposal.summary)
|
||||||
expect(page).to have_content(proposal.description)
|
expect(page).to have_content(proposal.description)
|
||||||
|
|
||||||
|
find("td", text: proposal.summary).hover
|
||||||
|
|
||||||
expect(page).to have_content(proposal.video_url)
|
expect(page).to have_content(proposal.video_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user