Change-Id: I2ceae6ee6f98df78c12d257fd6503f5bf6395284
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"
+ Then the edited page content should contain "Edited and a random string"
\ No newline at end of file
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
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