From 0a3ac4028813f8a9e28b14c68de41fbbc1abd119 Mon Sep 17 00:00:00 2001 From: Cmcmahon Date: Tue, 21 Oct 2014 14:03:56 -0700 Subject: [PATCH] =?UTF-8?q?[BrowserTest]=20Add=20"Then=E2=80=A6"=20steps?= =?UTF-8?q?=20to=20Cite=20Basic=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I43b28e8c95d3da0c3b94a8ea12ff3c376eedb1b5 --- modules/ve-mw/tests/browser/features/cite.feature | 4 +++- .../browser/features/step_definitions/cite_steps.rb | 11 +++++++++++ .../features/support/pages/visual_editor_page.rb | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/tests/browser/features/cite.feature b/modules/ve-mw/tests/browser/features/cite.feature index 061706dcc5..b601c6f18b 100644 --- a/modules/ve-mw/tests/browser/features/cite.feature +++ b/modules/ve-mw/tests/browser/features/cite.feature @@ -75,4 +75,6 @@ Feature: VisualEditor Cite Scenario: Basic When I click Basic - Then I should see the VisualEditor interface \ No newline at end of file + Then I should see the VisualEditor interface + And I should see the Options use this group text + And I should see the General references \ No newline at end of file diff --git a/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb index 3e7af40c39..9175e3891e 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb @@ -138,7 +138,18 @@ Then(/^diff view should show the Website citation added$/) do end end +Then(/^I should see the General references$/) do + expect(on(VisualEditorPage).cite_group_name_textarea_element).to be_visible +end + +Then(/^I should see the Options use this group text$/) do + expect(on(VisualEditorPage).cite_basic_options_area_element.text).to match /Options.+Use this group/m +end + Then(/^I should see the VisualEditor interface$/) do expect(on(VisualEditorPage).cite_visualeditor_user_interface_element).to be_visible 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 900c113363..0a3bc4bbe1 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 @@ -100,8 +100,11 @@ class VisualEditorPage a(:cite_add_more_information_button, css: ".ve-ui-mwParameterPage-more a", index: 7, frame: frame) a(:book_add_more_information_button, css: ".ve-ui-mwParameterPage-more a", index: 7, frame: frame) div(:cite_visualeditor_user_interface, css: ".ve-ui-surfaceWidget", frame: frame) + div(:cite_basic_options_area, class: "oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout", frame: frame) + #text_field(:cite_custom_field_name, css: ".oo-ui-textInputWidget-decorated > input:nth-child(1)", frame: frame) text_field(:cite_custom_field_name, css: ".oo-ui-searchWidget-query > div:nth-child(1) > input:nth-child(1)", frame: frame) + div(:cite_group_name_textarea, class: "oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-indicatorElement oo-ui-textInputWidget" , frame: frame) text_area(:cite_new_website_field, css: "div.oo-ui-layout:nth-child(10) > div:nth-child(3) > div:nth-child(1) > textarea:nth-child(1)", frame: frame) div(:cite_new_field_label, css: ".oo-ui-optionWidget", frame: frame) div(:cite_show_more_fields, class: "ve-ui-mwMoreParametersResultWidget-label", frame: frame)