[MediaWiki-commits] [Gerrit] QA: alphabetize steps properly - change (mediawiki...Flow)

2014-10-15 Thread Cmcmahon (Code Review)
Cmcmahon has submitted this change and it was merged.

Change subject: QA: alphabetize steps properly
..


QA: alphabetize steps properly

This is an interim step. The next move is to update all the
assertions to use modern RSpec syntax.

Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958
---
M tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
1 file changed, 29 insertions(+), 29 deletions(-)

Approvals:
  Cmcmahon: Looks good to me, approved



diff --git 
a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb 
b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
index c6f3da0..fbc482d 100644
--- a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
+++ b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
@@ -1,10 +1,3 @@
-Given(/^the top post has been locked$/) do
-  step 'I click the Topic Actions link'
-  step 'I click the Lock topic button'
-  step 'I type "This is a bikeshed" as the reason'
-  step 'I submit the lock/unlock topic form'
-end
-
 Given(/^I click the Lock topic button$/) do
   on(FlowPage).topic_lock_button_element.when_present.click
 end
@@ -13,12 +6,11 @@
   on(FlowPage).topic_unlock_button_element.when_present.click
 end
 
-When(/^I type "(.*?)" as the reason$/) do |reason|
-  on(FlowPage).topic_lock_form_reason_element.when_present.clear()
-  # Focus textarea so that any menus that have been clicked lose their focus. 
In Chrome these might disrupt the test as
-  # elements may be masked and not clickable.
-  on(FlowPage).topic_lock_form_reason_element.click
-  on(FlowPage).topic_lock_form_reason_element.send_keys(reason)
+Given(/^the top post has been locked$/) do
+  step 'I click the Topic Actions link'
+  step 'I click the Lock topic button'
+  step 'I type "This is a bikeshed" as the reason'
+  step 'I submit the lock/unlock topic form'
 end
 
 When(/^I cancel the lock\/unlock topic form$/) do
@@ -32,31 +24,39 @@
   end
 end
 
-Then(/^the top post is a locked discussion$/) do
-  on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should 
be_visible
-end
-
-Then(/^the top post is an open discussion$/) do
-  on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present
-end
-
-Then(/^the reason of the first topic is "(.*?)"$/) do |text|
-  on(FlowPage).flow_reason_element.text.should match text
-end
-
-Then(/^I expand the top post$/) do
-  on(FlowPage).flow_first_topic_heading_element.when_present.click
+When(/^I type "(.*?)" as the reason$/) do |reason|
+  on(FlowPage).topic_lock_form_reason_element.when_present.clear()
+  # Focus textarea so that any menus that have been clicked lose their focus. 
In Chrome these might disrupt the test as
+  # elements may be masked and not clickable.
+  on(FlowPage).topic_lock_form_reason_element.click
+  on(FlowPage).topic_lock_form_reason_element.send_keys(reason)
 end
 
 Then(/^I do not see the lock\/unlock form$/) do
   on(FlowPage).topic_lock_form_element.when_not_present
 end
 
-Then(/^the original message for the top post has no reply link$/) do
-  on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist
+
+Then(/^I expand the top post$/) do
+  on(FlowPage).flow_first_topic_heading_element.when_present.click
 end
 
 Then(/the original message for the top post has no edit link$/) do
   on(FlowPage).flow_first_topic_original_post_edit_element.should_not exist
 end
 
+Then(/^the original message for the top post has no reply link$/) do
+  on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist
+end
+
+Then(/^the reason of the first topic is "(.*?)"$/) do |text|
+  on(FlowPage).flow_reason_element.text.should match text
+end
+
+Then(/^the top post is a locked discussion$/) do
+  on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should 
be_visible
+end
+
+Then(/^the top post is an open discussion$/) do
+  on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present
+end
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] QA: alphabetize steps properly - change (mediawiki...Flow)

2014-10-15 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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

Change subject: QA: alphabetize steps properly
..

QA: alphabetize steps properly

This is an interim step. The next move is to update all the
assertions to use modern RSpec syntax.

Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958
---
M tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
1 file changed, 29 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/63/166763/1

diff --git 
a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb 
b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
index c6f3da0..fbc482d 100644
--- a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
+++ b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
@@ -1,10 +1,3 @@
-Given(/^the top post has been locked$/) do
-  step 'I click the Topic Actions link'
-  step 'I click the Lock topic button'
-  step 'I type "This is a bikeshed" as the reason'
-  step 'I submit the lock/unlock topic form'
-end
-
 Given(/^I click the Lock topic button$/) do
   on(FlowPage).topic_lock_button_element.when_present.click
 end
@@ -13,12 +6,11 @@
   on(FlowPage).topic_unlock_button_element.when_present.click
 end
 
-When(/^I type "(.*?)" as the reason$/) do |reason|
-  on(FlowPage).topic_lock_form_reason_element.when_present.clear()
-  # Focus textarea so that any menus that have been clicked lose their focus. 
In Chrome these might disrupt the test as
-  # elements may be masked and not clickable.
-  on(FlowPage).topic_lock_form_reason_element.click
-  on(FlowPage).topic_lock_form_reason_element.send_keys(reason)
+Given(/^the top post has been locked$/) do
+  step 'I click the Topic Actions link'
+  step 'I click the Lock topic button'
+  step 'I type "This is a bikeshed" as the reason'
+  step 'I submit the lock/unlock topic form'
 end
 
 When(/^I cancel the lock\/unlock topic form$/) do
@@ -32,31 +24,39 @@
   end
 end
 
-Then(/^the top post is a locked discussion$/) do
-  on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should 
be_visible
-end
-
-Then(/^the top post is an open discussion$/) do
-  on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present
-end
-
-Then(/^the reason of the first topic is "(.*?)"$/) do |text|
-  on(FlowPage).flow_reason_element.text.should match text
-end
-
-Then(/^I expand the top post$/) do
-  on(FlowPage).flow_first_topic_heading_element.when_present.click
+When(/^I type "(.*?)" as the reason$/) do |reason|
+  on(FlowPage).topic_lock_form_reason_element.when_present.clear()
+  # Focus textarea so that any menus that have been clicked lose their focus. 
In Chrome these might disrupt the test as
+  # elements may be masked and not clickable.
+  on(FlowPage).topic_lock_form_reason_element.click
+  on(FlowPage).topic_lock_form_reason_element.send_keys(reason)
 end
 
 Then(/^I do not see the lock\/unlock form$/) do
   on(FlowPage).topic_lock_form_element.when_not_present
 end
 
-Then(/^the original message for the top post has no reply link$/) do
-  on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist
+
+Then(/^I expand the top post$/) do
+  on(FlowPage).flow_first_topic_heading_element.when_present.click
 end
 
 Then(/the original message for the top post has no edit link$/) do
   on(FlowPage).flow_first_topic_original_post_edit_element.should_not exist
 end
 
+Then(/^the original message for the top post has no reply link$/) do
+  on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist
+end
+
+Then(/^the reason of the first topic is "(.*?)"$/) do |text|
+  on(FlowPage).flow_reason_element.text.should match text
+end
+
+Then(/^the top post is a locked discussion$/) do
+  on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should 
be_visible
+end
+
+Then(/^the top post is an open discussion$/) do
+  on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present
+end
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 

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