RedHatQE/cfme_tests — pull request #1102 by sshveta (2014-08-20 16:12:21+00:00)
Title: Added else to save server role method

Need someone to review this PR .
Raised this PR because of service automation failures on jenkins.
Tests seems to wait too long in Configuration page for Server role fixtures (for Save button to activate , i think ) and then fail showing :
"NoSuchElementException
Message: 'Element //div[contains(@class, "dhx_acc_item") or @class="topbar"]/*[contains(@class, "dhx_acc_item_label") or contains(@data-remote, "true")]//span[normalize-space(.)="Service Catalogs"] not found on page.' "

These tests pass randomly .
I guess we need not wait for Save button on Configuration page if role is already enabled .
So i have added
if :
roles already match , return
else :
fill(server_roles, roles, action=form_buttons.save)

After adding this tests moved quickly and passed more often.
Not sure what impact it can have on other tests.