Cmcmahon has submitted this change and it was merged.

Change subject: Revert "WIP  Refactor VE headings scenarios"
......................................................................


Revert "WIP  Refactor VE headings scenarios"

This reverts commit a614172462d2eec5951b89ae6ce4af1a80fde43b.

Change-Id: I56fc13106e1826a1fc2352985bd2673bba618e85
---
M features/step_definitions/page_steps.rb
M features/step_definitions/visual_editor_headings_steps.rb
M features/support/pages/visual_editor_page.rb
M features/visual_editor_headings.feature
4 files changed, 41 insertions(+), 120 deletions(-)

Approvals:
  Cmcmahon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/features/step_definitions/page_steps.rb 
b/features/step_definitions/page_steps.rb
index bac0d26..92cb91a 100644
--- a/features/step_definitions/page_steps.rb
+++ b/features/step_definitions/page_steps.rb
@@ -130,4 +130,4 @@
     page.body_content.should match(/Moved/)
     page.body_content.should_not match(/Redirect page/)
   end
-end
+end
\ No newline at end of file
diff --git a/features/step_definitions/visual_editor_headings_steps.rb 
b/features/step_definitions/visual_editor_headings_steps.rb
index ec5f764..c4e24af 100644
--- a/features/step_definitions/visual_editor_headings_steps.rb
+++ b/features/step_definitions/visual_editor_headings_steps.rb
@@ -1,4 +1,12 @@
-When(/^I click the down arrow on Headings interface$/) do
+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
 
@@ -13,10 +21,6 @@
     end
     page.paragraph_diff_view.should match Regexp.escape('Editing with ')
   end
-end
-
-Then(/^I should be able to click the up arrow on the save box$/) do
-  on(VisualEditorPage).uparrow_element.when_present.click
 end
 
 When(/^I click Heading$/) do
@@ -58,54 +62,3 @@
   end
 end
 
-When(/^I click Sub\-Heading3$/) do
-  on(VisualEditorPage).subheading3_element.when_present.click
-end
-
-Then(/^a sub\-heading3 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\-Heading4$/) do
-  on(VisualEditorPage).subheading4_element.when_present.click
-end
-
-Then(/^a sub\-heading4 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 Preformatted$/) do
-  on(VisualEditorPage).preformatted_element.when_present.click
-end
-
-Then(/^a Preformatted 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 Page title$/) do
-  on(VisualEditorPage).page_title_element.when_present.click
-end
-
-Then(/^a Page title 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
diff --git a/features/support/pages/visual_editor_page.rb 
b/features/support/pages/visual_editor_page.rb
index e6ee578..9fa0d56 100644
--- a/features/support/pages/visual_editor_page.rb
+++ b/features/support/pages/visual_editor_page.rb
@@ -8,7 +8,6 @@
   div(:content, class: 've-ce-documentNode ve-ce-branchNode')
   text_area(:describe_change, id: 
've-init-mw-viewPageTarget-saveDialog-editSummary')
   div(:diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer')
-  div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down')
   a(:edit_ve, text: 'Edit')
   div(:heading_diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer')
   div(:insert_references, class: 've-ui-window-title')
@@ -36,6 +35,7 @@
     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)
@@ -44,21 +44,16 @@
     span(:newpage_linksuggestion, text: 'DoesNotExist')
     text_field(:parameter_box, index: 0, frame: frame)
     span(:paragraph, text: 'Paragraph')
-    span(:preformatted, text: 'Preformatted')
-    span(:page_title, text: 'Page title')
     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)
     span(:remove_template, text: 'Remove template', frame: frame)
     span(:subheading1, text: 'Sub-heading 1')
     span(:subheading2, text: 'Sub-heading 2')
-    span(:subheading3, text: 'Sub-heading 3')
-    span(:subheading4, text: 'Sub-heading 4')
     unordered_list(:suggestion_list, class: 've-ui-widget ve-ui-selectWidget 
ve-ui-menuWidget ve-ui-textInputMenuWidget ve-ui-lookupWidget-menu 
ve-ui-mwTitleInputWidget-menu', frame: frame)
     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)
-    div(:uparrow, class:'ve-init-mw-viewPageTarget-saveDialog-closeButton')
     span(:ve_heading_ui, text: 'Paragraph')
   end
 end
diff --git a/features/visual_editor_headings.feature 
b/features/visual_editor_headings.feature
index 1857189..2eeb536 100644
--- a/features/visual_editor_headings.feature
+++ b/features/visual_editor_headings.feature
@@ -1,75 +1,48 @@
 @ie6-bug  @ie7-bug  @ie8-bug  @ie9-bug @ie10-bug @test2.wikipedia.org @login
 Feature: VisualEditor Headings
 
-  Background: Open VE and edit page with string
+  Background:
     Given I am logged in
       And I am at my user page
-      And I click Edit for VisualEditor
-     When I edit the page with a string
-       And I click the down arrow on Headings interface
+    When I click Edit for VisualEditor
+      And I click the Headings pull-down menu
 
-  Scenario: Choose Paragraph Heading
-    When 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 Headinge
-    When 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 Subheading1 Heading
-    When I click Sub-Heading1
+    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 sub-heading1 should appear in the diff view
+    Then a paragraph should appear in the diff view
 
-  #Scenario: Choose Sub-Heading2 Heading
+    Scenario: Choose Heading
+    Given I can see the Headings interface
     When I edit the page with a string
-    And I click the down arrow on Headings interface
+      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-Heading1
+  Given I can see the Headings interface
+  When I edit the page with a string
+    And I click the down arrow
+    And I click Sub-Heading1
+    And I click Save page
+    And I click Review your changes
+  Then a sub-heading1 should appear in the diff view
+
+  Scenario: Choose Sub-Heading2
+    Given I can see the Headings interface
+    When I edit the page with a string
+    And I click the down arrow
     And I click Sub-Heading2
     And I click Save page
     And I click Review your changes
     Then a sub-heading2 should appear in the diff view
-    And I should be able to click the up arrow on the save box
 
- # Scenario: Choose Sub-Heading3 Heading
-    When I edit the page with a string
-    And I click the down arrow on Headings interface
-    And I click Sub-Heading3
-    And I click Save page
-    And I click Review your changes
-    Then a sub-heading3 should appear in the diff view
-    And I should be able to click the up arrow on the save box
-
-  #Scenario: Choose Sub-Heading4 Heading
-    When I edit the page with a string
-    And I click the down arrow on Headings interface
-    And I click Sub-Heading4
-    And I click Save page
-    And I click Review your changes
-    Then a sub-heading4 should appear in the diff view
-    And I should be able to click the up arrow on the save box
-
- # Scenario: Choose Preformatted Heading
-    When I edit the page with a string
-    And I click the down arrow on Headings interface
-    And I click Preformatted
-    And I click Save page
-    And I click Review your changes
-    Then a Preformatted should appear in the diff view
-    And I should be able to click the up arrow on the save box
-
- # Scenario: Choose Page title Heading
-    When I edit the page with a string
-    And I click the down arrow on Headings interface
-    And I click Page title
-    And I click Save page
-    And I click Review your changes
-    Then a Page title should appear in the diff view
-    And I should be able to click the up arrow on the save box
 
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/81238
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I56fc13106e1826a1fc2352985bd2673bba618e85
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <cmcma...@wikimedia.org>
Gerrit-Reviewer: Cmcmahon <cmcma...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to