[BrowserTest] update Cite test for new UI

* Access to Cite options changed
* Various target locators also changed

Paired with Rummana for these changes.

Change-Id: Ib7c3fbd1842879745d3d3128c66d90cc2b4f98cb
This commit is contained in:
Cmcmahon 2015-03-17 15:53:16 -07:00
parent aac31c9c72
commit 698f36cdd4
4 changed files with 7 additions and 8 deletions

View file

@ -4,8 +4,7 @@ Feature: VisualEditor Cite
Background:
Given I go to the "Cite VisualEditor Test" page with content "Cite VisualEditor Test"
And I click in the editable part
And I click the Cite button
And I can see the Cite User Interface
And I open the Cite menu
Scenario: Website
When I click Website

View file

@ -1,5 +1,5 @@
Given(/^I can see the Cite User Interface$/) do
on(VisualEditorPage).cite_select_element.when_present
Given(/^I open the Cite menu$/) do
on(VisualEditorPage).cite_menu_element.when_present.click
end
When(/^I click Add more information$/) do

View file

@ -33,7 +33,7 @@ When(/^I click on Extension:VisualEditor reference$/) do
end
When(/^I create a reference using existing reference$/) do
step('I click the Cite button')
step('I open the Cite menu')
step('I click use an existing reference button in References User Interface')
step('I click on Extension:VisualEditor reference')
end

View file

@ -20,22 +20,22 @@ class VisualEditorPage
text_area(:cite_eighth_textarea, index: 14)
a(:cite_add_more_information_button, css: '.ve-ui-mwParameterPage-more a', index: 7)
div(:cite_basic_options_area, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout')
span(:cite_basic_reference, css: '.oo-ui-icon-reference')
span(:cite_basic_reference, css: '.oo-ui-tool-name-reference > a:nth-child(1) > span:nth-child(1)')
a(:cite_book, css: '.oo-ui-tool-name-cite-book > a:nth-child(1)')
div(:cite_button, class: 've-test-toolbar-cite')
text_field(:cite_custom_field_name, css: '.oo-ui-searchWidget-query > div:nth-child(1) > input:nth-child(1)')
text_field(:cite_group_name_textarea, css: 'div.oo-ui-indicatorElement:nth-child(1) > input:nth-child(1)')
a(:cite_journal, css: '.oo-ui-tool-name-cite-journal > a:nth-child(1)')
span(:cite_indicator_down, css: '.ve-test-toolbar-cite .oo-ui-indicator-down')
span(:cite_menu, css: '.ve-test-toolbar-cite > span:nth-child(1) > span:nth-child(3)')
div(:cite_new_field_label, css: '.oo-ui-optionWidget')
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)')
a(:cite_news, css: '.oo-ui-tool-name-cite-news > a:nth-child(1)')
div(:cite_pull_down, css: '.ve-test-toolbar-cite .oo-ui-clippableElement-clippable')
span(:cite_reuse_existing_reference, css: '.oo-ui-icon-reference-existing')
div(:cite_select, css: 'div.oo-ui-widget:nth-child(5) > div:nth-child(2)')
div(:cite_show_more_fields, class: 've-ui-mwMoreParametersResultWidget-label')
div(:cite_ui, class: 'oo-ui-window-frame')
div(:cite_visualeditor_user_interface, css: '.ve-ui-surfaceWidget')
div(:cite_visualeditor_user_interface, css: 'div.ve-ui-surface:nth-child(2)')
span(:cite_website, css: '.oo-ui-icon-ref-cite-web')
span(:confirm_switch, text: 'Keep changes')
span(:confirm_switch_cancel, text: 'Resume editing')