From 462315f16f8dfeba0a99ae284669f7db9aed3332 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Fri, 15 May 2015 15:02:34 +0300 Subject: [PATCH] [BrowserTest] Fix the lists and indentation screenshot scenario * The element's class name changed. * Zooming is removed - it was breaking the test and it's not needed anyway. * Fix another element with the same class. Change-Id: I46a867619ed49936c3868f6b1b15e773bdb6f6b1 --- .../ve-mw/tests/browser/features/language_screenshot.feature | 3 +-- .../features/step_definitions/language_screenshot_steps.rb | 4 ++-- .../browser/features/support/pages/visual_editor_page.rb | 4 ++-- 3 files changed, 5 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 12820f1b5f..e71a844976 100644 --- a/modules/ve-mw/tests/browser/features/language_screenshot.feature +++ b/modules/ve-mw/tests/browser/features/language_screenshot.feature @@ -49,8 +49,7 @@ Feature: Language Screenshot Scenario: VisualEditor_Toolbar_Lists_and_indentation Given I go to the "Indent Outdent Screenshot" page with source content "Indent Outdent Screenshot" And I make the text "Indent Outdent" be selected - When I click Bullets - And I click on list and indentation dropdown + When I click on list and indentation button Then I should see list and indentation dropdown Scenario: VisualEditor_External_link 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 f71f71f1c2..9ed4a94d86 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 @@ -60,7 +60,7 @@ When(/^I click on the Special character option in Insert menu$/) do on(VisualEditorPage).special_character_element.when_present.click end -When(/^I click on list and indentation dropdown$/) do +When(/^I click on list and indentation button$/) do on(VisualEditorPage).bullet_number_selector_element.when_present.click end @@ -305,7 +305,7 @@ end Then(/^I should see list and indentation dropdown$/) do on(VisualEditorPage).indentation_pull_down_element.when_present.should be_visible - Screenshot.zoom_browser(@browser, 3) + Screenshot.capture( @browser, "#{@scenario.name}-#{ENV['LANGUAGE_SCREENSHOT_CODE']}.png", 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 a58637cfc2..1b57801c42 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 @@ -8,7 +8,7 @@ class VisualEditorPage span(:add_template, text: 'Add template') span(:apply_changes_button, text: 'Apply changes') span(:basic_reference, class: 'oo-ui-iconElement-icon oo-ui-icon-reference') - span(:bullet_number_selector, class: 'oo-ui-iconElement-icon oo-ui-icon-bullet-list') + span(:bullet_number_selector, class: 'oo-ui-iconElement-icon oo-ui-icon-listBullet') span(:category_link, class: 'oo-ui-iconElement-icon oo-ui-icon-tag') span(:category_item, class: 'oo-ui-tool-name-categories') text_area(:cite_first_textarea, index: 0) @@ -167,7 +167,7 @@ class VisualEditorPage a(:transclusion, css: 'span.oo-ui-widget.oo-ui-iconElement.oo-ui-tool.oo-ui-tool-name-transclusion.oo-ui-widget-enabled > a') text_field(:transclusion_description, css: '.oo-ui-inputWidget > input:nth-child(1)') span(:ve_bold_text, class: 'oo-ui-iconElement-icon oo-ui-icon-bold-b') - span(:ve_bullets, class: 'oo-ui-iconElement-icon oo-ui-icon-bullet-list', index: 1) + span(:ve_bullets, css: '.oo-ui-clippableElement-clippable .oo-ui-iconElement-icon.oo-ui-icon-listBullet') span(:ve_computer_code, class: 'oo-ui-iconElement-icon oo-ui-icon-code') div(:ve_heading_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-down') span(:ve_italics, class: 'oo-ui-iconElement-icon oo-ui-icon-italic-i')