aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2014-04-28 20:54:33 +0800
committerVadim Rutkovsky <vrutkovs@redhat.com>2014-04-29 00:47:00 +0800
commitade48aafc32c291fb80f46a67cc0fdcb7c523d5c (patch)
tree40c118ab2e7fded56854f94cb031336afd61ef53 /tests
parent43a4b38f4a543d1459caf3ddf1eacffad05dd5e6 (diff)
downloadgsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.tar
gsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.tar.gz
gsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.tar.bz2
gsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.tar.lz
gsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.tar.xz
gsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.tar.zst
gsoc2013-evolution-ade48aafc32c291fb80f46a67cc0fdcb7c523d5c.zip
tests: fix searchbar lookup
Diffstat (limited to 'tests')
-rw-r--r--tests/steps/steps.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/steps/steps.py b/tests/steps/steps.py
index 2b36709d8e..94ce1ee52b 100644
--- a/tests/steps/steps.py
+++ b/tests/steps/steps.py
@@ -44,9 +44,10 @@ def view_is_opened(context, name):
def get_visible_searchbar(context):
"""Wait for searchbar to become visible"""
- searchbars = context.app.findChildren(lambda x: x.labeller.name == 'Search:' and x.showing)
- assert wait_until(lambda x: len(x) > 0, searchbars), "No visible searchbars found"
- return searchbars[0]
+ def get_searchbars():
+ return context.app.findChildren(lambda x: x.labeller.name == 'Search:' and x.showing)
+ assert wait_until(lambda x: len(x()) > 0, get_searchbars), "No visible searchbars found"
+ return get_searchbars()[0]
@step(u'Open "{section_name}" section')