test for issue clicking on <a> tags with javascript: hrefs when using racktest driver

This commit is contained in:
Thomas Walpole 2015-03-16 15:57:04 -07:00
parent 9dcd6d7546
commit 0260f94baf
2 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,8 @@ Capybara::SpecHelper.spec '#click_link' do
expect(@session.find_field("test_field").value).to eq('blah')
@session.click_link('Blank Anchor')
expect(@session.find_field("test_field").value).to eq('blah')
@session.click_link('Blank JS Anchor')
expect(@session.find_field("test_field").value).to eq('blah')
end
it "should do nothing on URL+anchor links for the same page" do

View File

@ -45,6 +45,7 @@ banana</textarea>
<a>No Href</a>
<a href="">Blank Href</a>
<a href="#">Blank Anchor</a>
<a href="javascript:void(0)">Blank JS Anchor</a>
<a href="#anchor">Normal Anchor</a>
<a href="/with_simple_html#anchor">Anchor on different page</a>
<a href="/with_html#anchor">Anchor on same page</a>