From f22f9f07a3d55be56299029921422ed95a2df0c7 Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Fri, 16 Oct 2026 19:12:15 -0400 Subject: [PATCH] test(e2e): allow the register probe's 403 now that sign-up is closed matrix.lotusguild.org turned off open registration (2026-10-16; accounts come from SSO/LLDAP), so the login page's registration probe (POST /_matrix/client/v3/register) now answers 403 "Registration has been disabled" instead of 401 + UIA flows. The boot smoke test treated that console line as unexpected and failed on every branch (seen on #360). collectConsole now skips a 403 only when its source URL is the register endpoint; any other 403 still fails the test. Verified: boot.spec passes locally in chromium, webkit and iphone. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5 --- e2e/helpers.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/e2e/helpers.ts b/e2e/helpers.ts index e3d251c69..006d20acb 100644 --- a/e2e/helpers.ts +++ b/e2e/helpers.ts @@ -42,7 +42,18 @@ export function collectConsole(page: Page): ConsoleCollector { const errors: string[] = []; const pageErrors: string[] = []; page.on('console', (msg) => { - if (msg.type() === 'error') errors.push(msg.text()); + if (msg.type() !== 'error') return; + // The login page's registration probe (POST /_matrix/client/v3/register) + // answers 403 "Registration has been disabled" on a homeserver with sign-up + // closed (matrix.lotusguild.org since 2026-10-16: accounts come from SSO). + // Allowed only for that URL so any other 403 still fails the test. + if ( + /status of 403/.test(msg.text()) && + /\/_matrix\/client\/v3\/register/.test(msg.location().url) + ) { + return; + } + errors.push(msg.text()); }); page.on('pageerror', (err) => { pageErrors.push(err.message);