mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-23 21:04:36 -05:00
test: start mailhog before running playwright (#55533)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f2e78151b8
commit
bb7968f8d7
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user