Cmcmahon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83199


Change subject: keep parity with /VisualEditor/modules/ve-mw/test/browser/ for 
now
......................................................................

keep parity with /VisualEditor/modules/ve-mw/test/browser/ for now

Change-Id: I882d9b7fb6ac9886b73904638fefb52ac43089bf
---
M features/step_definitions/visual_editor_headings_steps.rb
M features/step_definitions/visual_editor_references_steps.rb
M features/step_definitions/visual_editor_steps.rb
M features/step_definitions/visual_editor_transclusion_steps.rb
M features/support/pages/visual_editor_page.rb
M features/visual_editor_headings.feature
M features/visual_editor_references.feature
M features/visual_editor_transclusion.feature
8 files changed, 31 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/99/83199/1

diff --git a/features/step_definitions/visual_editor_headings_steps.rb 
b/features/step_definitions/visual_editor_headings_steps.rb
index ec5f764..09304fc 100644
--- a/features/step_definitions/visual_editor_headings_steps.rb
+++ b/features/step_definitions/visual_editor_headings_steps.rb
@@ -11,7 +11,7 @@
     page.wait_until(10) do
       page.paragraph_diff_view.include? 'Editing '
     end
-    page.paragraph_diff_view.should match Regexp.escape('Editing with ')
+    page.paragraph_diff_view.should match Regexp.new(/^Editing with /)
   end
 end
 
@@ -28,7 +28,7 @@
     page.wait_until(10) do
       page.heading_diff_view.include? '==Editing '
     end
-    page.heading_diff_view.should match Regexp.escape('==Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^==Editing with /)
   end
 end
 
@@ -41,7 +41,7 @@
     page.wait_until(10) do
       page.heading_diff_view.include? '===Editing '
     end
-    page.heading_diff_view.should match Regexp.escape('===Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^===Editing with /)
   end
 end
 
@@ -54,7 +54,7 @@
     page.wait_until(10) do
      page.heading_diff_view.include? '====Editing '
     end
-    page.heading_diff_view.should match Regexp.escape('====Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^====Editing with /)
   end
 end
 
@@ -67,7 +67,7 @@
     page.wait_until(10) do
       page.heading_diff_view.include? '=====Editing '
     end
-    page.heading_diff_view.should match Regexp.escape('=====Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^=====Editing with /)
   end
 end
 
@@ -80,7 +80,7 @@
     page.wait_until(10) do
       page.heading_diff_view.include? '======Editing '
     end
-    page.heading_diff_view.should match Regexp.escape('======Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^======Editing with /)
   end
 end
 
@@ -93,7 +93,7 @@
     page.wait_until(10) do
       page.heading_diff_view.include? ' Editing '
     end
-    page.heading_diff_view.should match Regexp.escape(' Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^ Editing with /)
   end
 end
 
@@ -106,6 +106,6 @@
     page.wait_until(10) do
       page.heading_diff_view.include? '=Editing '
     end
-    page.heading_diff_view.should match Regexp.escape('=Editing with ')
+    page.heading_diff_view.should match Regexp.new(/^=Editing with /)
   end
 end
diff --git a/features/step_definitions/visual_editor_references_steps.rb 
b/features/step_definitions/visual_editor_references_steps.rb
index c61eff7..79f3a88 100644
--- a/features/step_definitions/visual_editor_references_steps.rb
+++ b/features/step_definitions/visual_editor_references_steps.rb
@@ -12,7 +12,10 @@
 end
 
 When(/^I click Reference$/) do
-  on(VisualEditorPage).ve_references_element.when_present.click
+  on(VisualEditorPage) do |page|
+    page.more_menu_element.when_present.click
+    page.ve_references_element.when_present.click
+  end
 end
 
 When(/^I enter (.+) into Content box$/) do |content|
@@ -24,7 +27,6 @@
   on(VisualEditorPage).insert_reference_element.should be_visible
 end
 
-Then(/^link to references dialog should be visible$/) do
-  on(VisualEditorPage).refs_link_element.should be_visible
-end
-
+Then(/^link to More menu should be visible$/) do
+  on(VisualEditorPage).more_menu_element.should be_visible
+end
\ No newline at end of file
diff --git a/features/step_definitions/visual_editor_steps.rb 
b/features/step_definitions/visual_editor_steps.rb
index 5f798d5..d440205 100644
--- a/features/step_definitions/visual_editor_steps.rb
+++ b/features/step_definitions/visual_editor_steps.rb
@@ -63,4 +63,4 @@
 
 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
+end
diff --git a/features/step_definitions/visual_editor_transclusion_steps.rb 
b/features/step_definitions/visual_editor_transclusion_steps.rb
index 437f65e..df2dad9 100644
--- a/features/step_definitions/visual_editor_transclusion_steps.rb
+++ b/features/step_definitions/visual_editor_transclusion_steps.rb
@@ -15,11 +15,14 @@
 end
 
 When(/^I click Transclusion$/) do
-  on(VisualEditorPage).transclusion_element.when_present.click
+  on(VisualEditorPage) do |page|
+    page.more_menu_element.when_present.click
+    page.transclusion_element.when_present.click
+  end
 end
 
 When(/^I enter (.+) in the parameter box$/) do |param_value|
-  on(VisualEditorPage) do |page| 
+  on(VisualEditorPage) do |page|
       page.parameter_box_element.when_present
       page.parameter_box=param_value
   end
@@ -42,4 +45,4 @@
 
 Then(/^I should see the Apply changes button$/) do
   on(VisualEditorPage).apply_changes_element.when_present.should be_visible
-end
\ No newline at end of file
+end
diff --git a/features/support/pages/visual_editor_page.rb 
b/features/support/pages/visual_editor_page.rb
index c4b91e1..cd8ee22 100644
--- a/features/support/pages/visual_editor_page.rb
+++ b/features/support/pages/visual_editor_page.rb
@@ -8,7 +8,7 @@
   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')
+  span(:downarrow, class: 've-ui-iconedElement-icon ve-ui-icon-down')
   span(:heading, text: 'Heading')
   a(:edit_ve, title: 'Edit this page with VisualEditor [alt-shift-v]')
   div(:heading_diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer')
@@ -19,13 +19,14 @@
   span(:linksuggestion, text: 'http://www.example.com')
   span(:looks_good, class: 've-ui-labeledElement-label', text: 'Looks good to 
me')
   checkbox(:minor_edit, id: 'wpMinoredit')
+  span(:more_menu, text: 'More')
   span(:newpage_linksuggestion, text: 'DoesNotExist')
   div(:page_text, id: 'mw-content-text')
   span(:page_title, text: 'Page title')
   div(:paragraph_diff_view, class: 
've-init-mw-viewPageTarget-saveDialog-viewer')
   span(:paragraph, text: 'Paragraph')
   span(:preformatted, text: 'Preformatted')
-  a(:refs_link, title: 'Reference')
+  span(:refs_link, text: 'Reference')
   span(:return_to_save, class: 've-ui-labeledElement-label', text: 'Return to 
save form')
   span(:review_changes, class: 've-ui-labeledElement-label', text: 'Review 
your changes')
   div(:save_disabled, class: 've-ui-widget ve-ui-widget-disabled 
ve-ui-flaggableElement-constructive ve-ui-buttonWidget')
@@ -38,10 +39,10 @@
   div(:uparrow, class:'ve-init-mw-viewPageTarget-saveDialog-closeButton')
   div(:ve_heading_menu, class: 've-ui-dropdownTool-icon ve-ui-icon-down')
   span(:ve_heading_ui, text: 'Paragraph')
-  span(:ve_link_icon, class: 've-ui-buttonTool-icon ve-ui-icon-link')
-  span(:ve_references, class: 've-ui-buttonTool-icon ve-ui-icon-reference')
+  span(:ve_link_icon, class: 've-ui-iconedElement-icon ve-ui-icon-link')
+  span(:ve_references, text: 'Reference')
   div(:visual_editor_toolbar, class: 've-ui-toolbar-tools')
-  span(:transclusion, class: 've-ui-buttonTool-icon ve-ui-icon-template')
+  span(:transclusion, text: 'Transclusion')
 
   in_frame(:index => 0) do |frame|
     span(:add_parameter, class: 've-ui-mwParameterResultWidget-name', frame: 
frame)
diff --git a/features/visual_editor_headings.feature 
b/features/visual_editor_headings.feature
index 48c1caa..1d4c41c 100644
--- a/features/visual_editor_headings.feature
+++ b/features/visual_editor_headings.feature
@@ -71,40 +71,4 @@
     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
-
-  Scenario: Choose Subheading1 Heading
-    When 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 Heading
-    When 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
-
-  Scenario: Choose Sub-Heading3 Heading
-    When 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
-
-  Scenario: Choose Sub-Heading4 Heading
-    When 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
-
-  Scenario: Choose Preformatted Heading
-    When I click Preformatted
-      And I click Save page
-      And I click Review your changes
-    Then a Preformatted should appear in the diff view
-
-  Scenario: Choose Page title Heading
-    When 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
\ No newline at end of file
diff --git a/features/visual_editor_references.feature 
b/features/visual_editor_references.feature
index 200a38a..ad5fc74 100644
--- a/features/visual_editor_references.feature
+++ b/features/visual_editor_references.feature
@@ -11,4 +11,4 @@
     Given I can see the References User Interface
     When I enter THIS IS CONTENT into Content box
       And I click Insert reference
-    Then link to references dialog should be visible
+    Then link to More menu should be visible
diff --git a/features/visual_editor_transclusion.feature 
b/features/visual_editor_transclusion.feature
index 473bd9f..be1f575 100644
--- a/features/visual_editor_transclusion.feature
+++ b/features/visual_editor_transclusion.feature
@@ -12,7 +12,7 @@
     When I enter S into Content box
     Then I should see a list of template suggestions
       And I should be able to click the Add template button
-  
+
   Scenario: Add parameter to template
     Given I can see the Transclusion User Interface
       And I enter S into Content box
@@ -33,4 +33,3 @@
     When I click Remove parameter
       And I click Remove template
     Then I should not be able to see parameter named S
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I882d9b7fb6ac9886b73904638fefb52ac43089bf
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to