jenkins-bot has submitted this change and it was merged.

Change subject: [BrowserTest] update Cite element locators
......................................................................


[BrowserTest] update Cite element locators

Also small refactor for readability

Change-Id: I65c1b589413bdb7de784aa3c4e0e189fca10bab3
---
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, 7 insertions(+), 2 deletions(-)

Approvals:
  Cmcmahon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/tests/browser/features/cite.feature 
b/modules/ve-mw/tests/browser/features/cite.feature
index 0af21df..f40ef48 100644
--- a/modules/ve-mw/tests/browser/features/cite.feature
+++ b/modules/ve-mw/tests/browser/features/cite.feature
@@ -18,6 +18,7 @@
       And I click Add more information
       And I see Show more fields
       And I type in a field name "New website field"
+      And I click the new field label
       And I fill in the new field "New website field contents"
       And I click Insert Citation
       And I click Save page
@@ -37,6 +38,7 @@
       And the Book input field titles are in the correct order
       And I click Book Add more information
       And I type in a field name "New book field"
+      And I click the new field label
       And I fill in the new field "New book field contents"
       And I click Insert Citation
       And I click Save page
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 51804c1..7f6c514 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
@@ -30,6 +30,10 @@
   on(VisualEditorPage).cite_news_element.when_present.click
 end
 
+When(/^I click the new field label$/) do
+  on(VisualEditorPage).cite_new_field_label_element.when_present.click
+end
+
 When(/^I click Website$/) do
   on(VisualEditorPage).cite_website_element.when_present.click
 end
@@ -67,7 +71,6 @@
 end
 
 When(/^I fill in the new field "(.*?)"$/) do |new_field_text|
-  on(VisualEditorPage).cite_new_field_instance_element.when_present.click
   on(VisualEditorPage).cite_new_website_field_element.when_present.send_keys 
new_field_text
 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 e6bd7b2..57d1219 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,8 @@
     a(:book_add_more_information_button, css: ".ve-ui-mwParameterPage-more a", 
index: 7, 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)
-    li(:cite_new_field_instance , class: "oo-ui-widget oo-ui-widget-enabled 
oo-ui-optionWidget ve-ui-mwParameterResultWidget oo-ui-labeledElement", frame: 
frame)
     text_area(:cite_new_website_field, css: "div.oo-ui-layout:nth-child(7) > 
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)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/157179
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I65c1b589413bdb7de784aa3c4e0e189fca10bab3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to