Skip to content

Commit

Permalink
Try to resolve windows ci failures due to js undefined function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed May 18, 2024
1 parent bfc8278 commit befdeb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lute/templates/book/tablelisting.html
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,6 @@
function clear_datatable_state() {
book_listing_table.state.clear();
}

window.clear_datatable_state = clear_datatable_state;
</script>
3 changes: 3 additions & 0 deletions tests/acceptance/lute_test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import requests
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait


class LuteTestClient: # pylint: disable=too-many-public-methods
Expand Down Expand Up @@ -71,6 +72,8 @@ def index(self):

def clear_book_filter(self):
"Clear all state. Normally state is saved."
s = "return typeof clear_datatable_state === 'function';"
WebDriverWait(self.browser, 10).until(lambda driver: driver.execute_script(s))
self.browser.execute_script("clear_datatable_state()")
time.sleep(0.1)

Expand Down

0 comments on commit befdeb8

Please sign in to comment.