Skip to content

Commit

Permalink
add sleeps to all send_input
Browse files Browse the repository at this point in the history
  • Loading branch information
agoscinski committed Dec 21, 2023
1 parent b90c238 commit 4d882dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4d882dd

Please sign in to comment.