Class: Booth::Testing::Support::ClearCookies

Inherits:
Object
  • Object
show all
Includes:
Logging, Calls, Capybara::DSL
Defined in:
lib/booth/testing/support/clear_cookies.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

#callObject



13
14
15
16
17
18
19
# File 'lib/booth/testing/support/clear_cookies.rb', line 13

def call
  log { 'Soft-resetting session via Playwright cookie API...' }

  page.driver.with_playwright_page do |playwright_page|
    playwright_page.context.clear_cookies
  end
end