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);