jenkins-bot has submitted this change and it was merged.

Change subject: [BrowserTest] Update the Edit tab scenario
......................................................................


[BrowserTest] Update the Edit tab scenario

Make it clear that this scenario is supposed to test
and take screenshots of the "Edit source" and "Edit" tabs.

Change-Id: Ia480eacb2629553c378ecad52a9b0ed1336cd0f3
---
M modules/ve-mw/tests/browser/features/language_screenshot.feature
M 
modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
3 files changed, 13 insertions(+), 6 deletions(-)

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



diff --git a/modules/ve-mw/tests/browser/features/language_screenshot.feature 
b/modules/ve-mw/tests/browser/features/language_screenshot.feature
index ca22bd3..f28abe4 100644
--- a/modules/ve-mw/tests/browser/features/language_screenshot.feature
+++ b/modules/ve-mw/tests/browser/features/language_screenshot.feature
@@ -119,7 +119,8 @@
   Scenario: VisualEditor_edit_tab
     Given I am logged in
     When I go to language screenshot page
-    Then I should see the right edit tab
+    Then I should see the Edit source tab at the top of the page
+      And I should see the Edit tab at the top of the page
 
   @language_screenshot
   Scenario: VisualEditor_toolbar
diff --git 
a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
 
b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
index dbff462..9fbb245 100644
--- 
a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
+++ 
b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
@@ -371,16 +371,20 @@
   )
 end
 
-Then(/^I should see the right edit tab$/) do
+Then(/^I should see the Edit source tab at the top of the page$/) do
+  on(VisualEditorPage).edit_source_tab_element.when_present.should be_visible
+end
+
+Then(/^I should see the Edit tab at the top of the page$/) do
   on(VisualEditorPage) do |page|
-    page.right_navigation_element.when_present.should be_visible
     page.language_notification_element.when_not_present(10)
+    page.ve_edit_tab_element.when_present.should be_visible
   end
 
   Screenshot.capture(
     @browser,
     "#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png",
-    [@current_page.right_navigation_element, 
@current_page.left_navigation_element]
+    [@current_page.top_editing_tabs_element]
   )
 end
 
@@ -393,7 +397,7 @@
   Screenshot.capture(
     @browser,
     "#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png",
-    [@current_page.right_navigation_element, 
@current_page.left_navigation_element, @current_page.toolbar_element]
+    [@current_page.top_editing_tabs_element, 
@current_page.left_navigation_element, @current_page.toolbar_element]
   )
 end
 
diff --git 
a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 
b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
index 76b6797..57c82ad 100644
--- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
+++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
@@ -134,7 +134,9 @@
   span(:return_to_save, class: 'oo-ui-labelElement-label', text: 'Return to 
save form')
   a(:review_changes, css: '.oo-ui-window-content-setup > div:nth-child(3) > 
div:nth-child(1) > div:nth-child(1) > a:nth-child(1)')
   span(:review_failed, text: 'No changes to review')
-  div(:right_navigation, id: 'p-views')
+  div(:top_editing_tabs, id: 'p-views')
+  li(:ve_edit_tab, id: 'ca-ve-edit')
+  li(:edit_source_tab, id: 'ca-edit')
   a(:save_page, css: '.oo-ui-flaggedElement-progressive > a:nth-child(1)')
   div(:save_enabled, css: 'div.ve-init-mw-viewPageTarget-toolbar-actions > 
div.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled')
   a(:second_reference, text: '[1]', index: 2)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia480eacb2629553c378ecad52a9b0ed1336cd0f3
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[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

Reply via email to