Reference site: a test fixture for development hosts (E2E_DEVELOPMENT_HOSTS), for the built-site run of the launch cases
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
bc3aac249f
commit
463b966365
@@ -8,3 +8,10 @@ export const E2E_MAIL_RELAY_URL = process.env.E2E_MAIL_RELAY_URL || undefined
|
||||
|
||||
/** `iapl({ mail })` for the test, `undefined` (the plugin's defaults) otherwise. */
|
||||
export const e2eMail = E2E_MAIL_RELAY_URL ? { relay: { retryBackoffMs: 50, url: E2E_MAIL_RELAY_URL } } : undefined
|
||||
|
||||
/**
|
||||
* `iapl({ developmentHosts })` for a test that plays a development address on this machine (the built-in
|
||||
* pattern, `*.dev.netscale.pl`, cannot be served from localhost): E2E_DEVELOPMENT_HOSTS, comma-separated
|
||||
* patterns. `undefined` (the plugin's built-in list) otherwise.
|
||||
*/
|
||||
export const e2eDevelopmentHosts = process.env.E2E_DEVELOPMENT_HOSTS ? process.env.E2E_DEVELOPMENT_HOSTS.split(',').map((p) => p.trim()).filter(Boolean) : undefined
|
||||
|
||||
@@ -20,7 +20,7 @@ import { Posts } from './collections/Posts'
|
||||
// @starter:endif
|
||||
// @starter:if demo
|
||||
import { E2E_LATE_STAFF, E2E_STAFF_SLUGS, e2eEarlyStaff, e2eLateStaff } from '../e2e/late-staff-fixture'
|
||||
import { e2eMail } from '../e2e/mail-relay-fixture'
|
||||
import { e2eDevelopmentHosts, e2eMail } from '../e2e/mail-relay-fixture'
|
||||
// @starter:endif
|
||||
import { contentConfig } from './content.config'
|
||||
import { db } from './db'
|
||||
@@ -68,6 +68,8 @@ export default buildConfig({
|
||||
// @starter:if demo
|
||||
// a test fixture: `undefined` (the plugin's defaults) without E2E_MAIL_RELAY_URL (e2e/mail-relay-fixture.ts)
|
||||
mail: e2eMail,
|
||||
// a test fixture: `undefined` (the built-in list) without E2E_DEVELOPMENT_HOSTS
|
||||
developmentHosts: e2eDevelopmentHosts,
|
||||
// (the staffCollections entry exists only for e2e/late-staff.spec.ts, with E2E_LATE_STAFF=1)
|
||||
access: { authCollection: 'users', ...(E2E_LATE_STAFF ? { staffCollections: E2E_STAFF_SLUGS } : {}) },
|
||||
// @starter:else
|
||||
|
||||
Reference in New Issue
Block a user