From 00fdedbbc102028db74d0597f50b0aab552a6ada Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 28 Oct 2026 03:31:20 +0100 Subject: [PATCH] test: keep the org specs' admin sign-in across runs --- integration/tests/helpers/org.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration/tests/helpers/org.ts b/integration/tests/helpers/org.ts index 3c14996fe..bd6d17631 100644 --- a/integration/tests/helpers/org.ts +++ b/integration/tests/helpers/org.ts @@ -12,6 +12,7 @@ */ import { type Browser, type BrowserContext, type Page, expect } from '@playwright/test'; import { existsSync, mkdirSync } from 'node:fs'; +import { tmpdir } from 'node:os'; import path from 'node:path'; import { WEBMAIL_URL } from './config'; import { accountSwitcher, neutralizeDevOverlay } from './app'; @@ -44,7 +45,9 @@ export function contextOptions(phone = false) { }; } -const stateDir = path.join(process.cwd(), 'integration', 'test-results'); +// Not under integration/test-results: Playwright empties that folder on +// every run, which would cost an admin login per run. +const stateDir = path.join(tmpdir(), 'bulwark-org-it'); const adminStatePath = () => path.join(stateDir, `org-admin-${new URL(WEBMAIL_URL).port || '80'}.json`); /**