Skip to content

Commit

Permalink
Merge branch 'github-ci' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Jan 4, 2025
2 parents 49c1980 + 7f60e8c commit 8c6f245
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions tests/acceptance/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,11 @@ def given_demo_langs_loaded(luteclient):
def given_demo_stories_loaded(luteclient):
"Load the demo stories."
luteclient.load_demo_stories()
_sleep(1) # Hack!
luteclient.visit("/")
_sleep(1) # Hack!
luteclient.clear_book_filter()
_sleep(0.5) # Hack!


@given("I clear the book filter")
Expand Down
18 changes: 12 additions & 6 deletions tests/acceptance/lute_test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,16 @@ def _fill_bulk_term_edit_form(self, b, updates):

def make_term(self, lang, updates):
"Create a new term."
self.visit("/")
self.browser.find_by_css("#menu_terms").mouse_over()
self.browser.find_by_id("term_index").first.click()
self.browser.find_by_css("#term_actions").mouse_over()
self.click_link("Create new")
# Sometimes this failed during the unsupported_parser.feature, not sure why.
# Likely something silly, don't care, so will bypass the screen controls.
# I am sure this will bite me later.
# TODO fix_nav: figure out why occasionally got ElementNotInteractableException
# self.visit("/")
# self.browser.find_by_css("#menu_terms").mouse_over()
# self.browser.find_by_id("term_index").first.click()
# self.browser.find_by_css("#term_actions").mouse_over()
# self.click_link("Create new")
self.visit("/term/new")
assert "New Term" in self.browser.html

updates["language_id"] = self.language_ids[lang]
Expand Down Expand Up @@ -406,6 +411,7 @@ def _refresh_browser(self):
"""
# self.browser.reload()
# ??? ChatGPT suggested:
time.sleep(0.5) # Hack for ci.
self.browser.execute_script(
"""
// Trigger re-render of the entire body
Expand All @@ -418,7 +424,7 @@ def _refresh_browser(self):
window.prepareTextInteractions();
"""
)
time.sleep(0.2) # Hack, test failing.
time.sleep(0.5) # Hack for ci.

def fill_reading_bulk_edit_form(self, updates=None):
"""
Expand Down

0 comments on commit 8c6f245

Please sign in to comment.