我正在编写 Capybara 规范并试图检测某些东西是否可见。以下规范正在通过,它不应该通过,因为 #packages 是 display: none。
it "should navigate through marketing successfully" do
visit root_path
click_link 'Learn More'
page.should have_content 'We are the perfect match'
click_link 'Packages'
page.should have_selector('#packages', visible: true)
end