Mayankmadan has uploaded a new change for review.
https://gerrit.wikimedia.org/r/97762
Change subject: Prefer double-quoted strings in Ruby code
......................................................................
Prefer double-quoted strings in Ruby code
Bug: 57597
Change-Id: I7c22158ad80e0c99e6cf74a2fb140458a1c3d538
---
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/flow_steps.rb
M tests/browser/features/support/env.rb
M tests/browser/features/support/modules/url_module.rb
M tests/browser/features/support/pages/flow_page.rb
M tests/browser/features/support/pages/login_page.rb
6 files changed, 30 insertions(+), 30 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/62/97762/1
diff --git a/tests/browser/features/step_definitions/common_steps.rb
b/tests/browser/features/step_definitions/common_steps.rb
index 93738cc..6d4e24f 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -1,3 +1,3 @@
Given(/^I am logged in$/) do
- visit(LoginPage).login_with(ENV['MEDIAWIKI_USER'], ENV['MEDIAWIKI_PASSWORD'])
+ visit(LoginPage).login_with(ENV["MEDIAWIKI_USER"], ENV["MEDIAWIKI_PASSWORD"])
end
diff --git a/tests/browser/features/step_definitions/flow_steps.rb
b/tests/browser/features/step_definitions/flow_steps.rb
index 7658724..9fa0447 100644
--- a/tests/browser/features/step_definitions/flow_steps.rb
+++ b/tests/browser/features/step_definitions/flow_steps.rb
@@ -3,11 +3,11 @@
end
Given(/^I have created a Flow topic$/) do
- step 'I am on Flow page'
- step 'I create a Title of Flow Topic in Flow new topic'
- step 'I create a Body of Flow Topic into Flow body'
- step 'I click New topic save'
- step 'the Flow page should contain Title of Flow Topic'
+ step "I am on Flow page"
+ step "I create a Title of Flow Topic in Flow new topic"
+ step "I create a Body of Flow Topic into Flow body"
+ step "I click New topic save"
+ step "the Flow page should contain Title of Flow Topic"
end
Given(/^the author link is visible$/) do
@@ -26,7 +26,7 @@
end
When(/^I create a (.+) in Flow new topic$/) do |flow_title|
- @automated_test_marker = ' browsertest edit'
+ @automated_test_marker = " browsertest edit"
on(FlowPage) do |page|
page.new_topic_title_element.when_present.click
page.new_topic_title_element.when_present.send_keys(flow_title +
@random_string + @automated_test_marker)
@@ -38,7 +38,7 @@
end
When(/^I hover over the author link$/) do
- on(FlowPage).author_link_element.fire_event('onmouseover')
+ on(FlowPage).author_link_element.fire_event("onmouseover")
end
Then(/^links to talk and contrib should be visible$/) do
@@ -59,7 +59,7 @@
# then afterwards find the flow-topic-<UUID> div *preceding* that and
search in there.
# Or after submit it could look for the Title of Flow Topic, find the
# flow-topic-container containing that and search in there.
- page.text.include? '1 second ago' or page.text.include? 'just now'
+ page.text.include? "1 second ago" or page.text.include? "just now"
end
page.flow_body.should match(flow_topic + @random_string +
@automated_test_marker)
end
diff --git a/tests/browser/features/support/env.rb
b/tests/browser/features/support/env.rb
index 2281d94..24feda0 100644
--- a/tests/browser/features/support/env.rb
+++ b/tests/browser/features/support/env.rb
@@ -1 +1 @@
-require 'mediawiki/selenium'
+require "mediawiki/selenium"
diff --git a/tests/browser/features/support/modules/url_module.rb
b/tests/browser/features/support/modules/url_module.rb
index 6268546..1dd1856 100644
--- a/tests/browser/features/support/modules/url_module.rb
+++ b/tests/browser/features/support/modules/url_module.rb
@@ -1,9 +1,9 @@
module URL
def self.url(name)
- if ENV['MEDIAWIKI_URL']
- mediawiki_url = ENV['MEDIAWIKI_URL']
+ if ENV["MEDIAWIKI_URL"]
+ mediawiki_url = ENV["MEDIAWIKI_URL"]
else
- mediawiki_url = 'http://en.wikipedia.beta.wmflabs.org/wiki/'
+ mediawiki_url = "http://en.wikipedia.beta.wmflabs.org/wiki/"
end
"#{mediawiki_url}#{name}"
end
diff --git a/tests/browser/features/support/pages/flow_page.rb
b/tests/browser/features/support/pages/flow_page.rb
index e0f5c2d..8074f17 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -1,17 +1,17 @@
-require 'page-object'
+require "page-object"
class FlowPage
include PageObject
include URL
# MEDIAWIKI_URL must have this in $wgFlowOccupyPages array or
$wgFlowOccupyNamespaces.
- page_url URL.url('Talk:Flow_QA')
+ page_url URL.url("Talk:Flow_QA")
- span(:author_link, class: 'flow-creator-simple')
- a(:talk_link, text: 'Talk')
- a(:contrib_link, text: 'contribs')
- text_field(:new_topic_title, name: 'topic_list[topic]')
- text_area(:new_topic_body, class: 'flow-newtopic-content')
- button(:new_topic_save, class: 'flow-newtopic-submit')
- div(:flow_body, class: 'flow-container')
+ span(:author_link, class: "flow-creator-simple")
+ a(:talk_link, text: "Talk")
+ a(:contrib_link, text: "contribs")
+ text_field(:new_topic_title, name: "topic_list[topic]")
+ text_area(:new_topic_body, class: "flow-newtopic-content")
+ button(:new_topic_save, class: "flow-newtopic-submit")
+ div(:flow_body, class: "flow-container")
end
diff --git a/tests/browser/features/support/pages/login_page.rb
b/tests/browser/features/support/pages/login_page.rb
index 6890050..e4179e4 100644
--- a/tests/browser/features/support/pages/login_page.rb
+++ b/tests/browser/features/support/pages/login_page.rb
@@ -2,18 +2,18 @@
include PageObject
include URL
- page_url URL.url('Special:UserLogin')
+ page_url URL.url("Special:UserLogin")
- div(:feedback, class: 'errorbox')
- button(:login, id: 'wpLoginAttempt')
- text_field(:password, id: 'wpPassword1')
- a(:password_strength, text: 'password strength')
- a(:phishing, text: 'phishing')
- text_field(:username, id: 'wpName1')
+ div(:feedback, class: "errorbox")
+ button(:login, id: "wpLoginAttempt")
+ text_field(:password, id: "wpPassword1")
+ a(:password_strength, text: "password strength")
+ a(:phishing, text: "phishing")
+ text_field(:username, id: "wpName1")
a(:username_displayed, title: /Your user page/)
def logged_in_as_element
- @browser.div(id: 'mw-content-text').p.b
+ @browser.div(id: "mw-content-text").p.b
end
def login_with(username, password)
self.username = username
--
To view, visit https://gerrit.wikimedia.org/r/97762
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c22158ad80e0c99e6cf74a2fb140458a1c3d538
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mayankmadan <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits