Cmcmahon has submitted this change and it was merged.
Change subject: test for VE behavior for anonymous users
......................................................................
test for VE behavior for anonymous users
Change-Id: I528a5aeb4c2b63f618cc879fcd6f8c1aab94d492
---
R features/step_definitions/visual_editor_steps.rb
M features/support/pages/visual_editor_page.rb
A features/visual_editor_anon.feature
3 files changed, 24 insertions(+), 0 deletions(-)
Approvals:
Cmcmahon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/features/step_definitions/visual_editor_logged_in_steps.rb
b/features/step_definitions/visual_editor_steps.rb
similarity index 84%
rename from features/step_definitions/visual_editor_logged_in_steps.rb
rename to features/step_definitions/visual_editor_steps.rb
index 398304e..5f798d5 100644
--- a/features/step_definitions/visual_editor_logged_in_steps.rb
+++ b/features/step_definitions/visual_editor_steps.rb
@@ -31,6 +31,10 @@
on(VisualEditorPage).second_save_page_element.when_present.click
end
+When(/^I do not see This is a minor edit$/) do
+ on(VisualEditorPage).minor_edit_element.should_not be_visible
+end
+
When(/^I edit the page with a string$/) do
on(VisualEditorPage) do |page|
page.edit_ve
@@ -53,6 +57,10 @@
on(VisualEditorPage).describe_change_element.when_visible.send_keys("Describing
with #{@does_not_exist_page_name}")
end
+When(/^I see the IP warning signs$/) do
+ on(VisualEditorPage).ip_warning.should match Regexp.escape("You are not
logged in. Your IP address will be recorded in this page's edit history.")
+end
+
Then(/^Page text should contain the string$/) do
on(VisualEditorPage).page_text_element.when_present.text.should match
Regexp.escape("Editing with #{@does_not_exist_page_name}")
end
\ No newline at end of file
diff --git a/features/support/pages/visual_editor_page.rb
b/features/support/pages/visual_editor_page.rb
index c9b1d08..282f7c0 100644
--- a/features/support/pages/visual_editor_page.rb
+++ b/features/support/pages/visual_editor_page.rb
@@ -11,6 +11,7 @@
a(:edit_ve, text: 'Edit')
div(:insert_references, class: 've-ui-window-title')
div(:internal_diff_view, class:
've-init-mw-viewPageTarget-saveDialog-viewer')
+ div(:ip_warning, class:
've-init-mw-viewPageTarget-toolbar-editNotices-notice')
span(:looks_good, class: 've-ui-labeledElement-label', text: 'Looks good to
me')
checkbox(:minor_edit, id: 'wpMinoredit')
div(:page_text, id: 'mw-content-text')
diff --git a/features/visual_editor_anon.feature
b/features/visual_editor_anon.feature
new file mode 100644
index 0000000..b6d87c8
--- /dev/null
+++ b/features/visual_editor_anon.feature
@@ -0,0 +1,15 @@
+@ie6-bug @ie7-bug @ie8-bug @ie9-bug @ie10-bug @test2.wikipedia.org
+Feature: VisualEditor
+
+ @login
+ Scenario: Basic edit
+ Given I am at my user page
+ When I edit the page with a string
+ And I see the IP warning signs
+ And I click Save page
+ And I do not see This is a minor edit
+ And I click Review your changes
+ And I click Return to save form
+ And I edit the description of the change
+ And I click Save page the second time
+ Then Page text should contain the string
--
To view, visit https://gerrit.wikimedia.org/r/76833
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I528a5aeb4c2b63f618cc879fcd6f8c1aab94d492
Gerrit-PatchSet: 4
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Rachel99 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits