fix(tests): Only set the autofocus timeout if the element to be focused is hidden.

@vladikoff - mind reviewing?

If the element is already visible, only attempt one focus.

fixes #1329
`visible`