0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/spec
Alan Guo Xiang Tan 7f9ed71635
PERF: Sign in to system tests in-process instead of navigating the browser
`SystemHelpers#sign_in` navigated Chrome to `/session/:username/become.json`
on every call, a full page load paid roughly 1,800 times per CI run (about
one per example, since most system specs sign in). This replaces that
navigation with an in-process `Rack::Test` GET to the same endpoint and
injects the returned session cookies into the Playwright browser context.

Every server-side effect of `SessionController#become` is preserved, since
the same request runs through the same controller and full middleware stack.
The change only moves the request out of the browser.

Two consequences of no longer navigating during sign-in are handled here.
The browser can still be on `about:blank` afterwards, so sign_in parks on
`/srv/status` (the cheapest app document) when that is the case, restoring
the prior contract that specs may run `execute_script` before their first
visit. And `Capybara::Session#reset!` only tears down the driver once the
session is marked touched, which the old navigation did implicitly, so
sign_in now sets it explicitly to keep `Capybara.reset_sessions!` working
for specs that sign in and then test anonymous access.
2026-06-15 07:20:03 +00:00
..
db FIX: Prevent backslash accumulation in upload markdown labels (#39461) 2026-06-03 18:10:38 +02:00
fabricators FEATURE: Add Search section to the redesigned admin dashboard (#40779) 2026-06-11 12:25:10 +08:00
fixtures DEV: Allow plugins to register admin-panel-specific CSS (#40345) 2026-05-28 11:03:38 +01:00
generator DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
helpers DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
import_export
initializers Revert "FEATURE: discourse-workflows (#39704)" (#40366) 2026-05-28 13:59:42 +01:00
integration FIX: Reject DiscourseConnect SSO payloads when secret is blank (#40830) 2026-06-12 15:17:16 +03:00
integrity DEV: Make upcoming change CSS classes opt-in (#40669) 2026-06-10 12:12:58 +10:00
jobs FIX: Resolve all of a deleted spammer's reviewables (#40780) 2026-06-15 13:34:15 +08:00
lib FIX: Reject DiscourseConnect SSO payloads when secret is blank (#40830) 2026-06-12 15:17:16 +03:00
mailers FIX: allow custom email sender name via translation overrides (#40674) 2026-06-09 14:03:03 +04:00
migrations FEATURE: Exclude small actions from topic counters and unread tracking (#40481) 2026-06-08 08:03:55 +02:00
models FIX: Reject DiscourseConnect SSO payloads when secret is blank (#40830) 2026-06-12 15:17:16 +03:00
multisite DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
queries/reports FEATURE: Activity by category section of the new dashboard's engagement section (#40227) 2026-05-22 13:10:38 +08:00
requests FIX: Resolve all of a deleted spammer's reviewables (#40780) 2026-06-15 13:34:15 +08:00
script DEV: Automatic upcoming change status report and PR creation (#40291) 2026-06-11 15:19:15 +10:00
serializers FEATURE: User API key device authorization flow (#40189) 2026-06-10 16:09:44 -04:00
services FIX: Resolve all of a deleted spammer's reviewables (#40780) 2026-06-15 13:34:15 +08:00
support PERF: Sign in to system tests in-process instead of navigating the browser 2026-06-15 07:20:03 +00:00
system PERF: Sign in to system tests in-process instead of navigating the browser 2026-06-15 07:20:03 +00:00
tasks DEV: better multisite suppport for migrate gifs (#40792) 2026-06-11 17:51:27 +04:00
views
rails_helper.rb DEV: Finish extracting rails spec helpers (#40552) 2026-06-04 14:11:14 +02:00
regenerate_swagger_docs
swagger_helper.rb