You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Mailpit for email verification and strengthen E2E email assertions
Infrastructure:
- Add Mailpit (axllent/mailpit:v1.29) to docker-compose.yml as an
actively maintained replacement for Mailhog
- Configure Spring dev profile to route all outgoing mail to Mailpit
(SMTP on port 1025, web UI on port 8025)
E2E email testing (client/e2e/mailpit.ts):
- Add Mailpit API helper with snapshot-based email verification that is
safe for parallel test execution (no mailbox clearing)
- Helpers: snapshotMailbox, waitForNewMessages, getSubject, getBody,
getToAddresses, getFromHeader, hasAttachment, assertSentFromApp
- Mailpit returns pre-decoded HTML/Text bodies, eliminating the need
for manual quoted-printable and base64 MIME decoding
Bug fix (ApplicationService.java):
- Pass the notifyUser flag through to ThesisService.createThesis()
when accepting an application. Previously hardcoded to false, which
meant the THESIS_CREATED email was never sent during acceptance even
when the advisor checked "Notify Student".
E2E workflow tests with email assertions:
- application-workflow: verify student confirmation email with topic
title, applicant email, and motivation text
- application-review-workflow: verify rejection email (topic title,
requirements reason) and acceptance emails (APPLICATION_ACCEPTED +
THESIS_CREATED with advisor mention and thesis link)
- proposal-feedback-workflow: verify proposal upload notification to
advisor (with conditional attachment check) and change request email
to student (both change requests listed, thesis link)
- presentation-workflow: serial test — student creates draft, then
supervisor accepts it and scheduled presentation email is verified
(greeting, thesis title, location, language, thesis link)
- thesis-workflow: verify THESIS_CREATED email to student (greeting,
thesis title, supervisor name, proposal next step)
- thesis-grading-workflow: verify no assessment email is sent to the
submitting supervisor (sender-exclusion logic), verify final grade
email to student (grade value, feedback text, supervisor name)
Server tests:
- Add ApplicationServiceTest cases verifying notifyUser is forwarded
to createThesis (eq(true) and eq(false) matchers instead of
anyBoolean)
- Fix ApplicationControllerTest integration tests to set up the
THESIS_CREATED email template for acceptance flows with
notifyUser=true
Documentation:
- Update DEVELOPMENT.md and MAILS.md to reference Mailpit
0 commit comments