From 4d036f6fe1161357e41846c2cdd719b40f959c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljko=20Filipin?= Date: Thu, 2 Oct 2014 15:34:04 +0200 Subject: [PATCH] [BrowserTest] Fixed language screenshot scenario VisualEditor no longer has cancel button. Change-Id: Ia06469c23cc527ae87170d6aa5b9066fbc9933a6 Paired-With: Amir Aharoni --- .../tests/browser/features/language_screenshot.feature | 4 ++-- .../features/step_definitions/language_screenshot_steps.rb | 6 +++--- .../browser/features/support/pages/visual_editor_page.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ve-mw/tests/browser/features/language_screenshot.feature b/modules/ve-mw/tests/browser/features/language_screenshot.feature index d449fd14f8..7aad93486e 100644 --- a/modules/ve-mw/tests/browser/features/language_screenshot.feature +++ b/modules/ve-mw/tests/browser/features/language_screenshot.feature @@ -139,10 +139,10 @@ Feature: Language Screenshot Then I should see the formula insertion menu @language_screenshot - Scenario: VisualEditor_cancel_save + Scenario: VisualEditor_toolbar_actions Given I am logged in When I am edit language screenshot page with Testing toolbar - Then I should see VisualEditor toolbar containing cancel and save button + Then I should see action buttons in the end of the VisualEditor toolbar @language_screenshot Scenario: VisualEditor_references_list 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 28e7d98d68..ebc0b18e78 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 @@ -274,12 +274,12 @@ Then(/^I should see the formula insertion menu$/) do capture_screenshot("#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.iframe_element, @current_page.formula_image_element], nil, 0) end -Then(/^I should see VisualEditor toolbar containing cancel and save button$/) do +Then(/^I should see action buttons in the end of the VisualEditor toolbar$/) do on(VisualEditorPage) do |page| - page.toolbar_action_element.when_present.should be_visible + page.toolbar_actions_element.when_present.should be_visible page.save_enabled_element.when_present(10).should be_visible end - capture_screenshot("#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.toolbar_action_element]) + capture_screenshot("#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.toolbar_actions_element]) end Then(/^I should see References list dialog box$/) do 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 dfa531666d..6824e3a01a 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 @@ -87,7 +87,7 @@ class VisualEditorPage a(:internal_link, class: "ve-ce-linkAnnotation ve-ce-mwInternalLinkAnnotation") unordered_list(:popup_icon, class: "ve-ui-context-menu") span(:basic_reference, class: "oo-ui-iconElement-icon oo-ui-icon-reference") - div(:toolbar_action, class: "oo-ui-toolbar-actions") + div(:toolbar_actions, class: "oo-ui-toolbar-actions") span(:media_insert_menu, class: "oo-ui-tool-name-media") span(:template_insert_menu, class: "oo-ui-tool-name-transclusion") span(:ref_list_insert_menu, class: "oo-ui-tool-name-referencesList")