html_validation icon indicating copy to clipboard operation
html_validation copied to clipboard

Adding an matched exception ignores all errors

Open vikas-patel opened this issue 5 years ago • 1 comments

while running a rspec test I was getting the following warnings:

 line 43 column 55 - Warning: trimming empty <i>
       line 151 column 83 - Warning: trimming empty <span>
       line 151 column 61 - Warning: trimming empty <span>
       line 151 column 117 - Warning: trimming empty <i>
       line 126 column 17 - Warning: <video> proprietary attribute "muted

I wanted to ignore the '

But after the above change, it's ignoring all the warnings and report no warning.

btw, another question, how can I ignore the warning 'trimming empty '.

vikas-patel avatar Feb 27 '20 16:02 vikas-patel

btw 'ignored_tag_errors' config option is now working..

HTMLValidation.ignored_tag_errors = ['inline']
        validation = PageValidations::HTMLValidation.new.validation(response.body, '/items/'+item.sku)
        assert validation.valid?, validation.exceptions

But I still see the following error:

line 174 column 149 - Error: <inline> is not recognized!
       line 174 column 149 - Warning: discarding unexpected <inline>
       line 174 column 160 - Warning: discarding unexpected </inline>

vikas-patel avatar Feb 27 '20 17:02 vikas-patel