mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-21 12:56:21 +02:00
🧑💻 Use mailpit as dev/test smtp server (#1486)
This commit is contained in:
parent
b00b685bbd
commit
285860ec9e
12 changed files with 124 additions and 242 deletions
|
@ -1,20 +1,15 @@
|
|||
import type { Page } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import type { MailServer } from "smtp-tester";
|
||||
import smtpTester from "smtp-tester";
|
||||
import { NewPollPage } from "tests/new-poll-page";
|
||||
|
||||
import { deleteAllMessages } from "./mailpit/mailpit";
|
||||
|
||||
test.describe.serial(() => {
|
||||
let page: Page;
|
||||
|
||||
let mailServer: MailServer;
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
page = await browser.newPage();
|
||||
mailServer = smtpTester.init(4025);
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
mailServer.stop(() => {});
|
||||
await deleteAllMessages(); // Clean the mailbox before tests
|
||||
});
|
||||
|
||||
test("create a new poll", async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue