From ff535e677d6591dd1fdf7856506d59922a8891c1 Mon Sep 17 00:00:00 2001 From: Taka Date: Mon, 6 Aug 2018 09:00:39 +0000 Subject: [PATCH] Added a work-around for an intermittent timing problem in a test. --- vasl_templates/webapp/tests/test_snippets.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vasl_templates/webapp/tests/test_snippets.py b/vasl_templates/webapp/tests/test_snippets.py index 9b1779b..ecd66d6 100644 --- a/vasl_templates/webapp/tests/test_snippets.py +++ b/vasl_templates/webapp/tests/test_snippets.py @@ -4,7 +4,7 @@ from selenium.webdriver.common.keys import Keys from vasl_templates.webapp.tests.utils import set_template_params, get_clipboard from vasl_templates.webapp.tests.utils import get_stored_msg, dismiss_notifications, find_child -from vasl_templates.webapp.tests.utils import for_each_template +from vasl_templates.webapp.tests.utils import for_each_template, wait_for # --------------------------------------------------------------------- @@ -173,5 +173,7 @@ def test_edit_templates( webapp, webdriver ): dismiss_notifications() elem = find_child( "input.generate[data-id='{}']".format( orig_template_id ) ) elem.click() - assert get_clipboard() == "EDITED TEMPLATE: {}".format( orig_template_id ) + wait_for( 2, # FUDGE! Work-around a weird timing problem on Linux :shrug: + lambda: get_clipboard() == "EDITED TEMPLATE: {}".format( orig_template_id ) + ) for_each_template( test_template )