Fixed Style/SpaceInsideParens RuboCop offense
Bug: 117989 Change-Id: I3418ad3b0265903171e3ee7603eeea22569387b4
This commit is contained in:
@@ -40,11 +40,3 @@ Style/HashSyntax:
|
|||||||
# Configuration parameters: EnforcedStyleForEmptyBraces, SupportedStyles.
|
# Configuration parameters: EnforcedStyleForEmptyBraces, SupportedStyles.
|
||||||
Style/SpaceInsideHashLiteralBraces:
|
Style/SpaceInsideHashLiteralBraces:
|
||||||
EnforcedStyle: no_space
|
EnforcedStyle: no_space
|
||||||
|
|
||||||
# Offense count: 10
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/SpaceInsideParens:
|
|
||||||
Exclude:
|
|
||||||
- 'tests/browser/features/step_definitions/ime_steps.rb'
|
|
||||||
- 'tests/browser/features/support/pages/ime_page.rb'
|
|
||||||
- 'tests/browser/features/support/pages/panel_page.rb'
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Given(/^I am on a wiki in Kotava language$/) do
|
Given(/^I am on a wiki in Kotava language$/) do
|
||||||
step 'I am at the main page'
|
step 'I am at the main page'
|
||||||
# Fake a Kotava Wiki
|
# Fake a Kotava Wiki
|
||||||
browser.execute_script( "mw.config.set( 'wgContentLanguage', 'avk' )" )
|
browser.execute_script("mw.config.set( 'wgContentLanguage', 'avk' )")
|
||||||
end
|
end
|
||||||
|
|
||||||
When(/^I click on an input box$/) do
|
When(/^I click on an input box$/) do
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ class IMEPage
|
|||||||
text_field(:search_input, id: 'searchInput')
|
text_field(:search_input, id: 'searchInput')
|
||||||
|
|
||||||
def ime_input_method_menu_onscreen?
|
def ime_input_method_menu_onscreen?
|
||||||
browser.execute_script( "
|
browser.execute_script("
|
||||||
var $selectorMenu = $( '.imeselector-menu' ),
|
var $selectorMenu = $( '.imeselector-menu' ),
|
||||||
menuLeft = $selectorMenu.offset().left,
|
menuLeft = $selectorMenu.offset().left,
|
||||||
menuRight = menuLeft + $selectorMenu.width();
|
menuRight = menuLeft + $selectorMenu.width();
|
||||||
|
|
||||||
return ( menuLeft >= 0 && menuRight <= $( window ).width() );" )
|
return ( menuLeft >= 0 && menuRight <= $( window ).width() );")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -59,22 +59,22 @@ class PanelPage
|
|||||||
end
|
end
|
||||||
|
|
||||||
def uls_onscreen?
|
def uls_onscreen?
|
||||||
browser.execute_script( "
|
browser.execute_script("
|
||||||
var $menu = $( '.uls-menu' ),
|
var $menu = $( '.uls-menu' ),
|
||||||
$window = $( window ),
|
$window = $( window ),
|
||||||
top = $menu.offset().top,
|
top = $menu.offset().top,
|
||||||
viewportTop = $window.scrollTop(),
|
viewportTop = $window.scrollTop(),
|
||||||
viewportBottom = $window.scrollTop() + $window.height();
|
viewportBottom = $window.scrollTop() + $window.height();
|
||||||
|
|
||||||
return ( top < viewportBottom && top >= viewportTop )" )
|
return ( top < viewportBottom && top >= viewportTop )")
|
||||||
end
|
end
|
||||||
|
|
||||||
def webfonts_library_loaded
|
def webfonts_library_loaded
|
||||||
browser.execute_script( "return ( $( 'body' ).data( 'webfonts' ) !== undefined )" )
|
browser.execute_script("return ( $( 'body' ).data( 'webfonts' ) !== undefined )")
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def font(selector)
|
def font(selector)
|
||||||
browser.execute_script( "return $( '#{selector}' ).css( 'font-family' );" )
|
browser.execute_script("return $( '#{selector}' ).css( 'font-family' );")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user