mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
ttrss: tests: functional: Fix to wait properly
- When subscribe button is clicked in subscribe dialog, the dialog does not close immediately. Wait until it closes or error appears. - When a feed is added, the feed list refreshes and during that time, it is not possible to click on the feed expand button. Wait until it can be clicked. Extend the eventually() method to wait on exceptions and not just false values. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
f768840165
commit
ae73b296de
2 files changed
+16
-4
No files matched your search
@@ -64,8 +64,11 @@ def eventually(function, args=[], timeout=30):
|
||||
end_time = time.time() + timeout
|
||||
current_time = time.time()
|
||||
while current_time < end_time:
|
||||
if function(*args):
|
||||
return True
|
||||
try:
|
||||
if function(*args):
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
time.sleep(0.1)
|
||||
current_time = time.time()
|
||||
|
||||
Reference in new issue
Block a user