WebUI tests: Change navigation tests to find menu items using data-name instead of href

Since menu pseudo-links was replaced with real one, navigation tests must be changed to not use href
for searching items.

Ticket: https://pagure.io/freeipa/issue/7137

Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Serhii Tsymbaliuk 2020-05-11 10:59:20 +02:00
parent b25bccc59a
commit d452e45ff0
No known key found for this signature in database
GPG Key ID: 632C7F5C1BC85519

View File

@ -516,7 +516,7 @@ class UI_driver:
parent = parts[0:-1]
self.navigate_by_menu('/'.join(parent), complete)
s = ".navbar a[href='#%s']" % item
s = ".navbar li[data-name='%s'] a" % item
link = self.find(s, By.CSS_SELECTOR, strict=True)
assert link.is_displayed(), 'Navigation link is not displayed: %s' % item
link.click()