jenkins-bot has submitted this change and it was merged.
Change subject: [browser test] add a test to edit with utf8 strings
......................................................................
[browser test] add a test to edit with utf8 strings
Change-Id: I88e475ee98bc8f696c1a1d0ad108c12a48fe7eee
---
A modules/ve-mw/test/browser/features/edit_utf8_logged_in.feature
D modules/ve-mw/test/browser/features/logged_in.feature
M modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb
3 files changed, 27 insertions(+), 19 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/test/browser/features/edit_utf8_logged_in.feature
b/modules/ve-mw/test/browser/features/edit_utf8_logged_in.feature
new file mode 100644
index 0000000..596bebc
--- /dev/null
+++ b/modules/ve-mw/test/browser/features/edit_utf8_logged_in.feature
@@ -0,0 +1,23 @@
+@ie6-bug @ie7-bug @ie8-bug @ie9-bug @ie10-bug @en.wikipedia.beta.wmflabs.org
@test2.wikipedia.org @login
+Feature: VisualEditor
+
+ Background:
+ Given I am logged in
+ And I am at my user page
+
+ Scenario Outline: Edit with strings
+ When I edit the page with <input_string>
+ And I click Save page
+ And I click 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 <output_string>
+ Examples:
+ | input_string | output_string |
+ | Editing with | Editing with |
+ | Editing with ÀÈÌÒÙ | Editing with ÀÈÌÒÙ |
+ | Editing with ÄËÏÖÜ | Editing with ÄËÏÖÜ |
+ | Editing with ÂÊÎÔÛ | Editing with ÂÊÎÔÛ |
+ | Editing with áéíóú | Editing with áéíóú |
diff --git a/modules/ve-mw/test/browser/features/logged_in.feature
b/modules/ve-mw/test/browser/features/logged_in.feature
deleted file mode 100644
index 084f73a..0000000
--- a/modules/ve-mw/test/browser/features/logged_in.feature
+++ /dev/null
@@ -1,15 +0,0 @@
-@ie6-bug @ie7-bug @ie8-bug @ie9-bug @ie10-bug @en.wikipedia.beta.wmflabs.org
@test2.wikipedia.org
-Feature: VisualEditor
-
- @login
- Scenario: Basic edit
- Given I am logged in
- And I am at my user page
- When I edit the page with a string
- And I click Save page
- And I click 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
diff --git
a/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb
b/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb
index eb2cb9c..6f58938 100644
--- a/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb
+++ b/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb
@@ -35,7 +35,7 @@
on(VisualEditorPage).minor_edit_element.should_not be_visible
end
-When(/^I edit the page with a string$/) do
+When(/^I edit the page with (.+)$/) do |input_string|
on(VisualEditorPage) do |page|
page.edit_ve_element.when_present.click
#This begin/rescue clause dismisses the VE warning message when it exists,
and does not fail when it does not exist
@@ -44,7 +44,7 @@
rescue
end
page.content_element.fire_event('onfocus')
- page.content_element.when_present.send_keys("Editing with
#{@random_string}")
+ page.content_element.when_present.send_keys(input_string + "
#{@random_string} ")
end
end
@@ -67,6 +67,6 @@
on(VisualEditorPage).ip_warning.should match Regexp.escape("Your IP address")
end
-Then(/^Page text should contain the string$/) do
- on(VisualEditorPage).page_text_element.when_present.text.should match
Regexp.escape("Editing with #{@random_string}")
+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
--
To view, visit https://gerrit.wikimedia.org/r/93597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I88e475ee98bc8f696c1a1d0ad108c12a48fe7eee
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits