Merge "[BrowserTest] Add "Then…" steps to Cite Basic test"

This commit is contained in:
jenkins-bot 2014-10-22 01:01:59 +00:00 committed by Gerrit Code Review
commit c724bf3e0e
3 changed files with 17 additions and 1 deletions

View file

@ -75,4 +75,6 @@ Feature: VisualEditor Cite
Scenario: Basic
When I click Basic
Then I should see the VisualEditor interface
Then I should see the VisualEditor interface
And I should see the Options use this group text
And I should see the General references

View file

@ -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

View file

@ -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)