not getting the same precise error message, but perhaps the intent is the same?; anyway, updated views & some FTs, base.html for more dynamic error handling (tho incomplete)
This commit is contained in:
@@ -18,6 +18,16 @@ class FunctionalTest(StaticLiveServerTestCase):
|
||||
def tearDown(self):
|
||||
self.browser.quit()
|
||||
|
||||
def wait_for(self, fn):
|
||||
start_time = time.time()
|
||||
while True:
|
||||
try:
|
||||
return fn()
|
||||
except (AssertionError, WebDriverException):
|
||||
if time.time() - start_time > MAX_WAIT:
|
||||
raise
|
||||
time.sleep(0.5)
|
||||
|
||||
def wait_for_row_in_list_table(self, row_text):
|
||||
start_time = time.time()
|
||||
while True:
|
||||
@@ -30,13 +40,3 @@ class FunctionalTest(StaticLiveServerTestCase):
|
||||
if time.time() - start_time > MAX_WAIT:
|
||||
raise
|
||||
time.sleep(0.5)
|
||||
|
||||
def wait_for(self, fn):
|
||||
start_time = time.time()
|
||||
while True:
|
||||
try:
|
||||
return fn()
|
||||
except (AssertionError, WebDriverException):
|
||||
if time.time() - start_time > MAX_WAIT:
|
||||
raise
|
||||
time.sleep(0.5)
|
||||
@@ -31,5 +31,3 @@ class ItemValidationTest(FunctionalTest):
|
||||
self.browser.find_element(By.ID, 'id-new-item').send_keys("Make tea")
|
||||
self.browser.find_element(By.ID, "id-new-item").send_keys(Keys.ENTER)
|
||||
self.wait_for_row_in_list_table("2. Make tea")
|
||||
|
||||
self.fail("finish the fight!")
|
||||
|
||||
Reference in New Issue
Block a user