e2e: use class name and timestamp for screenshots

This commit is contained in:
Jens Langhammer 2020-06-21 19:22:30 +02:00
parent fd0f0c65e9
commit f69e20886b
2 changed files with 1 additions and 2 deletions

View File

@ -299,7 +299,6 @@ class TestEnroll2Step(SeleniumTestCase):
self.driver.find_element(By.CSS_SELECTOR, ".pf-c-button").click() self.driver.find_element(By.CSS_SELECTOR, ".pf-c-button").click()
self.driver.find_element(By.LINK_TEXT, "foo").click() self.driver.find_element(By.LINK_TEXT, "foo").click()
self.wait.until(ec.presence_of_element_located((By.ID, "id_username")))
self.assertEqual( self.assertEqual(
self.driver.find_element(By.XPATH, "//a[contains(@href, '/-/user/')]").text, self.driver.find_element(By.XPATH, "//a[contains(@href, '/-/user/')]").text,
"foo", "foo",

View File

@ -56,7 +56,7 @@ class SeleniumTestCase(StaticLiveServerTestCase):
) )
def tearDown(self): def tearDown(self):
self.driver.save_screenshot(f"out/{time()}.png") self.driver.save_screenshot(f"out/{self.__class__.__name__}_{time()}.png")
self.driver.quit() self.driver.quit()
super().tearDown() super().tearDown()