R4-3: pnpm e2e:built (webpack and Turbopack); Playwright runs reset the test admins first
The command builds the reference site with both bundlers, checks the public files for a package manifest and runs the late-staff spec and the published-files check against each built site. A global setup resets the test admins and their stored 2FA attempt counts before every run, so a spec no longer depends on what ran before it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
9a648b0498
commit
e77c607bca
@@ -8,9 +8,10 @@ try {
|
||||
}
|
||||
|
||||
/**
|
||||
* Smoke tests against a built, seeded site: pnpm build && pnpm seed && pnpm payload run e2e/create-test-admin.ts.
|
||||
* Run create-test-admin.ts again before repeating the tests within ten minutes: the 2FA verify limit (5 attempts per
|
||||
* account in 10 minutes) is stored in the database, and that script clears the test admins' counts.
|
||||
* Smoke tests against a built, seeded site: pnpm seed && pnpm build.
|
||||
* The 2FA verify limit (5 attempts per account in 10 minutes) is stored in the database; the global setup resets the
|
||||
* test admins and clears their counts before every run (e2e/global-setup.ts; E2E_SKIP_ADMIN_SETUP=1 for a run that
|
||||
* needs an EMPTY database, the fresh-site spec).
|
||||
* E2E_BASE_URL picks the port (default 3100). Playwright starts its own server there and fails when the port is
|
||||
* taken, so another project's dev server is never tested by mistake; E2E_REUSE_SERVER=1 uses a server you started.
|
||||
*/
|
||||
@@ -18,6 +19,8 @@ const baseURL = process.env.E2E_BASE_URL ?? 'http://localhost:3100'
|
||||
|
||||
export default defineConfig({
|
||||
forbidOnly: !!process.env.CI,
|
||||
// makes every run independent of the one before: test admins reset, stored 2FA attempt counts cleared
|
||||
globalSetup: './e2e/global-setup.ts',
|
||||
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
||||
reporter: process.env.CI ? 'line' : 'list',
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
|
||||
Reference in New Issue
Block a user