FIX: Safely skip secure_media steps when it's not enabled (#11110)

* FIX: Safely skip secure_media steps when it's not enabled

* DEV: Secure media tests should enable secure media
This commit is contained in:
Rafael dos Santos Silva
2020-11-03 13:53:15 -03:00
committed by GitHub
parent d2116f0029
commit b70b3e867c
3 changed files with 12 additions and 2 deletions

View File

@ -432,7 +432,7 @@ module PrettyText
# images by themselves or inside a onebox
doc.css('img[src]').each do |img|
url = if img.parent.classes.include?("aspect-image")
url = if img.parent.classes.include?("aspect-image") && img.attributes["srcset"].present?
# we are using the first image from the srcset here so we get the
# optimized image instead of the original, because an optimized