Class: Booth::Testing::Support::SoftResetSession
- Inherits:
-
Object
- Object
- Booth::Testing::Support::SoftResetSession
- Includes:
- Logging, Calls, Capybara::DSL
- Defined in:
- lib/booth/testing/support/soft_reset_session.rb
Overview
Essentially resets the session cookie, but without removing Chrome’s Virtual Authenticator Enviroment. Like a force logout.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/booth/testing/support/soft_reset_session.rb', line 13 def call ::::Lockstep.synchronize keys = page.get_rack_session.keys keys_with_nil_values = keys.index_with { nil } page.set_rack_session(**keys_with_nil_values) end |