Class: E2E::Minitest::TestCase

Inherits:
Minitest::Test
  • Object
show all
Includes:
Assertions, DSL
Defined in:
lib/e2e/minitest.rb

Instance Method Summary collapse

Methods included from Assertions

#assert_current_path, #assert_selector, #assert_text, #refute_current_path, #refute_selector, #refute_text

Methods included from DSL

#click_button_and_wait_for_flash, #click_button_and_wait_for_path, #click_button_and_wait_for_text, #click_link_and_wait_for_flash, #click_link_and_wait_for_path, #click_link_and_wait_for_text, #page, #wait_for, #wait_for_current_path, #wait_for_flash, #wait_for_text

Instance Method Details

#before_setupObject



13
14
15
16
# File 'lib/e2e/minitest.rb', line 13

def before_setup
  E2E::ViteAssets.ensure_built!
  super
end

#teardownObject



18
19
20
21
22
23
24
# File 'lib/e2e/minitest.rb', line 18

def teardown
  take_failed_screenshot if !passed? && !skipped?

  # Reset session but keep browser open for speed
  E2E.session.reset! if E2E.instance_variable_get(:@session)
  super
end