From 39afc66a9176e8b0bc2c073913783f8887b47b3f Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Mon, 26 Jan 2015 20:54:39 -0800 Subject: [PATCH] [BrowserTest] Shorten lines for clarity The 'I take screenshot of insert pull-down menu' step has many similar very long lines. Shortening them makes the code more understandable and conforming to the conventions. Change-Id: I83b35211a6cbfdc420895469747884f3ae864479 --- .../language_screenshot_steps.rb | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) 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 1b4ea2f54a..5d6b97d1c5 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 @@ -160,22 +160,45 @@ end Then(/^I take screenshot of insert pull-down menu$/) do step 'I click on More in insert pull-down menu' - capture_screenshot("#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element]) + 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) + 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) + 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_References_List_Insert_Menu-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", [@current_page.insert_menu_element, @current_page.insert_pull_down_element], nil, 0) + capture_screenshot( + "VisualEditor_References_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) + 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 click on More in insert pull-down menu$/) do