Merge "[BrowserTest] Added support for highlighting the page object elements"

This commit is contained in:
jenkins-bot 2014-08-06 14:01:51 +00:00 committed by Gerrit Code Review
commit 402a47044e
3 changed files with 22 additions and 0 deletions

View file

@ -133,6 +133,21 @@ end
Then(/^I take screenshot of insert pull-down menu$/) do
capture_screenshot("#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element])
highlight @current_page.media_insert_menu_element
capture_screenshot("VisualEditor_Media_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element], nil, 0)
highlight @current_page.media_insert_menu_element, '#FFFFFF'
highlight @current_page.template_insert_menu_element
capture_screenshot("VisualEditor_Template_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element], nil, 0)
highlight @current_page.template_insert_menu_element, '#FFFFFF'
highlight @current_page.ref_list_insert_menu_element
capture_screenshot("VisualEditor_Reference_List_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element], nil, 0)
highlight @current_page.ref_list_insert_menu_element, '#FFFFFF'
highlight @current_page.formula_insert_menu_element
capture_screenshot("VisualEditor_Formula_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element], nil, 0)
end
Then(/^I should see Special character Insertion window$/) do

View file

@ -87,3 +87,6 @@ def top_left_x_y input_rectangles
[top_left_x_coordinates(input_rectangles).min, top_left_y_coordinates(input_rectangles).min]
end
def highlight element, color='#FF00FF'
@current_page.execute_script("arguments[0].style.border = 'thick solid #{color}'", element)
end

View file

@ -79,6 +79,10 @@ 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-iconedElement-icon oo-ui-icon-reference")
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-referenceList")
span(:formula_insert_menu,class: "oo-ui-tool-name-math")
in_iframe(index: 0) do |frame|
a(:beta_warning, title: "Close", frame: frame)