Zfilipin has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/251534

Change subject: Fixed Style/IndentationWidth RuboCop offense
......................................................................

Fixed Style/IndentationWidth RuboCop offense

Bug: T117987
Change-Id: I6a4b34619499bd0102f8c97f91fb23bb9c4f00c1
---
M .rubocop_todo.yml
M tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb
M tests/browser/features/step_definitions/special_translate_steps.rb
M tests/browser/features/step_definitions/translation_stash_steps.rb
M tests/browser/features/support/hooks.rb
M tests/browser/features/support/pages/manage_translator_sandbox_page.rb
M tests/browser/features/support/pages/stash_page.rb
M tests/browser/features/support/pages/translate_page.rb
M tests/browser/features/support/pages/user_page.rb
9 files changed, 144 insertions(+), 150 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/34/251534/1

diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index e0075b9..e7f8c1d 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -22,12 +22,6 @@
   Exclude:
     - 
'extensions/UniversalLanguageSelector/tests/browser/features/step_definitions/accept_language_steps.rb'
 
-# Offense count: 200
-# Cop supports --auto-correct.
-# Configuration parameters: Width.
-Style/IndentationWidth:
-  Enabled: false
-
 # Offense count: 2
 # Cop supports --auto-correct.
 Style/LeadingCommentSpace:
diff --git 
a/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb 
b/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb
index 8f0624b..8bbe106 100644
--- a/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb
+++ b/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb
@@ -1,214 +1,214 @@
 Given(/^I am logged in as a translation administrator$/) do
-       step "I am logged in"
+        step "I am logged in"
 end
 
 Given(/^I am on the Translator sandbox management page with no users in the 
sandbox$/) do
-       visit(ManageTranslatorSandboxPage, using_params: {extra: 
"integrationtesting=empty"})
+        visit(ManageTranslatorSandboxPage, using_params: {extra: 
"integrationtesting=empty"})
 end
 
 Given(/^I am on the Translator sandbox management page with users in the 
sandbox$/) do
-       visit(ManageTranslatorSandboxPage, using_params: {extra: 
"integrationtesting=populate"})
+        visit(ManageTranslatorSandboxPage, using_params: {extra: 
"integrationtesting=populate"})
 end
 
 When(/^I search for "(.*)" in the sandboxed users search field$/) do |string|
-       on(ManageTranslatorSandboxPage) do |page|
-               page.search = string
-               page.search_element.send_keys :enter
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.search = string
+               page.search_element.send_keys :enter
+       end
 end
 
 When(/^I click the sandboxed users language filter button$/) do
-       on(ManageTranslatorSandboxPage).language_selector_button
+        on(ManageTranslatorSandboxPage).language_selector_button
 end
 
 When(/^I type "(.+)" in the language filter$/) do |text|
-       on(ManageTranslatorSandboxPage) do |page|
-               page.language_filter = text
-               page.language_filter_element.send_keys [:enter, "\n"]
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.language_filter = text
+               page.language_filter_element.send_keys [:enter, "\n"]
+       end
 end
 
 When(/^I click the button that clears language selection$/) do
-       on(ManageTranslatorSandboxPage).clear_language_selector_element.click
+        on(ManageTranslatorSandboxPage).clear_language_selector_element.click
 end
 
 When(/^I click the checkbox to select all users$/) do
-       on(ManageTranslatorSandboxPage).select_all_checkbox_element.click
+        on(ManageTranslatorSandboxPage).select_all_checkbox_element.click
 end
 
 When(/^I click the "(.+)" button$/) do |label|
-       on(ManageTranslatorSandboxPage).click_button(label)
+        on(ManageTranslatorSandboxPage).click_button(label)
 end
 
 When(/^I click on "(.+)" in the first column$/) do |username|
-       on(ManageTranslatorSandboxPage).request_with_username(username).click
+        on(ManageTranslatorSandboxPage).request_with_username(username).click
 end
 
 When(/^I click on the checkbox near "(.+)" in the first column$/) do |username|
-       
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(username).click
+        
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(username).click
 end
 
 When(/^I click on the link that says "\d+ older requests?" at the bottom of 
the first column$/) do
-       on(ManageTranslatorSandboxPage).older_requests_indicator_element.click
+        on(ManageTranslatorSandboxPage).older_requests_indicator_element.click
 end
 
 When(/^I go to the userpage of user "(.*?)"$/) do |username|
-       visit(UserPage, using_params: {extra: username})
+        visit(UserPage, using_params: {extra: username})
 end
 
 Then(/^I should see a babel box with languages "(.*?)"$/) do |languages|
-       on(UserPage).babel_box_has_languages?(languages).should be_true
+        on(UserPage).babel_box_has_languages?(languages).should be_true
 end
 
 Then(/^I should not see the older requests link at the bottom of the first 
column$/) do
-       
on(ManageTranslatorSandboxPage).older_requests_indicator_element.should_not 
be_visible
+        
on(ManageTranslatorSandboxPage).older_requests_indicator_element.should_not 
be_visible
 end
 
 Then(/^I should not see any users except "(.+)" selected$/) do |username|
-       
on(ManageTranslatorSandboxPage).only_request_with_username_is_selected?(username).should
 be_true
+        
on(ManageTranslatorSandboxPage).only_request_with_username_is_selected?(username).should
 be_true
 end
 
 Then(/^I should not see any translations done by the user in the second 
column$/) do
-       on(ManageTranslatorSandboxPage) do |page|
-               page.translation_elements.size.should == 0
-               page.details_no_translations.size.should == 1
-               page.details_no_translations[0].should be_visible
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.translation_elements.size.should == 0
+               page.details_no_translations.size.should == 1
+               page.details_no_translations[0].should be_visible
+       end
 end
 
 Then(/^I should not see any translations done by the users in the second 
column$/) do
-       on(ManageTranslatorSandboxPage).translation_elements.length.should == 0
+        on(ManageTranslatorSandboxPage).translation_elements.length.should == 0
 end
 
 Then(/^I should see the details of (\d+) sandboxed translations done by the 
user in the second column$/) do |translations|
-       on(ManageTranslatorSandboxPage) do |page|
-               page.translation_elements.size.should == translations.to_i
-               page.details_no_translations.size.should == 0
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.translation_elements.size.should == translations.to_i
+               page.details_no_translations.size.should == 0
+       end
 end
 
 Then(/^I should not see user "(.+)" in the first column$/) do |username|
-       on(ManageTranslatorSandboxPage) do |page|
-               Watir::Wait.until { page.visible_requests_element.size < 11 }
-               page.request_with_username(username).should_not exist
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                Watir::Wait.until { page.visible_requests_element.size < 11 }
+               page.request_with_username(username).should_not exist
+       end
 end
 
 Then(/^I should see that (\d+) reminders were sent to the user$/) do |count|
-       on(ManageTranslatorSandboxPage) do |page|
-               page.reminder_status_element.should be_visible
-               page.reminder_status.should match(/^Sent #{count} reminders/i)
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.reminder_status_element.should be_visible
+               page.reminder_status.should match(/^Sent #{count} reminders/i)
+       end
 end
 
 Then(/^I should see that no reminders have been sent to the user$/) do
-       on(ManageTranslatorSandboxPage).reminder_status.should == ""
+        on(ManageTranslatorSandboxPage).reminder_status.should == ""
 end
 
 Then(/^the direction of the users language filter button is "(.+)"$/) do 
|dir_value|
-       
on(ManageTranslatorSandboxPage).language_selector_button_element.attribute("dir").should
 == dir_value
+        
on(ManageTranslatorSandboxPage).language_selector_button_element.attribute("dir").should
 == dir_value
 end
 
 Then(/^the language code of the users language filter button is "(.+)"$/) do 
|lang_value|
-       
on(ManageTranslatorSandboxPage).language_selector_button_element.attribute("lang").should
 == lang_value
+        
on(ManageTranslatorSandboxPage).language_selector_button_element.attribute("lang").should
 == lang_value
 end
 
 Then(/^usernames are visible in the first column$/) do
-       on(ManageTranslatorSandboxPage).visible_users_element.size.should_not 
== 0
+        on(ManageTranslatorSandboxPage).visible_users_element.size.should_not 
== 0
 end
 
 Then(/^I should see the name of language "(.+)" in the second column$/) do 
|language|
-       on(ManageTranslatorSandboxPage).details_autonym.text.should == language
+        on(ManageTranslatorSandboxPage).details_autonym.text.should == language
 end
 
 Then(/^I should see that the language of the first translation is "(.+)"$/) do 
|language|
-       on(ManageTranslatorSandboxPage).translations_autonyms[0].text.should == 
language
+        on(ManageTranslatorSandboxPage).translations_autonyms[0].text.should 
== language
 end
 
 Then(/^only users whose name begins with "(.*)" are displayed in the first 
column$/) do |prefix|
-       
on(ManageTranslatorSandboxPage).visible_users_start_with?(prefix).should be_true
+        
on(ManageTranslatorSandboxPage).visible_users_start_with?(prefix).should be_true
 end
 
 Then(/^a user whose name begins with "(.*)" is displayed in the first 
column$/) do |prefix|
-       
on(ManageTranslatorSandboxPage).the_first_column_has_username_starting_with?(prefix).should
 be_true
+        
on(ManageTranslatorSandboxPage).the_first_column_has_username_starting_with?(prefix).should
 be_true
 end
 
 Then(/^no users are displayed in the first column$/) do
-       on(ManageTranslatorSandboxPage) do |page|
-               Watir::Wait.until { page.visible_requests_element.size < 11 }
-               page.visible_users_element.length.should == 0
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                Watir::Wait.until { page.visible_requests_element.size < 11 }
+               page.visible_users_element.length.should == 0
+       end
 end
 
 Then(/^I should see "(.+)" at the top of the first column$/) do |text|
-       on(ManageTranslatorSandboxPage).request_count.should == text
+        on(ManageTranslatorSandboxPage).request_count.should == text
 end
 
 Then(/^I should see the button that clears language selection$/) do
-       on(ManageTranslatorSandboxPage).clear_language_selector_element.should 
be_visible
+        on(ManageTranslatorSandboxPage).clear_language_selector_element.should 
be_visible
 end
 
 Then(/^I should not see the button that clears language selection$/) do
-       
on(ManageTranslatorSandboxPage).clear_language_selector_element.should_not 
be_visible
+        
on(ManageTranslatorSandboxPage).clear_language_selector_element.should_not 
be_visible
 end
 
 Then(/^only users who translate to language "(.+)" are displayed in the first 
column$/) do |language|
-       
on(ManageTranslatorSandboxPage).all_visible_requests_translate_to?(language).should
 be_true
+        
on(ManageTranslatorSandboxPage).all_visible_requests_translate_to?(language).should
 be_true
 end
 
 Then(/^I should see "(.+)" at the bottom of the first column$/) do |text|
-       on(ManageTranslatorSandboxPage).selected_counter.should == text
+        on(ManageTranslatorSandboxPage).selected_counter.should == text
 end
 
 Then(/^I should see that the user wrote a comment that says "(.*?)"$/) do 
|text|
-       on(ManageTranslatorSandboxPage).signup_comment_text.should == text
+        on(ManageTranslatorSandboxPage).signup_comment_text.should == text
 end
 
 Then(/^I should not see that the user wrote a comment$/) do
-       on(ManageTranslatorSandboxPage).signup_comment_text_element.should_not 
exist
+        on(ManageTranslatorSandboxPage).signup_comment_text_element.should_not 
exist
 end
 
 Then(/^I should see the name of the first user in the first column in the 
header of the second column$/) do
-       on(ManageTranslatorSandboxPage) do |page|
-               page.details_header.text.should == page.username_in_request(0)
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.details_header.text.should == page.username_in_request(0)
+       end
 end
 
 Then(/^I should see "(.+)" in the header of the second column$/) do |text|
-       on(ManageTranslatorSandboxPage).details_header.text.should == text
+        on(ManageTranslatorSandboxPage).details_header.text.should == text
 end
 
 Then(/^I should see the userlist in the first column sorted by the number of 
translations and the most recent within them$/) do
-       
on(ManageTranslatorSandboxPage).requests_are_sorted_by_translation_count_and_date?.should
 be_true
+        
on(ManageTranslatorSandboxPage).requests_are_sorted_by_translation_count_and_date?.should
 be_true
 end
 
 Then(/^I should see the checkbox next to the request from "(.+)" checked$/) do 
|user|
-       
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should 
be_checked
+        
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should 
be_checked
 end
 
 Then(/^I should see the checkbox next to the request from "(.+)" unchecked$/) 
do |user|
-       
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should_not
 be_checked
+        
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should_not
 be_checked
 end
 
 Then(/^I should see the checkbox next to the request from "(.+)" disabled$/) 
do |user|
-       
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should 
be_disabled
+        
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should 
be_disabled
 end
 
 Then(/^I should see the checkbox next to the request from "(.+)" enabled$/) do 
|user|
-       
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should_not
 be_disabled
+        
on(ManageTranslatorSandboxPage).checkbox_for_request_with_username(user).should_not
 be_disabled
 end
 
 Then(/^I should see the "(.+)" button displayed in the second column$/) do 
|label|
-       on(ManageTranslatorSandboxPage).details_button(label).should be_visible
+        on(ManageTranslatorSandboxPage).details_button(label).should be_visible
 end
 
 Then(/^I should see "(.+)" in the older requests link at the bottom of the 
first column$/) do |text|
-       on(ManageTranslatorSandboxPage) do |page|
-               page.older_requests_indicator_element.should be_visible
-               page.older_requests_indicator_element.text.should == text
-       end
+        on(ManageTranslatorSandboxPage) do |page|
+                page.older_requests_indicator_element.should be_visible
+               page.older_requests_indicator_element.text.should == text
+       end
 end
 
 Then(/^I should see that the user's translations are sorted by the language 
code$/) do
-       
on(ManageTranslatorSandboxPage).translations_languages_are_sorted?.should 
be_true
+        
on(ManageTranslatorSandboxPage).translations_languages_are_sorted?.should 
be_true
 end
diff --git a/tests/browser/features/step_definitions/special_translate_steps.rb 
b/tests/browser/features/step_definitions/special_translate_steps.rb
index e3eb863..27c3aca 100644
--- a/tests/browser/features/step_definitions/special_translate_steps.rb
+++ b/tests/browser/features/step_definitions/special_translate_steps.rb
@@ -1,23 +1,23 @@
 Given(/^I am translating a message group which doesn't have workflow states$/) 
do
-       visit(TranslatePage, using_params: {extra: "language=fi"})
+        visit(TranslatePage, using_params: {extra: "language=fi"})
 end
 
 Given(/^I am translating a message group which has workflow states$/) do
-       visit(TranslatePage, using_params: {extra: 
"language=fi&group=page-Language+committee"})
+        visit(TranslatePage, using_params: {extra: 
"language=fi&group=page-Language+committee"})
 end
 
 When(/^I click the workflow state$/) do
-       on(TranslatePage).workflow_state_element.when_present.click
+        on(TranslatePage).workflow_state_element.when_present.click
 end
 
 Then(/^I should see a workflow state$/) do
-       on(TranslatePage).workflow_state_element.when_present.should be_visible
+        on(TranslatePage).workflow_state_element.when_present.should be_visible
 end
 
 Then(/^I should not see a workflow state$/) do
-       on(TranslatePage).workflow_state_element.should_not be_visible
+        on(TranslatePage).workflow_state_element.should_not be_visible
 end
 
 Then(/^I should see a list of states$/) do
-       on(TranslatePage).workflow_state_selector_element.should be_visible
+        on(TranslatePage).workflow_state_selector_element.should be_visible
 end
diff --git a/tests/browser/features/step_definitions/translation_stash_steps.rb 
b/tests/browser/features/step_definitions/translation_stash_steps.rb
index 94911b9..f88e55e 100644
--- a/tests/browser/features/step_definitions/translation_stash_steps.rb
+++ b/tests/browser/features/step_definitions/translation_stash_steps.rb
@@ -3,66 +3,66 @@
 end
 
 Given(/^I am a sandboxed user on the stash page$/) do
-       visit(StashPage, using_params: {extra: 
"integrationtesting=activatestash"})
+        visit(StashPage, using_params: {extra: 
"integrationtesting=activatestash"})
 end
 
 Then(/^I should see a language selector$/) do
-       on(StashPage).language_selector_element.should be_visible
+        on(StashPage).language_selector_element.should be_visible
 end
 
 Then(/^I should be able to select a language$/) do
-       on(StashPage).select_language("fi")
+        on(StashPage).select_language("fi")
 end
 
 Then(/^I should see the save button$/) do
-       on(StashPage).save_button_element.when_present.should be_visible
+        on(StashPage).save_button_element.when_present.should be_visible
 end
 
 Then(/^I should see the skip button$/) do
-       on(StashPage).skip_button_element.when_present.should be_visible
+        on(StashPage).skip_button_element.when_present.should be_visible
 end
 
 When(/^I make a translation$/) do
-       on(StashPage).make_a_translation
+        on(StashPage).make_a_translation
 end
 
 Then(/^I should see my translation saved$/) do
-       on(StashPage).status_saved_element.when_present.should be_visible
+        on(StashPage).status_saved_element.when_present.should be_visible
 end
 
 Then(/^I should see the next message open for translation$/) do
-       on(StashPage) do |page|
-               page.translation_element(1).when_present.should be_visible
-               page.translation_element(1).value.should == ""
-       end
+        on(StashPage) do |page|
+                page.translation_element(1).when_present.should be_visible
+               page.translation_element(1).value.should == ""
+       end
 end
 
 When(/^I reload the page$/) do
-       visit StashPage
+        visit StashPage
 end
 
 Then(/^I can open and see my earlier translation$/) do
-       pending("Does not work because of random language selection on 
reload.") do
-               on(StashPage) do |page|
-                       page.edit_element.when_present(10).click
-                       page.translation_element.when_present.value.should == 
"Pupu"
-               end
-       end
+        pending("Does not work because of random language selection on 
reload.") do
+                on(StashPage) do |page|
+                        page.edit_element.when_present(10).click
+                       page.translation_element.when_present.value.should == 
"Pupu"
+               end
+       end
 end
 
 Then(/^I should see a message indicating I have one completed translation$/) do
-       on(StashPage).translation_stats.should match(/1/)
+        on(StashPage).translation_stats.should match(/1/)
 end
 
 When(/^I translate all the messages in the sandbox$/) do
        # Sandbox needs to get enough messages
-       pending
+        pending
        (0..19).each do |i|
-               on(StashPage).make_a_translation(i)
+                on(StashPage).make_a_translation(i)
                step "I should see my translation saved"
        end
 end
 
 Then(/^I can see a message that maximum number of translations has been 
reached$/) do
-       on(StashPage).limit_message_element.should be_visible
+        on(StashPage).limit_message_element.should be_visible
 end
diff --git a/tests/browser/features/support/hooks.rb 
b/tests/browser/features/support/hooks.rb
index de2fa48..c5120d1 100644
--- a/tests/browser/features/support/hooks.rb
+++ b/tests/browser/features/support/hooks.rb
@@ -1,3 +1,3 @@
 After("@stash") do |_scenario|
-       visit(StashPage, using_params: {extra: 
"integrationtesting=deactivatestash"})
+        visit(StashPage, using_params: {extra: 
"integrationtesting=deactivatestash"})
 end
diff --git 
a/tests/browser/features/support/pages/manage_translator_sandbox_page.rb 
b/tests/browser/features/support/pages/manage_translator_sandbox_page.rb
index d803d68..7d3fcfe 100644
--- a/tests/browser/features/support/pages/manage_translator_sandbox_page.rb
+++ b/tests/browser/features/support/pages/manage_translator_sandbox_page.rb
@@ -1,7 +1,7 @@
 require "json"
 
 class ManageTranslatorSandboxPage
-       include PageObject
+        include PageObject
 
        page_url "Special:ManageTranslatorSandbox?<%=params[:extra]%>"
 
@@ -27,81 +27,81 @@
 
        # This must be reloaded every time, because it may change during the 
test
        def details_header
-               browser.element(class: "tsb-header")
+                browser.element(class: "tsb-header")
        end
 
        def details_button(label)
-               button_class = label.downcase.gsub(" ", "-")
+                button_class = label.downcase.gsub(" ", "-")
                browser.button(class: button_class)
        end
 
        def details_no_translations
-               browser.divs(class: "tsb-details-no-translations")
+                browser.divs(class: "tsb-details-no-translations")
        end
 
        def visible_request_selectors_element
-               browser.elements(css: ".row.request:not(.hide) 
.request-selector")
+                browser.elements(css: ".row.request:not(.hide) 
.request-selector")
        end
 
        def visible_users_element
-               browser.elements(css: ".row.request:not(.hide) .username")
+                browser.elements(css: ".row.request:not(.hide) .username")
        end
 
        def visible_requests_element
-               browser.elements(css: ".row.request:not(.hide)")
+                browser.elements(css: ".row.request:not(.hide)")
        end
 
        def hidden_users_element
-               browser.elements(css: ".requests .request.hide")
+                browser.elements(css: ".requests .request.hide")
        end
 
        def request_with_username(username)
-               browser.div(id: "tsb-request-#{username}")
+                browser.div(id: "tsb-request-#{username}")
        end
 
        def requests_without_username(username)
-               browser.elements(css: 
".row.request:not(#tsb-request-#{username})")
+                browser.elements(css: 
".row.request:not(#tsb-request-#{username})")
        end
 
        def translation_elements
-               browser.elements(css: ".details .translation")
+                browser.elements(css: ".details .translation")
        end
 
        def checkbox_for_request_with_username(username)
-               browser.div(id: "tsb-request-#{username}").checkbox(class: 
"request-selector")
+                browser.div(id: "tsb-request-#{username}").checkbox(class: 
"request-selector")
        end
 
        def visible_users_start_with?(prefix)
-               Watir::Wait.until { hidden_users_element.size > 0 }
+                Watir::Wait.until { hidden_users_element.size > 0 }
                visible_users_element.all? do |element|
-                       element.text.match(/^#{prefix}/i)
+                        element.text.match(/^#{prefix}/i)
                end
        end
 
        def the_first_column_has_username_starting_with?(prefix)
-               visible_users_element.any? do |element|
-                       element.text.match(/^#{prefix}/i)
-               end
+                visible_users_element.any? do |element|
+                        element.text.match(/^#{prefix}/i)
+               end
        end
 
        def all_visible_requests_translate_to?(language)
-               Watir::Wait.until { hidden_users_element.size > 0 }
+                Watir::Wait.until { hidden_users_element.size > 0 }
                visible_requests_element.all? do |element|
-                       user_data = 
JSON.parse(element.attribute_value("data-data"))
+                        user_data = 
JSON.parse(element.attribute_value("data-data"))
                        
user_data["languagepreferences"]["languages"].include?(language)
                end
        end
 
        def username_in_request(index)
-               visible_users_element[index].text
+                visible_users_element[index].text
        end
 
        def requests_are_sorted_by_translation_count_and_date?
-               expected_usernames = []
+                expected_usernames = []
                Array(0..4).each do |num|
-                       %w{Pupu Orava}.each do |name|
-                               expected_usernames.unshift("#{name}#{num}")
-                       end
+                        %w{Pupu Orava}.each do |name|
+                                expected_usernames.unshift("#{name}#{num}")
+                       end
                end
                expected_usernames.unshift("Kissa")
                usernames = visible_users_element.collect { |element| 
element.text }
@@ -110,22 +110,22 @@
        end
 
        def details_autonym
-               browser.elements(css: ".details.pane .languages span")[0]
+                browser.elements(css: ".details.pane .languages span")[0]
        end
 
        def translations_languages_are_sorted?
-               expected_langs = ["bn", "fi", "he", "nl", "uk"]
+                expected_langs = ["bn", "fi", "he", "nl", "uk"]
                langs = translations_autonyms.collect { |element| 
element.attribute_value("lang") }
 
                expected_langs == langs
        end
 
        def translations_autonyms
-               browser.elements(css: ".details.pane .translations 
.info.autonym")
+                browser.elements(css: ".details.pane .translations 
.info.autonym")
        end
 
        def click_button(label)
-               initial_header_text = details_header.text
+                initial_header_text = details_header.text
 
                details_button(label).click
 
@@ -136,8 +136,8 @@
        end
 
        def only_request_with_username_is_selected?(username)
-               requests_without_username(username).all? do |element|
-                       not element.attribute_value("class").split(" 
").include?("selected")
-               end
+                requests_without_username(username).all? do |element|
+                        not element.attribute_value("class").split(" 
").include?("selected")
+               end
        end
 end
diff --git a/tests/browser/features/support/pages/stash_page.rb 
b/tests/browser/features/support/pages/stash_page.rb
index ea76221..838331e 100644
--- a/tests/browser/features/support/pages/stash_page.rb
+++ b/tests/browser/features/support/pages/stash_page.rb
@@ -1,5 +1,5 @@
 class StashPage
-       include PageObject
+        include PageObject
 
        page_url "Special:TranslationStash?<%=params[:extra]%>"
 
@@ -16,21 +16,21 @@
        div(:limit_message, class: "limit-reached")
 
        def make_a_translation(index = 0)
-               translation_element(index).when_present.set "Pupu"
+                translation_element(index).when_present.set "Pupu"
                save_button_element(index).click
        end
 
        def save_button_element(index = 0)
-               browser.button(class: "tux-editor-save-button", index: index)
+                browser.button(class: "tux-editor-save-button", index: index)
        end
 
        def select_language(language)
-               self.language_selector_element.click
+                self.language_selector_element.click
                self.language_filter = language
                self.language_filter_element.send_keys :enter
        end
 
        def translation_element(index = 0)
-               browser.text_field(class: "tux-textarea-translation", index: 
index)
+                browser.text_field(class: "tux-textarea-translation", index: 
index)
        end
 end
diff --git a/tests/browser/features/support/pages/translate_page.rb 
b/tests/browser/features/support/pages/translate_page.rb
index 69cc6ae..c31f49b 100644
--- a/tests/browser/features/support/pages/translate_page.rb
+++ b/tests/browser/features/support/pages/translate_page.rb
@@ -1,5 +1,5 @@
 class TranslatePage
-       include PageObject
+        include PageObject
 
        page_url "Special:Translate?<%=params[:extra]%>"
 
diff --git a/tests/browser/features/support/pages/user_page.rb 
b/tests/browser/features/support/pages/user_page.rb
index f274c9b..1f3b8bf 100644
--- a/tests/browser/features/support/pages/user_page.rb
+++ b/tests/browser/features/support/pages/user_page.rb
@@ -1,12 +1,12 @@
 class UserPage
-       include PageObject
+        include PageObject
 
        page_url "User:<%=params[:extra]%>"
 
        def babel_box_has_languages?(languages)
-               languages.split(/, /).all? do |language|
-                       browser.element(css: ".mw-babel-box 
td[lang=#{language}]").visible?
-               end
+                languages.split(/, /).all? do |language|
+                        browser.element(css: ".mw-babel-box 
td[lang=#{language}]").visible?
+               end
        end
 
 end

-- 
To view, visit https://gerrit.wikimedia.org/r/251534
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a4b34619499bd0102f8c97f91fb23bb9c4f00c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <zfili...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to