diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e4942937a..7009286e6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,15 +1,15 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2015-12-09 16:08:32 +0100 using RuboCop version 0.35.1. +# on 2015-12-09 17:16:31 +0100 using RuboCop version 0.35.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 26 +# Offense count: 76 # Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: - Max: 252 + Max: 254 # Offense count: 3 # Configuration parameters: AllowedVariables. @@ -22,8 +22,3 @@ Style/GlobalVars: # Configuration parameters: EnforcedStyle, SupportedStyles. Style/StringLiterals: Enabled: false - -# Offense count: 3 -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/VariableName: - Enabled: false diff --git a/tests/browser/features/step_definitions/mmv_navigation_steps.rb b/tests/browser/features/step_definitions/mmv_navigation_steps.rb index c18c6053f..e624027fb 100644 --- a/tests/browser/features/step_definitions/mmv_navigation_steps.rb +++ b/tests/browser/features/step_definitions/mmv_navigation_steps.rb @@ -31,8 +31,8 @@ end Then /^the wiki article should be scrolled to the same position as before opening MMV$/ do on(E2ETestPage) do |page| - @scrollDifference = page.execute_script("return $(window).scrollTop();") - @articleScrollTop - expect(@scrollDifference.abs).to be < 2 + scroll_difference = page.execute_script("return $(window).scrollTop();") - @article_scroll_top + expect(scroll_difference.abs).to be < 2 end end diff --git a/tests/browser/features/step_definitions/mmv_steps.rb b/tests/browser/features/step_definitions/mmv_steps.rb index ba8bc3598..559b529bc 100644 --- a/tests/browser/features/step_definitions/mmv_steps.rb +++ b/tests/browser/features/step_definitions/mmv_steps.rb @@ -15,7 +15,7 @@ When /^I click on the first image in the article$/ do on(E2ETestPage) do |page| # We store the offset of the image as the scroll position and scroll to it, because cucumber/selenium # sometimes automatically scrolls to it when we ask it to click on it (seems to depend on timing) - @articleScrollTop = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;") + @article_scroll_top = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;") # Scrolls to the image and clicks on it page.image1_in_article # This is a global variable that can be used to measure performance @@ -27,7 +27,7 @@ When /^I click on the second image in the article$/ do on(E2ETestPage) do |page| # We store the offset of the image as the scroll position and scroll to it, because cucumber/selenium # sometimes automatically scrolls to it when we ask it to click on it (seems to depend on timing) - @articleScrollTop = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;") + @article_scroll_top = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;") # Scrolls to the image and clicks on it page.image2_in_article # This is a global variable that can be used to measure performance