bc611d6 Tweak the desktop update loop again to try and be more robust

Authored and Committed by adamwill 2 years ago
    Tweak the desktop update loop again to try and be more robust
    
    I've seen some failures caused by a sort of race where both
    'apply' and 'refresh' needles match at the first assertion, but
    openQA "prefers" the 'refresh' match. So we click the 'refresh'
    button and *immediately* check_screen for apply, which is still
    visible...but by the time we go to click it, it's gone because
    the refresh found something new and now it's showing "Download".
    This tweak should help, because if we can 'see' both refresh and
    apply at the start, we'll just go ahead and click apply, we
    won't refresh. The logic becomes a little more obscure, but I'm
    not sure I see a fix for that. At least until KDE's tool finally
    settles down for two releases in a row and we might be able to
    simplify this whole thing.
    
    Signed-off-by: Adam Williamson <awilliam@redhat.com>