Class: E2E::Config
- Inherits:
-
Object
- Object
- E2E::Config
- Defined in:
- lib/e2e.rb
Constant Summary collapse
- DEFAULT_FLASH_SELECTORS =
{ any: "[role='alert'], [role='status'], [data-flash], [data-testid*='flash'], .flash, .notice, .alert, .toast", notice: "[role='status'], [data-flash-type='notice'], [data-flash='notice'], .flash.notice, .flash-success, .notice", alert: "[role='alert'], [data-flash-type='alert'], [data-flash='alert'], .flash.alert, .flash-error, .alert" }.freeze
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#browser_type ⇒ Object
Returns the value of attribute browser_type.
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#flash_selectors ⇒ Object
Returns the value of attribute flash_selectors.
-
#headless ⇒ Object
Returns the value of attribute headless.
-
#wait_timeout ⇒ Object
Returns the value of attribute wait_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
66 67 68 69 70 71 72 73 |
# File 'lib/e2e.rb', line 66 def initialize @driver = :playwright @browser_type = :chromium @headless = ENV.fetch("HEADLESS", "true") == "true" @app = nil @wait_timeout = 5 @flash_selectors = DEFAULT_FLASH_SELECTORS.dup end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
64 65 66 |
# File 'lib/e2e.rb', line 64 def app @app end |
#browser_type ⇒ Object
Returns the value of attribute browser_type.
64 65 66 |
# File 'lib/e2e.rb', line 64 def browser_type @browser_type end |
#driver ⇒ Object
Returns the value of attribute driver.
64 65 66 |
# File 'lib/e2e.rb', line 64 def driver @driver end |
#flash_selectors ⇒ Object
Returns the value of attribute flash_selectors.
64 65 66 |
# File 'lib/e2e.rb', line 64 def flash_selectors @flash_selectors end |
#headless ⇒ Object
Returns the value of attribute headless.
64 65 66 |
# File 'lib/e2e.rb', line 64 def headless @headless end |
#wait_timeout ⇒ Object
Returns the value of attribute wait_timeout.
64 65 66 |
# File 'lib/e2e.rb', line 64 def wait_timeout @wait_timeout end |