Add auto height and width to the default make_visible CSS modifications

This commit is contained in:
Thomas Walpole 2019-05-23 15:29:18 -07:00
parent 2309a12d2d
commit 63af1963b2
1 changed files with 3 additions and 1 deletions

View File

@ -331,7 +331,9 @@ module Capybara
end
def while_visible(element, visible_css)
visible_css = { opacity: 1, display: 'block', visibility: 'visible' } if visible_css == true
if visible_css == true
visible_css = { opacity: 1, display: 'block', visibility: 'visible', width: 'auto', height: 'auto' }
end
_update_style(element, visible_css)
raise ExpectationNotMet, 'The style changes in :make_visible did not make the file input visible' unless element.visible?