Further template refactoring

This commit is contained in:
2021-01-29 18:24:37 +00:00
parent 1eed448828
commit 5d07a1853d
10 changed files with 149 additions and 126 deletions

View File

@@ -32,7 +32,7 @@ class BaseTest(LiveServerTestCase):
def setUp(self):
super().setUpClass()
self.driver = create_browser()
self.wait = WebDriverWait(self.driver, 5)
self.wait = WebDriverWait(self.driver, 15)
def tearDown(self):
super().tearDown()
@@ -76,6 +76,3 @@ def screenshot_failure_cls(cls):
def assert_times_equal(first_time, second_time):
assert first_time.replace(microsecond=0) == second_time.replace(microsecond=0)
def response_contains(response, needle):
return str(needle) in str(response.content)

View File

@@ -8,7 +8,6 @@ from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.select import Select
def parse_bool_from_string(string):
# Used to convert from attribute strings to boolean values, written after I found this:
# >>> bool("false")
@@ -75,8 +74,7 @@ class BootstrapSelectElement(Region):
self.open()
search_box.clear()
search_box.send_keys(query)
status_text = self.find_element(*self._status_locator)
self.wait.until(expected_conditions.invisibility_of_element_located(self._status_locator))
self.wait.until(expected_conditions.invisibility_of_element_located(*self._status_locator))
@property
def options(self):