class Selenium::WebDriver::Support::Guards::Guard
def except?
def except? @type == :except end
def exclude?
Bug is present on all configurations specified, but test can not be run because it breaks other tests,
def exclude? @type == :exclude || @type == :flaky end
def exclusive?
def exclusive? @type == :exclusive end
def initialize(guarded, type, guards = nil)
def initialize(guarded, type, guards = nil) @guarded = guarded @tracker = guards&.bug_tracker || '' @messages = guards&.messages || {} @messages[:unknown] = 'TODO: Investigate why this is failing and file a bug report' @type = type @reason = @guarded[:reason] || 'No reason given' @guarded[:reason] = @reason end
def message
def message details = case reason when Integer "Bug Filed: #{tracker}/#{reason}" when Symbol messages[reason] else "Guarded by #{guarded};" end case type when :exclude "Test skipped because it breaks test run; #{details}" when :flaky "Test skipped because it is unreliable in this configuration; #{details}" when :exclusive "Test does not apply to this configuration; #{details}" else "Test guarded; #{details}" end end
def only?
def only? @type == :only end