Cmcmahon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/170762
Change subject: [BrowserTest] no more iframes for Cite test
......................................................................
[BrowserTest] no more iframes for Cite test
Change-Id: Ic31521dc8124818df1451a57ae396ca2e9c6beef
---
M modules/ve-mw/tests/browser/features/cite.feature
M modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
3 files changed, 36 insertions(+), 35 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/62/170762/1
diff --git a/modules/ve-mw/tests/browser/features/cite.feature
b/modules/ve-mw/tests/browser/features/cite.feature
index b601c6f..38eba4d 100644
--- a/modules/ve-mw/tests/browser/features/cite.feature
+++ b/modules/ve-mw/tests/browser/features/cite.feature
@@ -25,7 +25,7 @@
And I fill in the new field "New website field contents"
And I click Insert Citation
And I click Save page
- And I click Links Review your changes
+ And I click Review your changes
Then diff view should show the Website citation added
Scenario: Book
@@ -45,7 +45,7 @@
And I fill in the new field "New book field contents"
And I click Insert Citation
And I click Save page
- And I click Links Review your changes
+ And I click Review your changes
Then diff view should show the Book citation added
Scenario: News
@@ -60,7 +60,7 @@
And the News input field titles are in the correct order
And I click Insert Citation
And I click Save page
- And I click Links Review your changes
+ And I click Review your changes
Then diff view should show the News citation added
Scenario: Journal
@@ -70,7 +70,7 @@
And the Journal input field titles are in the correct order
And I click Insert Citation
And I click Save page
- And I click Links Review your changes
+ And I click Review your changes
Then diff view should show the Journal citation added
Scenario: Basic
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 9175e38..5d7a3c1 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
@@ -105,36 +105,36 @@
Then(/^diff view should show the Book citation added$/) do
on(VisualEditorPage) do |page|
page.wait_until(10) do
- page.links_diff_view.include? "Cite VisualEditor Test"
+ page.diff_view.include? "Cite VisualEditor Test"
end
- page.links_diff_view.should match Regexp.escape("<ref>{{Cite book|title =
Book title|last = Book author last name|first = Book author first
name|publisher = Book publisher|year = 2014|isbn = 9780743273565|location =
Location of publication|pages = 123|New book field = New book field
contents}}</ref>Cite VisualEditor Test")
+ page.diff_view.should match Regexp.escape("<ref>{{Cite book|title = Book
title|last = Book author last name|first = Book author first name|publisher =
Book publisher|year = 2014|isbn = 9780743273565|location = Location of
publication|pages = 123|New book field = New book field contents}}</ref>Cite
VisualEditor Test")
end
end
Then(/^diff view should show the Journal citation added$/) do
on(VisualEditorPage) do |page|
page.wait_until(10) do
- page.links_diff_view.include? "Cite VisualEditor Test"
+ page.diff_view.include? "Cite VisualEditor Test"
end
- page.links_diff_view.should match Regexp.escape("<ref>{{Cite journal|title
= Journal title|date = Journal Source date}}</ref>Cite VisualEditor Test")
+ page.diff_view.should match Regexp.escape("<ref>{{Cite journal|title =
Journal title|date = Journal Source date}}</ref>Cite VisualEditor Test")
end
end
Then(/^diff view should show the News citation added$/) do
on(VisualEditorPage) do |page|
page.wait_until(10) do
- page.links_diff_view.include? "Cite VisualEditor Test"
+ page.diff_view.include? "Cite VisualEditor Test"
end
- page.links_diff_view.should match Regexp.escape("<ref>{{Cite news|url =
News URL|title = News Source title|last = News Last name|first = News First
name|date = News Source date|work = News Work|accessdate = News URL access
date}}</ref>Cite VisualEditor Test")
+ page.diff_view.should match Regexp.escape("<ref>{{Cite news|url = News
URL|title = News Source title|last = News Last name|first = News First
name|date = News Source date|work = News Work|accessdate = News URL access
date}}</ref>Cite VisualEditor Test")
end
end
Then(/^diff view should show the Website citation added$/) do
on(VisualEditorPage) do |page|
page.wait_until(10) do
- page.links_diff_view.include? "Cite VisualEditor Test"
+ page.diff_view.include? "Cite VisualEditor Test"
end
- page.links_diff_view.should match Regexp.escape("<ref>{{Cite web|url =
http://en.wikipedia.org/|title = Website Source title|date = Website Source
date 28 July 2014|accessdate = {{CURRENTMONTHNAME}} {{CURRENTYEAR}}28 July
2014|website = Website title|publisher = Website publisher|last = Website Last
name|first = Website First name|New website field = New website field
contents}}</ref>Cite VisualEditor Test")
+ page.diff_view.should match Regexp.escape("<ref>{{Cite web|url =
http://en.wikipedia.org/|title = Website Source title|date = Website Source
date 28 July 2014|accessdate = {{CURRENTMONTHNAME}} {{CURRENTYEAR}}28 July
2014|website = Website title|publisher = Website publisher|last = Website Last
name|first = Website First name|New website field = New website field
contents}}</ref>Cite VisualEditor Test")
end
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 2344650..c0612a7 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
@@ -99,32 +99,33 @@
span(:second_save_page, css: ".oo-ui-flaggedElement-primary > a:nth-child(1)
> span:nth-child(2)")
span(:confirm_switch_cancel, text: "Resume editing")
+
+ text_area(:cite_first_textarea, index: 0)
+ text_area(:cite_second_textarea, index: 1)
+ text_area(:cite_third_textarea, index: 2)
+ text_area(:cite_fourth_textarea, index: 3)
+ text_area(:cite_fifth_textarea, index: 4)
+ text_area(:cite_sixth_textarea, index: 5)
+ text_area(:cite_seventh_textarea, index: 6)
+ text_area(:cite_eighth_textarea, index: 7)
+ div(:cite_ui, class: "oo-ui-window-body")
+
+ a(:cite_add_more_information_button, css: ".ve-ui-mwParameterPage-more a",
index: 7)
+ a(:book_add_more_information_button, css: ".ve-ui-mwParameterPage-more a",
index: 7)
+ div(:cite_visualeditor_user_interface, css: ".ve-ui-surfaceWidget")
+ div(:cite_basic_options_area, class: "oo-ui-layout oo-ui-iconElement
oo-ui-labelElement oo-ui-fieldsetLayout")
+
+ #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)")
+ div(:cite_group_name_textarea, class: "oo-ui-widget oo-ui-widget-enabled
oo-ui-inputWidget oo-ui-indicatorElement oo-ui-textInputWidget" )
+ 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)")
+ div(:cite_new_field_label, css: ".oo-ui-optionWidget")
+ div(:cite_show_more_fields, class:
"ve-ui-mwMoreParametersResultWidget-label")
+ span(:insert_citation, css: ".oo-ui-flaggedElement-primary > a:nth-child(1)
> span:nth-child(2)")
+
in_iframe(index: 0) do |frame|
a(:beta_warning, title: "Close", frame: frame)
- 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)
- div(:cite_ui, class: "oo-ui-window-body", frame: frame)
-
- text_area(:cite_first_textarea, index: 0, frame: frame)
- text_area(:cite_second_textarea, index: 1, frame: frame)
- text_area(:cite_third_textarea, index: 2, frame: frame)
- text_area(:cite_fourth_textarea, index: 3, frame: frame)
- text_area(:cite_fifth_textarea, index: 4, frame: frame)
- text_area(:cite_sixth_textarea, index: 5, frame: frame)
- text_area(:cite_seventh_textarea, index: 6, frame: frame)
- text_area(:cite_eighth_textarea, index: 7, frame: frame)
-
div(:content_box, class: "ve-ce-documentNode ve-ce-branchNode", frame:
frame)
- span(:insert_citation, text: "Insert", frame: frame)
span(:links_done, text: "Done", frame: frame)
text_field(:link_textfield, index: 0, frame: frame)
span(:another_save_page, class: "oo-ui-labelElement-label", text: "Save
page", frame: frame)
--
To view, visit https://gerrit.wikimedia.org/r/170762
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic31521dc8124818df1451a57ae396ca2e9c6beef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits