A platform for community discussion. Free, open, simple.
DEV: Use none persistent sessions in system tests (#41685)
Alan Guo Xiang Tan78feccc7b463
diff --git a/spec/support/system_helpers.rb b/spec/support/system_helpers.rbindex c2b20cfef4f..eff5b94c5e1 100644--- a/spec/support/system_helpers.rb+++ b/spec/support/system_helpers.rb@@ -64,6 +64,12 @@ module SystemHelpersenddef setup_system_test+ # `time:` freezes Ruby and the page's JavaScript clock, but not the browser's cookie-store+ # clock. Persistent cookies use an absolute expiry based on Ruby time, so historical examples+ # can create cookies the browser rejects as expired. The sign-in response still succeeds, but+ # subsequent requests are anonymous. Browser state is reset after each example, so system tests+ # only need session cookies.+ SiteSetting.persistent_sessions = falseSiteSetting.login_required = falseSiteSetting.has_login_hint = falseSiteSetting.global_notice = ""