Showing 5 of 36 total issues
Method w3c_selenium_browserstack_caps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def w3c_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
caps = CapybaraHelpers.required_w3c_cloud_caps
bstack_options = {
sessionName: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
projectName: Howitzer.cloud_bstack_project,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method w3c_selenium_browserstack_caps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def w3c_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
caps = CapybaraHelpers.required_w3c_cloud_caps
caps[:platformName] = Howitzer.cloud_platform unless Howitzer.cloud_platform.casecmp?('any')
tb_options = {
name: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method w3c_selenium_browserstack_caps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def w3c_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
caps = CapybaraHelpers.required_w3c_cloud_caps
caps['platform'] = Howitzer.cloud_platform unless Howitzer.cloud_platform.casecmp?('any')
sauce_options = {
name: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method validate_by_element_presence
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validate_by_element_presence(element_name, *args, **options)
validations[:element_presence] =
lambda do |web_page, sync|
if element_name.present? && !private_method_defined?("#{element_name}_element")
raise(Howitzer::UndefinedElementError, ':element_presence validation refers to ' \
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method classic_selenium_browserstack_caps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def classic_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
caps = CapybaraHelpers.required_cloud_caps.merge(
project: Howitzer.cloud_bstack_project,
build: Howitzer.cloud_bstack_build
)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"