tests: replace mailhog with mailpit (#5460)

replace mailhog with mailpit

closes #5373

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-05-03 17:18:03 +03:00 committed by GitHub
parent b1508b9d01
commit 9b879989fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -2,13 +2,13 @@ version: '3.7'
services: services:
chrome: chrome:
image: selenium/standalone-chrome:110.0 image: docker.io/selenium/standalone-chrome:110.0
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
network_mode: host network_mode: host
restart: always restart: always
mailhog: mailpit:
image: mailhog/mailhog:v1.0.1 image: docker.io/axllent/mailpit:v1.6.5
ports: ports:
- 1025:1025 - 1025:1025
- 8025:8025 - 8025:8025

View File

@ -78,13 +78,13 @@ class TestFlowsEnroll(SeleniumTestCase):
# Wait for the success message so we know the email is sent # Wait for the success message so we know the email is sent
wait.until(ec.presence_of_element_located((By.CSS_SELECTOR, ".pf-c-form p"))) wait.until(ec.presence_of_element_located((By.CSS_SELECTOR, ".pf-c-form p")))
# Open Mailhog # Open Mailpit
self.driver.get("http://localhost:8025") self.driver.get("http://localhost:8025")
# Click on first message # Click on first message
self.wait.until(ec.presence_of_element_located((By.CLASS_NAME, "msglist-message"))) self.wait.until(ec.presence_of_element_located((By.CLASS_NAME, "message")))
self.driver.find_element(By.CLASS_NAME, "msglist-message").click() self.driver.find_element(By.CLASS_NAME, "message").click()
self.driver.switch_to.frame(self.driver.find_element(By.CLASS_NAME, "tab-pane")) self.driver.switch_to.frame(self.driver.find_element(By.ID, "preview-html"))
self.driver.find_element(By.ID, "confirm").click() self.driver.find_element(By.ID, "confirm").click()
self.driver.close() self.driver.close()
self.driver.switch_to.window(self.driver.window_handles[0]) self.driver.switch_to.window(self.driver.window_handles[0])

View File

@ -71,13 +71,13 @@ class TestFlowsRecovery(SeleniumTestCase):
# Wait for the success message so we know the email is sent # Wait for the success message so we know the email is sent
wait.until(ec.presence_of_element_located((By.CSS_SELECTOR, ".pf-c-form p"))) wait.until(ec.presence_of_element_located((By.CSS_SELECTOR, ".pf-c-form p")))
# Open Mailhog # Open mailpit
self.driver.get("http://localhost:8025") self.driver.get("http://localhost:8025")
# Click on first message # Click on first message
self.wait.until(ec.presence_of_element_located((By.CLASS_NAME, "msglist-message"))) self.wait.until(ec.presence_of_element_located((By.CLASS_NAME, "message")))
self.driver.find_element(By.CLASS_NAME, "msglist-message").click() self.driver.find_element(By.CLASS_NAME, "message").click()
self.driver.switch_to.frame(self.driver.find_element(By.CLASS_NAME, "tab-pane")) self.driver.switch_to.frame(self.driver.find_element(By.ID, "preview-html"))
self.driver.find_element(By.ID, "confirm").click() self.driver.find_element(By.ID, "confirm").click()
self.driver.close() self.driver.close()
self.driver.switch_to.window(self.driver.window_handles[0]) self.driver.switch_to.window(self.driver.window_handles[0])