Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 0ec8781

Browse files
committed
Merge branches 'master' and 'master' of github.com:RunestoneInteractive/RunestoneComponents
2 parents 9a5e887 + 1a01989 commit 0ec8781

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

runestone/timed/test/test_timed.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ def _test_1(selenium_utils_mq, timed_divid):
133133
selenium_utils_mq.driver.find_element_by_id(f"{div_id}_solution").send_keys("ROYGBIV circle area")
134134

135135
finish(selenium_utils_mq)
136-
results = selenium_utils_mq.driver.find_element_by_id(f"{timed_divid}results")
137-
assert "Num Correct: 6" in results.text
136+
div_id = f"{timed_divid}results"
137+
# Wait for the initial text to appear.
138+
selenium_utils_mq.wait.until(
139+
EC.text_to_be_present_in_element((By.ID, div_id), "Num Correct: 6")
140+
)
141+
# We can check the rest of the text without waiting, since it's all assigned at the same time.
142+
results = selenium_utils_mq.driver.find_element_by_id(div_id)
138143
assert "Num Wrong: 0" in results.text
139144
assert "Num Skipped: 1" in results.text

0 commit comments

Comments
 (0)