Skip to content

Commit

Permalink
fix selenium tests
Browse files Browse the repository at this point in the history
  • Loading branch information
delijati committed Nov 9, 2023
1 parent c89ec78 commit 630d6d3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions deformdemo/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def wait_to_click(selector):
# SO FUN!
time.sleep(0.2)
continue
if isinstance(e, ElementNotInteractableException):
time.sleep(0.2)
continue
raise


Expand Down Expand Up @@ -3597,8 +3600,12 @@ def test_submit_success(self):
findid("deformField4").send_keys("2010")
findid("deformField4-month").send_keys("1")
findid("deformField4-day").send_keys("1")
browser.switch_to.frame(browser.find_element(By.TAG_NAME, "iframe"))
findid("tinymce").send_keys("yo")
# enter iframe
browser.switch_to.frame("deformField5_ifr")
tinymce = findid("tinymce")
tinymce.click()
tinymce.send_keys("yo")
# leave iframe
browser.switch_to.default_content()
source = browser.page_source
wait_to_click("#deformsubmit")
Expand Down Expand Up @@ -3788,7 +3795,8 @@ def test_render_select_single_default(self):
self.assertTrue(options[1].get_attribute("readonly"), "readonly")
self.assertTrue(options[2].get_attribute("disabled"), "disabled")

select_object.select_by_index(0)
# XXX: You may not select a disabled option
self.assertRaises(NotImplementedError, select_object.select_by_index, 0)
self.assertTrue(options[1].is_selected())

def test_render_selectize_multi_default(self):
Expand Down

0 comments on commit 630d6d3

Please sign in to comment.