e2e: save screenshots with timestamp instead of class name
This commit is contained in:
parent
887163c45c
commit
ed4daa64fe
|
@ -286,7 +286,7 @@ class TestEnroll2Step(SeleniumTestCase):
|
|||
self.driver.get(self.live_server_url)
|
||||
self.setup_test_enroll_2_step()
|
||||
self.wait.until(
|
||||
ec.presence_of_element_located(By.CSS_SELECTOR, "[role=enroll]")
|
||||
ec.presence_of_element_located((By.CSS_SELECTOR, "[role=enroll]"))
|
||||
)
|
||||
self.driver.find_element(By.CSS_SELECTOR, "[role=enroll]").click()
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ class TestProviderOIDC(SeleniumTestCase):
|
|||
self.driver.find_element(By.CSS_SELECTOR, "[type=submit]").click()
|
||||
|
||||
self.wait.until(
|
||||
ec.presence_of_element_located(By.XPATH, "//a[contains(@href, '/profile')]")
|
||||
ec.presence_of_element_located((By.XPATH, "//a[contains(@href, '/profile')]"))
|
||||
)
|
||||
self.driver.find_element(By.XPATH, "//a[contains(@href, '/profile')]").click()
|
||||
self.assertEqual(
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""passbook e2e testing utilities"""
|
||||
from time import time
|
||||
from functools import lru_cache
|
||||
from glob import glob
|
||||
from importlib.util import module_from_spec, spec_from_file_location
|
||||
|
@ -55,7 +56,7 @@ class SeleniumTestCase(StaticLiveServerTestCase):
|
|||
)
|
||||
|
||||
def tearDown(self):
|
||||
self.driver.save_screenshot(f"out/{self.__class__.__name__}.png")
|
||||
self.driver.save_screenshot(f"out/{time()}.png")
|
||||
self.driver.quit()
|
||||
super().tearDown()
|
||||
|
||||
|
|
Reference in a new issue