From 4d882dd4adba8338164e615b77004ac19cb5f5bd Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Thu, 21 Dec 2023 17:23:21 +0100 Subject: [PATCH] add sleeps to all send_input --- tests/test_widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_widgets.py b/tests/test_widgets.py index 198479a..56eb2b4 100644 --- a/tests/test_widgets.py +++ b/tests/test_widgets.py @@ -173,7 +173,7 @@ def test_widget_answer(self, selenium_driver): "test-answers", ) ) - # The text input needs a bit more time till it updates its value + # wait till everything is sync with python kernel time.sleep(0.1) create_file_button.click() @@ -276,6 +276,8 @@ def test_widget_answer(self, selenium_driver): # tests save button input_answer = "answer text" text_input.send_keys(input_answer) + # wait till everything is sync with python kernel + time.sleep(0.1) # wait for uncued box nb_cell.find_element(By.CLASS_NAME, cue_box_class_name("save", True)) # check if there are two buttons are uncued @@ -304,6 +306,8 @@ def test_widget_answer(self, selenium_driver): # tests load button text_input.send_keys(" update") + # wait till everything is sync with python kernel + time.sleep(0.1) # wait for cued box reset_cue_buttons = nb_cell.find_elements( By.CLASS_NAME, reset_cue_button_class_name("save", True)