jenkins-bot has submitted this change and it was merged.

Change subject: Replace tabs with spaces in Ruby code
......................................................................


Replace tabs with spaces in Ruby code

Using
bundle exec rubocop -c .rubocop.yml --auto-correct

Change-Id: I4c188c3871c8e8688f7b68bf2e37ffd055177c26
---
M .rubocop_todo.yml
M tests/browser/features/step_definitions/basic_mt_steps.rb
M tests/browser/features/step_definitions/red_link_steps.rb
M tests/browser/features/step_definitions/special_content_translation_steps.rb
M tests/browser/features/support/pages/anon_error_page.rb
M tests/browser/features/support/pages/content_translation_page.rb
M tests/browser/features/support/pages/page_creation_page.rb
M tests/browser/features/support/pages/red_link_page.rb
M tests/browser/features/support/pages/translated_page.rb
M tests/browser/features/support/pages/translated_page_history.rb
10 files changed, 174 insertions(+), 179 deletions(-)

Approvals:
  Zfilipin: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index d310505..35e47f7 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -58,11 +58,6 @@
 Style/StringLiterals:
   Enabled: false
 
-# Offense count: 174
-# Cop supports --auto-correct.
-Style/Tab:
-  Enabled: false
-
 # Offense count: 2
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
diff --git a/tests/browser/features/step_definitions/basic_mt_steps.rb 
b/tests/browser/features/step_definitions/basic_mt_steps.rb
index 69e77b6..0ae5650 100644
--- a/tests/browser/features/step_definitions/basic_mt_steps.rb
+++ b/tests/browser/features/step_definitions/basic_mt_steps.rb
@@ -1,7 +1,7 @@
 When(/^I click the translation column$/) do
-       on(ContentTranslationPage).translation_editor_element.click
+  on(ContentTranslationPage).translation_editor_element.click
 end
 
 Then(/^I see the text "(.*?)" in the editing area in the translation column$/) 
do |text|
-       on(ContentTranslationPage).translation_editor_element.text.should == 
text
+  on(ContentTranslationPage).translation_editor_element.text.should == text
 end
diff --git a/tests/browser/features/step_definitions/red_link_steps.rb 
b/tests/browser/features/step_definitions/red_link_steps.rb
index bd5c0ed..fe09d7c 100644
--- a/tests/browser/features/step_definitions/red_link_steps.rb
+++ b/tests/browser/features/step_definitions/red_link_steps.rb
@@ -1,107 +1,107 @@
 When(/^I am on a page with an interlanguage link to "(.+?)"$/) do |code|
-       on(RedLinkPage).create_page("This is a red interlanguage link test 
page. [[#{code}:Target]]")
-       visit(RedLinkPage)
+  on(RedLinkPage).create_page("This is a red interlanguage link test page. 
[[#{code}:Target]]")
+  visit(RedLinkPage)
 end
 
 When(/^I am on a page without interlanguage links$/) do
-       on(RedLinkPage).create_page("This is a red interlanguage link test page 
without links.")
-       visit(RedLinkPage)
+  on(RedLinkPage).create_page("This is a red interlanguage link test page 
without links.")
+  visit(RedLinkPage)
 end
 
 When(/^I click on the red link to "(.*?)" in the list of the interlanguage 
links$/) do |autonym|
-       
on(RedLinkPage).red_interlanguage_item_with_autonym(autonym).when_present.click
+  
on(RedLinkPage).red_interlanguage_item_with_autonym(autonym).when_present.click
 end
 
 When(/^I click outside of the red link dialog$/) do
-       on(RedLinkPage).article_content_element.click
+  on(RedLinkPage).article_content_element.click
 end
 
 When(/^I click the "Create from scratch" button$/) do
-       on(RedLinkPage).create_from_scratch_element.when_visible.click
+  on(RedLinkPage).create_from_scratch_element.when_visible.click
 end
 
 When(/^I click the "Translate from English" button$/) do
-       on(RedLinkPage).translate_from_element.when_visible.click
+  on(RedLinkPage).translate_from_element.when_visible.click
 end
 
 When(/^I click the input box in the red link dialog$/) do
-       on(RedLinkPage).translated_title_element.when_visible.click
+  on(RedLinkPage).translated_title_element.when_visible.click
 end
 
 When(/^I click on the X button in the red link dialog$/) do
-       on(RedLinkPage).dialog_close_button.click
+  on(RedLinkPage).dialog_close_button.click
 end
 
 When(/^I set "(.*?)" as the interface language$/) do |code|
-       on(RedLinkPage) do |page|
-               page.trigger_cog_element.click
-               page.uls_more_languages_element.when_present.click
-               page.language_filter = code
-               # Because one browser wants :enter and other :return -- sigh
-               page.language_filter_element.send_keys [:enter, "\n"]
-               page.uls_settings_apply_element.click
-               page.wait_until do
-                       @browser.url.match /setlang=#{code}/
-               end
-       end
+  on(RedLinkPage) do |page|
+    page.trigger_cog_element.click
+    page.uls_more_languages_element.when_present.click
+    page.language_filter = code
+    # Because one browser wants :enter and other :return -- sigh
+    page.language_filter_element.send_keys [:enter, "\n"]
+    page.uls_settings_apply_element.click
+    page.wait_until do
+      @browser.url.match /setlang=#{code}/
+    end
+  end
 end
 
 When(/^I write "(.+)" in the input box in the red link dialog$/) do |title|
-       on(RedLinkPage).translated_title = title
+  on(RedLinkPage).translated_title = title
 end
 
 Then(/^I should not see any red links in the list of the interlanguage 
links$/) do
-       on(RedLinkPage).red_interlanguage_link_item_element.should_not exist
+  on(RedLinkPage).red_interlanguage_link_item_element.should_not exist
 end
 
 Then(/^I should not see a dialog for creating a page in "(.+?)"$/) do |autonym|
-       on(RedLinkPage).page_creation_dialog(autonym).should_not be_visible
+  on(RedLinkPage).page_creation_dialog(autonym).should_not be_visible
 end
 
 Then(/^I should see a blue link to "(.*?)" in the list of the interlanguage 
links$/) do |autonym|
-       on(RedLinkPage).blue_interlanguage_item_with_autonym(autonym).should 
be_visible
+  on(RedLinkPage).blue_interlanguage_item_with_autonym(autonym).should 
be_visible
 end
 
 Then(/^I should see a dialog for creating a page in "(.+?)"$/) do |autonym|
-       on(RedLinkPage).page_creation_dialog(autonym).should be_visible
+  on(RedLinkPage).page_creation_dialog(autonym).should be_visible
 end
 
 Then(/^I should see a red link to "(.+?)" in the list of the interlanguage 
links$/) do |autonym|
-       on(RedLinkPage).red_interlanguage_item_with_autonym(autonym).should 
be_visible
+  on(RedLinkPage).red_interlanguage_item_with_autonym(autonym).should 
be_visible
 end
 
 Then(/^the Content translation page should open$/) do
-       on(ContentTranslationPage).cx_widget_element.should be_visible
+  on(ContentTranslationPage).cx_widget_element.should be_visible
 end
 
 Then(/^the page creation page should open$/) do
-       on(PageCreationPage).editing_area.should == ""
+  on(PageCreationPage).editing_area.should == ""
 end
 
 Then(/^the name of the page should appear in the main title$/) do
-       on(PageCreationPage).first_heading.should match /Red interlanguage link 
test/
+  on(PageCreationPage).first_heading.should match /Red interlanguage link test/
 end
 
 Then(/^the name "(.+?)" should appear in the main title$/) do |target_title|
-       on(PageCreationPage).first_heading.should match /#{target_title}/
+  on(PageCreationPage).first_heading.should match /#{target_title}/
 end
 
 Then(/^the name of the page should appear in the (.+) column$/) do 
|column_type|
-       on(ContentTranslationPage).title(column_type).text.should == "Red 
interlanguage link test"
+  on(ContentTranslationPage).title(column_type).text.should == "Red 
interlanguage link test"
 end
 
 Then(/^the title in the translation column should be "(.*?)"$/) do 
|target_title|
-       on(ContentTranslationPage).title("translation").text.should == 
target_title
+  on(ContentTranslationPage).title("translation").text.should == target_title
 end
 
 Then(/^the language of the editing area should be "(.*?)"$/) do |code|
-       
on(PageCreationPage).editing_area_element.attribute_value("lang").should == code
+  on(PageCreationPage).editing_area_element.attribute_value("lang").should == 
code
 end
 
 Then(/^the heading of the dialog for creating a page should include "(.+?)"$/) 
do |text|
-       on(RedLinkPage).dialog_heading.should match text
+  on(RedLinkPage).dialog_heading.should match text
 end
 
 Then(/^the label of the input box in the dialog for creating a page should be 
"(.*?)"$/) do |text|
-       on(RedLinkPage).input_label.should == text
+  on(RedLinkPage).input_label.should == text
 end
diff --git 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
index ff5704a..1d75213 100644
--- 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb
+++ 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
@@ -1,131 +1,131 @@
 Given(/^I am on the content translation page in a wiki in (.+?), translating 
the page "(.+?)" to (.+?)$/) do |_source_language, page_name, target_language|
-       language_code = {
-               "Danish" => "da",
-               "English" => "en",
-               "Hebrew" => "he",
-       }
-       visit(ContentTranslationPage, :using_params => {:extra => 
"page=#{page_name}&lang=#{language_code[target_language]}"})
+  language_code = {
+    "Danish" => "da",
+    "English" => "en",
+    "Hebrew" => "he",
+  }
+  visit(ContentTranslationPage, :using_params => {:extra => 
"page=#{page_name}&lang=#{language_code[target_language]}"})
 end
 
 When(/^I click the link in the notification bubble$/) do
-       on(ContentTranslationPage).notification_link_element.click
+  on(ContentTranslationPage).notification_link_element.click
 end
 
 When(/^I empty the editing area in the translation column$/) do
-       on(ContentTranslationPage).empty_translation_editor
+  on(ContentTranslationPage).empty_translation_editor
 end
 
 When(/^I press the "Publish Translation" button$/) do
-       on(ContentTranslationPage).publish_translation
+  on(ContentTranslationPage).publish_translation
 end
 
 When(/^I write "(.*?)" in the editing area in the translation column$/) do 
|translation|
-       
on(ContentTranslationPage).translation_editor_element.send_keys(translation)
+  on(ContentTranslationPage).translation_editor_element.send_keys(translation)
 end
 
 Then(/^I don't see a "Publish Translation" button$/) do
-       on(ContentTranslationPage).publish_translation_element.should_not exist
+  on(ContentTranslationPage).publish_translation_element.should_not exist
 end
 
 Then(/^I don't see the (.+?) column$/) do |column_type|
-       on(ContentTranslationPage).column(column_type).should_not exist
+  on(ContentTranslationPage).column(column_type).should_not exist
 end
 
 Then(/^I see a "(.*?)" link that points to the page "(.*?)" on the same 
wiki$/) do |_link_name, page_title|
-       page_title_in_url = page_title.gsub(" ", "_")
-       on(ContentTranslationPage).view_page.attribute_value("href").should 
end_with(page_title_in_url)
+  page_title_in_url = page_title.gsub(" ", "_")
+  on(ContentTranslationPage).view_page.attribute_value("href").should 
end_with(page_title_in_url)
 end
 
 Then(/^I see a "Publish Translation" button$/) do
-       on(ContentTranslationPage).publish_translation_element.should be_visible
+  on(ContentTranslationPage).publish_translation_element.should be_visible
 end
 
 Then(/^I see a "view page" link in the source column$/) do
-       on(ContentTranslationPage).view_page.should be_visible
+  on(ContentTranslationPage).view_page.should be_visible
 end
 
 Then(/^I see a language label saying "(.*?)" below the (.+?) column's title$/) 
do |language_name, column_type|
-       on(ContentTranslationPage).language_label(column_type).text.should == 
language_name
+  on(ContentTranslationPage).language_label(column_type).text.should == 
language_name
 end
 
 Then(/^I should see an input box pre\-filled with the text "(.*?)" above the 
editing area in the second column$/) do |text|
-       on(ContentTranslationPage).title("translation").text.should == text
+  on(ContentTranslationPage).title("translation").text.should == text
 end
 
 Then(/^I see a notification bubble that begins with the words "(.*?)"$/) do 
|text|
-       
on(ContentTranslationPage).notification_bubble_element.when_present.text.should 
start_with(text)
+  
on(ContentTranslationPage).notification_bubble_element.when_present.text.should 
start_with(text)
 end
 
 Then(/^I see a source column with the text "(.*?)"$/) do |text|
-       on(ContentTranslationPage).content("source").text.should == text
+  on(ContentTranslationPage).content("source").text.should == text
 end
 
 Then(/^I see a search box in the translation tools column$/) do
-       on(ContentTranslationPage).search_box_element.should be_visible
+  on(ContentTranslationPage).search_box_element.should be_visible
 end
 
 Then(/^I see a translation column with an empty editing area$/) do
-       on(ContentTranslationPage).translation_editor_element.text.should == ""
+  on(ContentTranslationPage).translation_editor_element.text.should == ""
 end
 
 Then(/^I see a translation tools column$/) do
-       on(ContentTranslationPage).column("tools").should be_visible
+  on(ContentTranslationPage).column("tools").should be_visible
 end
 
 Then(/^I see a translation progress bar$/) do
-       on(ContentTranslationPage).progress_bar_container_element.should 
be_visible
+  on(ContentTranslationPage).progress_bar_container_element.should be_visible
 end
 
 Then(/^I see the message "You must be logged in to translate in this 
page\."$/) do
-       on(AnonErrorPage).content_text.should == "You must be logged in to 
translate in this page."
+  on(AnonErrorPage).content_text.should == "You must be logged in to translate 
in this page."
 end
 
 Then(/^I see the title "(.*?)" at the top of the source column$/) do 
|source_page_title|
-       on(ContentTranslationPage).title("source").text.should == 
source_page_title
+  on(ContentTranslationPage).title("source").text.should == source_page_title
 end
 
 Then(/^I see the username at the top of the page$/) do
-       on(ContentTranslationPage).user_name_element.text.should == 
ENV["MEDIAWIKI_USER"]
+  on(ContentTranslationPage).user_name_element.text.should == 
ENV["MEDIAWIKI_USER"]
 end
 
 Then(/^the content of the page is "(.*?)"$/) do |page_content|
-       on(TranslatedPage).content_text_element.when_visible.text.should == 
page_content
+  on(TranslatedPage).content_text_element.when_visible.text.should == 
page_content
 end
 
 Then(/^the direction of the (.+) column is "(.+)"$/) do |column_type, 
direction|
-       
on(ContentTranslationPage).column(column_type).attribute_value("dir").should == 
direction
+  on(ContentTranslationPage).column(column_type).attribute_value("dir").should 
== direction
 end
 
 Then(/^the first version in the history of the page "(.+?)" should have the 
tag "(.+?)"$/) do |_page_title, _tag_name|
-       visit(TranslatedPageHistory).contenttranslation_tag_element.should 
be_visible
+  visit(TranslatedPageHistory).contenttranslation_tag_element.should be_visible
 end
 
 Then(/^the language code of the (.+) column should be "(.+)"$/) do 
|column_type, language_code|
-       
on(ContentTranslationPage).column(column_type).attribute_value("lang").should 
== language_code
+  
on(ContentTranslationPage).column(column_type).attribute_value("lang").should 
== language_code
 end
 
 Then(/^the page "(.+?)" is displayed$/) do |page_title|
-       on(TranslatedPage).first_heading.should == page_title
+  on(TranslatedPage).first_heading.should == page_title
 end
 
 Then(/^the "Publish Translation" button is disabled$/) do
-       on(ContentTranslationPage).publish_translation_element.should 
be_disabled
+  on(ContentTranslationPage).publish_translation_element.should be_disabled
 end
 
 Then(/^the "Publish Translation" button is enabled$/) do
-       on(ContentTranslationPage).publish_translation_element.should be_enabled
+  on(ContentTranslationPage).publish_translation_element.should be_enabled
 end
 
 Then(/^the source column text is not editable$/) do
-       
on(ContentTranslationPage).content("source").attribute_value("contenteditable").should
 == nil
+  
on(ContentTranslationPage).content("source").attribute_value("contenteditable").should
 == nil
 end
 
 Then(/^the text near the translation progress bar says "(.*?)"$/) do |text|
-       on(ContentTranslationPage).progress_bar_text.should == text
+  on(ContentTranslationPage).progress_bar_text.should == text
 end
 
 Then(/^the translation progress bar is in (\d+%) state$/) do |width|
-       # The .style method returns the computed value in px,
-       # but we need the specified CSS value, so we chech it manually
-       
on(ContentTranslationPage).progress_bar_element.attribute("style").should 
match(/width: #{width};/)
+  # The .style method returns the computed value in px,
+  # but we need the specified CSS value, so we chech it manually
+  on(ContentTranslationPage).progress_bar_element.attribute("style").should 
match(/width: #{width};/)
 end
diff --git a/tests/browser/features/support/pages/anon_error_page.rb 
b/tests/browser/features/support/pages/anon_error_page.rb
index a0eb210..12c2f33 100644
--- a/tests/browser/features/support/pages/anon_error_page.rb
+++ b/tests/browser/features/support/pages/anon_error_page.rb
@@ -1,6 +1,6 @@
 class AnonErrorPage
-       include PageObject
-       include URL
+  include PageObject
+  include URL
 
-       div(:content_text, id: "mw-content-text")
+  div(:content_text, id: "mw-content-text")
 end
diff --git a/tests/browser/features/support/pages/content_translation_page.rb 
b/tests/browser/features/support/pages/content_translation_page.rb
index 2f53a9e..ebc7dc4 100644
--- a/tests/browser/features/support/pages/content_translation_page.rb
+++ b/tests/browser/features/support/pages/content_translation_page.rb
@@ -1,60 +1,60 @@
 class ContentTranslationPage
-       include PageObject
-       include URL
-       page_url URL.url("Special:ContentTranslation?<%=params[:extra]%>")
+  include PageObject
+  include URL
+  page_url URL.url("Special:ContentTranslation?<%=params[:extra]%>")
 
-       a(:user_name, class: "cx-header__user-details__user-name")
+  a(:user_name, class: "cx-header__user-details__user-name")
 
-       button(:publish_translation, class: "cx-header__publish")
+  button(:publish_translation, class: "cx-header__publish")
 
-       div(:content, class: "content")
-       div(:cx_widget, class: "cx-widget")
-       div(:notification_bubble, class: "mw-notification-content")
-       div(:progress_bar_container, class: "cx-progressbar")
-       div(:search_box, class: "card search")
+  div(:content, class: "content")
+  div(:cx_widget, class: "cx-widget")
+  div(:notification_bubble, class: "mw-notification-content")
+  div(:progress_bar_container, class: "cx-progressbar")
+  div(:search_box, class: "card search")
 
-       span(:progress_bar, class: "cx-progressbar__bar")
-       span(:progress_bar_text, class: "cx-progressbar__text")
+  span(:progress_bar, class: "cx-progressbar__bar")
+  span(:progress_bar_text, class: "cx-progressbar__text")
 
-       # Sets the text of an element.
-       # Selenium doesn't give us an easy generic way to do this,
-       # so we use JavaScript.
-       # The element is selected by a jQuery selector.
-       def set_element_text(selector, text)
-               @browser.execute_script("$( '#{selector}' ).text( '#{text}' )")
-       end
+  # Sets the text of an element.
+  # Selenium doesn't give us an easy generic way to do this,
+  # so we use JavaScript.
+  # The element is selected by a jQuery selector.
+  def set_element_text(selector, text)
+    @browser.execute_script("$( '#{selector}' ).text( '#{text}' )")
+  end
 
-       def empty_translation_editor
-               set_element_text(".cx-column--translation .cx-column__content", 
"")
-               # Fake an input event
-               translation_editor_element.send_keys('a', :backspace)
-       end
+  def empty_translation_editor
+    set_element_text(".cx-column--translation .cx-column__content", "")
+    # Fake an input event
+    translation_editor_element.send_keys('a', :backspace)
+  end
 
-       def column(column_type)
-               @browser.div(class: "cx-column--#{column_type}")
-       end
+  def column(column_type)
+    @browser.div(class: "cx-column--#{column_type}")
+  end
 
-       def language_label(column_type)
-               column(column_type).span(class: "cx-column__language-label")
-       end
+  def language_label(column_type)
+    column(column_type).span(class: "cx-column__language-label")
+  end
 
-       def content(column_type)
-               column(column_type).div(class: "cx-column__content")
-       end
+  def content(column_type)
+    column(column_type).div(class: "cx-column__content")
+  end
 
-       def notification_link_element
-               notification_bubble_element.when_present.element.a
-       end
+  def notification_link_element
+    notification_bubble_element.when_present.element.a
+  end
 
-       def title(column_type)
-               column(column_type).h2(class: "cx-column__title")
-       end
+  def title(column_type)
+    column(column_type).h2(class: "cx-column__title")
+  end
 
-       def translation_editor_element
-               content("translation")
-       end
+  def translation_editor_element
+    content("translation")
+  end
 
-       def view_page
-               column("source").span(class: 
"cx-column__sub-heading__view-page").a
-       end
+  def view_page
+    column("source").span(class: "cx-column__sub-heading__view-page").a
+  end
 end
diff --git a/tests/browser/features/support/pages/page_creation_page.rb 
b/tests/browser/features/support/pages/page_creation_page.rb
index 4a00cc5..0744d69 100644
--- a/tests/browser/features/support/pages/page_creation_page.rb
+++ b/tests/browser/features/support/pages/page_creation_page.rb
@@ -1,7 +1,7 @@
 class PageCreationPage
-       include PageObject
+  include PageObject
 
-       h1(:first_heading, id: "firstHeading")
+  h1(:first_heading, id: "firstHeading")
 
-       text_field(:editing_area, id: "wpTextbox1")
+  text_field(:editing_area, id: "wpTextbox1")
 end
diff --git a/tests/browser/features/support/pages/red_link_page.rb 
b/tests/browser/features/support/pages/red_link_page.rb
index b4d501c..b21a2b4 100644
--- a/tests/browser/features/support/pages/red_link_page.rb
+++ b/tests/browser/features/support/pages/red_link_page.rb
@@ -1,52 +1,52 @@
 class RedLinkPage
-       include PageObject
-       include URL
+  include PageObject
+  include URL
 
-       page_url URL.url("Red interlanguage link test")
+  page_url URL.url("Red interlanguage link test")
 
-       button(:translate_from, class: 
"cx-entrypoint-dialog-button-translate-from")
-       button(:create_from_scratch, class: 
"cx-entrypoint-dialog-button-create-from-scratch")
-       button(:uls_settings_apply, class: "uls-settings-apply")
-       button(:uls_more_languages, class: "uls-more-languages")
+  button(:translate_from, class: "cx-entrypoint-dialog-button-translate-from")
+  button(:create_from_scratch, class: 
"cx-entrypoint-dialog-button-create-from-scratch")
+  button(:uls_settings_apply, class: "uls-settings-apply")
+  button(:uls_more_languages, class: "uls-more-languages")
 
-       div(:article_content, id: "mw-content-text")
-       div(:dialog_heading, class: "cx-entrypoint-dialog__heading")
-       div(:input_label, class: "cx-entrypoint-dialog__title-label")
+  div(:article_content, id: "mw-content-text")
+  div(:dialog_heading, class: "cx-entrypoint-dialog__heading")
+  div(:input_label, class: "cx-entrypoint-dialog__title-label")
 
-       text_field(:translated_title, css: 
".cx-entrypoint-dialog__title-box-block input")
+  text_field(:translated_title, css: ".cx-entrypoint-dialog__title-box-block 
input")
 
-       li(:red_interlanguage_link_item, class: "cx-new-interlanguage-link")
+  li(:red_interlanguage_link_item, class: "cx-new-interlanguage-link")
 
-       span(:trigger_cog, class: "uls-settings-trigger")
+  span(:trigger_cog, class: "uls-settings-trigger")
 
-       text_field(:language_filter, id: "languagefilter")
+  text_field(:language_filter, id: "languagefilter")
 
-       def create_page(text)
-               if (ENV["MEDIAWIKI_API_URL"] == nil)
-                       abort "Environment variable MEDIAWIKI_API_URL must be 
set in order to create a target page for this test"
-               end
+  def create_page(text)
+    if (ENV["MEDIAWIKI_API_URL"] == nil)
+      abort "Environment variable MEDIAWIKI_API_URL must be set in order to 
create a target page for this test"
+    end
 
-               client = MediawikiApi::Client.new(ENV["MEDIAWIKI_API_URL"])
-               client.log_in(ENV["MEDIAWIKI_USER"], ENV["MEDIAWIKI_PASSWORD"])
-               client.create_page("Red interlanguage link test", text)
-       end
+    client = MediawikiApi::Client.new(ENV["MEDIAWIKI_API_URL"])
+    client.log_in(ENV["MEDIAWIKI_USER"], ENV["MEDIAWIKI_PASSWORD"])
+    client.create_page("Red interlanguage link test", text)
+  end
 
-       def blue_interlanguage_item_with_autonym(autonym)
-               @browser.li(class: "interlanguage-link", text: autonym)
-       end
+  def blue_interlanguage_item_with_autonym(autonym)
+    @browser.li(class: "interlanguage-link", text: autonym)
+  end
 
-       def dialog_close_button
-               @browser.span(css: ".cx-entrypoint-dialog:not(.hidden) 
.icon-close")
-       end
+  def dialog_close_button
+    @browser.span(css: ".cx-entrypoint-dialog:not(.hidden) .icon-close")
+  end
 
-       def page_creation_dialog(autonym)
-               codes = {
-                       "Nederlands" => "nl",
-               }
-               @browser.div(id: "cx-entrypoint-dialog-#{codes[autonym]}")
-       end
+  def page_creation_dialog(autonym)
+    codes = {
+      "Nederlands" => "nl",
+    }
+    @browser.div(id: "cx-entrypoint-dialog-#{codes[autonym]}")
+  end
 
-       def red_interlanguage_item_with_autonym(autonym)
-               @browser.li(class: "cx-new-interlanguage-link", text: autonym)
-       end
+  def red_interlanguage_item_with_autonym(autonym)
+    @browser.li(class: "cx-new-interlanguage-link", text: autonym)
+  end
 end
diff --git a/tests/browser/features/support/pages/translated_page.rb 
b/tests/browser/features/support/pages/translated_page.rb
index fa2225c..2627f2b 100644
--- a/tests/browser/features/support/pages/translated_page.rb
+++ b/tests/browser/features/support/pages/translated_page.rb
@@ -1,8 +1,8 @@
 class TranslatedPage
-       include PageObject
-       include URL
-       page_url URL.url("User:TranslatorToDa/Bratislava")
+  include PageObject
+  include URL
+  page_url URL.url("User:TranslatorToDa/Bratislava")
 
-       div(:content_text, id: "mw-content-text")
-       h1(:first_heading, id: "firstHeading")
+  div(:content_text, id: "mw-content-text")
+  h1(:first_heading, id: "firstHeading")
 end
diff --git a/tests/browser/features/support/pages/translated_page_history.rb 
b/tests/browser/features/support/pages/translated_page_history.rb
index c414c4e..653e822 100644
--- a/tests/browser/features/support/pages/translated_page_history.rb
+++ b/tests/browser/features/support/pages/translated_page_history.rb
@@ -1,7 +1,7 @@
 class TranslatedPageHistory
-       include PageObject
-       include URL
-       page_url URL.url("User:TranslatorToDa/Bratislava?action=history")
+  include PageObject
+  include URL
+  page_url URL.url("User:TranslatorToDa/Bratislava?action=history")
 
-       span(:contenttranslation_tag, class: "mw-tag-marker-contenttranslation")
+  span(:contenttranslation_tag, class: "mw-tag-marker-contenttranslation")
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c188c3871c8e8688f7b68bf2e37ffd055177c26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to