template elements should not be considered visible
This commit is contained in:
parent
31b74c52d3
commit
8faa557c45
|
@ -102,6 +102,7 @@ module Capybara
|
|||
#
|
||||
def visible?(check_ancestors = true)
|
||||
return false if (tag_name == 'input') && (native[:type] == 'hidden')
|
||||
return false if tag_name == 'template'
|
||||
|
||||
if check_ancestors
|
||||
!find_xpath(VISIBILITY_XPATH)
|
||||
|
|
|
@ -242,6 +242,7 @@ Capybara::SpecHelper.spec 'node' do
|
|||
expect(@session.find('//div[@id="hidden_attr"]')).not_to be_visible
|
||||
expect(@session.find('//a[@id="hidden_attr_via_ancestor"]')).not_to be_visible
|
||||
expect(@session.find('//input[@id="hidden_input"]')).not_to be_visible
|
||||
expect(@session.find('//template')).not_to be_visible
|
||||
end
|
||||
|
||||
it 'should be boolean' do
|
||||
|
|
|
@ -178,5 +178,9 @@ banana</textarea>
|
|||
                   
|
||||
</div>
|
||||
|
||||
<template id="template">
|
||||
<input />
|
||||
</template>
|
||||
|
||||
<a href="/download.csv" download>Download Me</a>
|
||||
<a href="/download.csv" download="other.csv">Download Other</a>
|
||||
|
|
Loading…
Reference in New Issue