diff --git a/e2e/report-user.spec.ts b/e2e/report-user.spec.ts index a3aa3b2ce1b..4aeacff4498 100644 --- a/e2e/report-user.spec.ts +++ b/e2e/report-user.spec.ts @@ -7,9 +7,6 @@ import { } from './utils/mailhog'; test.use({ storageState: 'playwright/.auth/certified-user.json' }); -// To run this test you will need to run the email server. -// To do this: https://contribute.freecodecamp.org/#/how-to-catch-outgoing-emails-locally?id=using-mailhog - test.beforeEach(async () => { await deleteAllEmails(); }); diff --git a/playwright.config.ts b/playwright.config.ts index 04600d4101b..8adc5cc9130 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -85,12 +85,13 @@ export default defineConfig({ // name: 'Google Chrome', // use: { ...devices['Desktop Chrome'], channel: 'chrome' } // } - ] + ], - /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run start', - // url: 'http://127.0.0.1:3000', - // reuseExistingServer: !process.env.CI, - // }, + /* Some tests make the api send emails, so we need mailhog to catch them */ + webServer: { + command: 'docker run -d -p 1025:1025 -p 8025:8025 mailhog/mailhog', + port: 1025, + reuseExistingServer: true, + timeout: 180000 + } });