Merge "QA: updates to edit test ported from qa/browsertests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 3 Jul 2014 15:15:42 +0000 (15:15 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 3 Jul 2014 15:15:42 +0000 (15:15 +0000)
tests/browser/features/edit_page.feature
tests/browser/features/step_definitions/edit_page_steps.rb
tests/browser/features/support/pages/edit_page.rb

index 8c089ad..c190a78 100644 (file)
@@ -5,5 +5,7 @@ Feature: Edit Page
     Given I go to the "Editing Test Page" page with content "This is a page to test editing"
     When I click Edit
       And I edit the page with "Edited and a random string"
+      And I click Preview
+      And I click Show Changes
       And I save the edit
     Then the edited page content should contain "Edited and a random string"
index 5af097b..5ab02be 100644 (file)
@@ -2,6 +2,14 @@ When(/^I click Edit$/) do
   on(MainPage).edit_link
 end
 
+When(/^I click Preview$/) do
+  on(EditPage).preview_button
+end
+
+When(/^I click Show Changes$/) do
+  on(EditPage).show_changes_button
+end
+
 When(/^I edit the page with "(.*?)"$/) do |edit_content|
   on(EditPage).edit_page_content_element.send_keys(edit_content + @random_string)
 end
index 594ac73..b619c34 100644 (file)
@@ -2,6 +2,7 @@ class EditPage
   include PageObject
 
   text_area(:edit_page_content, id: "wpTextbox1")
+  button(:preview_button, id: "wpPreview")
+  button(:show_changes_button, id: "wpDiff")
   button(:save_button, id: "wpSave")
-
 end
\ No newline at end of file