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

Change subject: [BrowserTest] interim step, no functional change
......................................................................


[BrowserTest] interim step, no functional change

Change-Id: I3a7787c4ab9206c70f0f64b6c0986ae93ddb3d84
---
M modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb
1 file changed, 38 insertions(+), 43 deletions(-)

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



diff --git 
a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb 
b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb
index 34d266f..61d56cd 100644
--- a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb
+++ b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb
@@ -1,19 +1,6 @@
-Given(/^I go to the browser specific edit page page$/) do
-  page_title = "Edit page for " + ENV['BROWSER']
-  page_content = "Edit page for " + ENV['BROWSER']
-  on(APIPage).create page_title, page_content
-  step "I am on the #{page_title} page"
-end
-
 Given(/^I am on the (.+) page$/) do |article|
   article = article.gsub(/ /, '_')
   visit(ZtargetPage, :using_params => {:article_name => article})
-end
-
-Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, 
page_content|
-  @wikitext = page_content
-  on(APIPage).create page_title, page_content
-  step "I am on the #{page_title} page"
 end
 
 Given(/^I click in the editable part$/) do
@@ -21,6 +8,19 @@
     page.content_element.when_present.fire_event("onfocus")
     page.content_element.send_keys("")
   end
+end
+
+Given(/^I go to the browser specific edit page page$/) do
+  page_title = "Edit page for " + ENV['BROWSER']
+  page_content = "Edit page for " + ENV['BROWSER']
+  on(APIPage).create page_title, page_content
+  step "I am on the #{page_title} page"
+end
+
+Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, 
page_content|
+  @wikitext = page_content
+  on(APIPage).create page_title, page_content
+  step "I am on the #{page_title} page"
 end
 
 Given(/^I make the text "(.*?)" be selected$/) do |select_text|
@@ -37,13 +37,6 @@
   end
 end
 
-When(/^I click Review and Save$/) do
-  on(VisualEditorPage) do |page|
-    page.container_disabled_element.when_not_visible.should_not exist
-    page.review_and_save_element.when_visible.click
-  end
-end
-
 When(/^I click Looks good to me$/) do
   on(VisualEditorPage) do |page|
     page.diff_view_element.when_visible.should be_visible
@@ -51,9 +44,23 @@
   end
 end
 
-When(/^I click This is a minor edit$/) do
-  #FIXME TEMPORARILY COMMENT THIS OUT WHILE WE FIGURE OUT WHY USERS GET LOGGED 
OUT
-  #on(VisualEditorPage).minor_edit_element.when_present(10).click
+When(/^I click Return to save form$/) do
+  on(VisualEditorPage) do |page|
+    page.diff_view_element.when_present(10)
+    page.return_to_save_element.when_present(10).click
+  end
+end
+
+When(/^I click Review and Save$/) do
+  on(VisualEditorPage) do |page|
+    page.container_disabled_element.when_not_visible.should_not exist
+    page.review_and_save_element.when_visible.click
+  end
+end
+
+When(/^I click Review your changes$/) do
+  sleep 2
+  on(VisualEditorPage).review_changes_element.when_present(10).click
 end
 
 When(/^I click Save page$/) do
@@ -74,6 +81,10 @@
   on(VisualEditorPage).minor_edit_element.should_not be_visible
 end
 
+When(/^I edit the description of the change$/) do
+  
on(VisualEditorPage).describe_change_element.when_visible.send_keys("Describing 
with #{@random_string}")
+end
+
 When(/^I edit the page with (.+)$/) do |input_string|
   on(VisualEditorPage) do |page|
     #page is loading everything twice, sleep just to make the test pass
@@ -82,36 +93,20 @@
   end
 end
 
-When(/^I click Return to save form$/) do
-  on(VisualEditorPage) do |page|
-    page.diff_view_element.when_present(10)
-    page.return_to_save_element.when_present(10).click
-  end
-end
-
-When(/^I click Review your changes$/) do
-  sleep 2
-  on(VisualEditorPage).review_changes_element.when_present(10).click
-end
-
-When(/^I edit the description of the change$/) do
-  
on(VisualEditorPage).describe_change_element.when_visible.send_keys("Describing 
with #{@random_string}")
-end
-
 When(/^I see the IP warning signs$/) do
   on(VisualEditorPage).ip_warning.should match Regexp.escape("Your IP address")
 end
 
-Then(/^Page text should contain (.+)$/) do |output_string|
-  on(VisualEditorPage).page_text_element.when_present.text.should match 
Regexp.escape(output_string + " #{@random_string}")
+Then(/^I can click Cancel save$/) do
+  on(VisualEditorPage).confirm_switch_cancel_element.when_present.click
 end
 
 Then(/^I can click the X on the save box$/) do
   on(VisualEditorPage).ex_element.when_present.click
 end
 
-Then(/^I can click Cancel save$/) do
-  on(VisualEditorPage).confirm_switch_cancel_element.when_present.click
+Then(/^Page text should contain (.+)$/) do |output_string|
+  on(VisualEditorPage).page_text_element.when_present.text.should match 
Regexp.escape(output_string + " #{@random_string}")
 end
 
 Then(/^(.+) should appear in the diff view$/) do |headings_string|

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a7787c4ab9206c70f0f64b6c0986ae93ddb3d84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to