Commit ade48aaf authored by Vadim Rutkovsky's avatar Vadim Rutkovsky

tests: fix searchbar lookup

parent 43a4b38f
...@@ -44,9 +44,10 @@ def view_is_opened(context, name): ...@@ -44,9 +44,10 @@ def view_is_opened(context, name):
def get_visible_searchbar(context): def get_visible_searchbar(context):
"""Wait for searchbar to become visible""" """Wait for searchbar to become visible"""
searchbars = x: == 'Search:' and x.showing) def get_searchbars():
assert wait_until(lambda x: len(x) > 0, searchbars), "No visible searchbars found" return x: == 'Search:' and x.showing)
return searchbars[0] assert wait_until(lambda x: len(x()) > 0, get_searchbars), "No visible searchbars found"
return get_searchbars()[0]
@step(u'Open "{section_name}" section') @step(u'Open "{section_name}" section')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment