Rachel99 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79017
Change subject: WIP continuing Headings test, scenarios for choose heading and
choose sub-heading 1
......................................................................
WIP continuing Headings test, scenarios for choose heading and choose
sub-heading 1
Change-Id: I383ee621e1808b046a8e2995a041b4131aad733b
---
A features/step_definitions/visual_editor_headings_steps.rb
M features/support/pages/visual_editor_page.rb
A features/visual_editor_headings.feature
3 files changed, 88 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests
refs/changes/17/79017/1
diff --git a/features/step_definitions/visual_editor_headings_steps.rb
b/features/step_definitions/visual_editor_headings_steps.rb
new file mode 100644
index 0000000..a48a32f
--- /dev/null
+++ b/features/step_definitions/visual_editor_headings_steps.rb
@@ -0,0 +1,45 @@
+When(/^I click the Headings pull\-down menu$/) do
+ on(VisualEditorPage).ve_heading_menu_element.when_present.click
+ end
+
+Given(/^I can see the Headings interface$/) do
+ on(VisualEditorPage).ve_heading_ui.should match Regexp.escape('Paragraph')
+end
+
+When(/^I click the down arrow$/) do
+ on(VisualEditorPage).downarrow_element.when_present.click
+end
+
+When(/^I click Paragraph$/) do
+ on(VisualEditorPage).paragraph_element.when_present.click
+end
+
+Then(/^a paragraph should appear in the diff view$/) do
+ on(VisualEditorPage) do |page|
+ page.wait_until(10) do
+ page.paragraph_diff_view.include? 'Editing '
+ end
+ page.paragraph_diff_view.should match Regexp.escape('Editing with ')
+ end
+end
+
+When(/^I click Heading$/) do
+ on(VisualEditorPage).heading_element.when_present.click
+end
+
+Then(/^a heading should appear in the diff view$/) do
+ on(VisualEditorPage) do |page|
+ page.wait_until(10) do
+ page.heading_diff_view.include? '==Editing '
+ end
+ page.heading_diff_view.should match Regexp.escape('==Editing with ')
+ end
+end
+
+When(/^I click Sub\-Heading (\d+)$/) do |arg1|
+ pending # express the regexp above with the code you wish you had
+end
+
+Then(/^a sub\-heading (\d+) appears in the diff view$/) do |arg1|
+ pending # express the regexp above with the code you wish you had
+end
diff --git a/features/support/pages/visual_editor_page.rb
b/features/support/pages/visual_editor_page.rb
index 282f7c0..ee4a582 100644
--- a/features/support/pages/visual_editor_page.rb
+++ b/features/support/pages/visual_editor_page.rb
@@ -9,8 +9,10 @@
text_area(:describe_change, id:
've-init-mw-viewPageTarget-saveDialog-editSummary')
div(:diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer')
a(:edit_ve, text: 'Edit')
+ div(:heading_diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer')
div(:insert_references, class: 've-ui-window-title')
div(:internal_diff_view, class:
've-init-mw-viewPageTarget-saveDialog-viewer')
+ div(:paragraph_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')
@@ -22,6 +24,7 @@
span(:save_page, class: 've-ui-labeledElement-label', text: 'Save page')
span(:second_save_page, class: 've-ui-labeledElement-label', text: 'Save
page', index: 1)
span(:ve_link_icon, class: 've-ui-buttonTool-icon ve-ui-icon-link')
+ div(:ve_heading_menu, class: 've-ui-dropdownTool-icon ve-ui-icon-down')
span(:ve_references, class: 've-ui-buttonTool-icon ve-ui-icon-reference')
div(:visual_editor_toolbar, class: 've-ui-toolbar-tools')
span(:transclusion, class: 've-ui-buttonTool-icon ve-ui-icon-template')
@@ -32,12 +35,15 @@
span(:apply_changes, text: 'Apply changes', frame: frame)
text_field(:content_box, index: 0, frame: frame)
span(:create_new, text:'Insert reference', frame: frame)
+ div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down')
+ span(:heading, text: 'Heading')
div(:insert_reference, class: 've-ui-widget ve-ui-flaggableElement-primary
ve-ui-buttonWidget ve-ui-window-applyButton', frame: frame)
a(:leftarrowclose, class: 've-ui-widget ve-ui-iconButtonWidget
ve-ui-icon-previous ve-ui-inspector-closeButton', frame: frame)
span(:internal_linksuggestion, text: 'Main Page')
span(:linksuggestion, text: 'http://www.example.com')
span(:newpage_linksuggestion, text: 'DoesNotExist')
text_field(:parameter_box, index: 0, frame: frame)
+ span(:paragraph, text: 'Paragraph')
div(:ref_body, class:'ve-ui-window-head', frame: frame)
div(:ve_link_ui, class: 've-ui-window-head', frame: frame)
span(:remove_parameter, text: 'Remove parameter', frame: frame)
@@ -46,5 +52,6 @@
list_item(:template_list_item, text: 'S', frame: frame)
div(:title, class: 've-ui-window-title', frame: frame)
text_area(:transclusion_textarea, index: 0, frame: frame)
+ span(:ve_heading_ui, text: 'Paragraph')
end
end
diff --git a/features/visual_editor_headings.feature
b/features/visual_editor_headings.feature
new file mode 100644
index 0000000..60a8cfc
--- /dev/null
+++ b/features/visual_editor_headings.feature
@@ -0,0 +1,36 @@
+@ie6-bug @ie7-bug @ie8-bug @ie9-bug @ie10-bug @test2.wikipedia.org @login
+Feature: VisualEditor Headings
+
+ Background:
+ Given I am logged in
+ And I am at my user page
+ When I click Edit for VisualEditor
+ And I click the Headings pull-down menu
+
+ Scenario: Choose Paragraph
+ Given I can see the Headings interface
+ When I edit the page with a string
+ And I click the down arrow
+ And I click Paragraph
+ And I click Save page
+ And I click Review your changes
+ Then a paragraph should appear in the diff view
+
+ Scenario: Choose Heading
+ Given I can see the Headings interface
+ When I edit the page with a string
+ And I click the down arrow
+ And I click Heading
+ And I click Save page
+ And I click Review your changes
+ Then a heading should appear in the diff view
+
+ Scenario: Choose Sub-Heading 1
+ Given I can see the Headings inteface
+ When I edit the page with a string
+ And I click the down arrow
+ And I click Sub-Heading 1
+ And I click Save page
+ And I click Review your changes
+ Then a sub-heading 1 appears in the diff view
+
--
To view, visit https://gerrit.wikimedia.org/r/79017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I383ee621e1808b046a8e2995a041b4131aad733b
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Rachel99 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits