Spage has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/114442

Change subject: Update page elements used by Edit existing title
......................................................................

Update page elements used by Edit existing title

Classes were simplified so the text fields and button elements didn't
work. Should use css attribute for both kinds, but support for css in
text fields only arrived 5 days ago in watir-webdriver.

Bug: 61579
Change-Id: I7e1d0cbba3cc1e06e6914c979eacd71fc9628493
---
M tests/browser/features/support/pages/flow_page.rb
1 file changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/42/114442/1

diff --git a/tests/browser/features/support/pages/flow_page.rb 
b/tests/browser/features/support/pages/flow_page.rb
index c86044c..bd568aa 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -19,8 +19,8 @@
   span(:author_link, class: "flow-creator")
   a(:block_user, title: /Special:Block/)
   list_item(:collapsed_view, title: "Collapsed view")
-  button(:change_post_save, class: "flow-edit-post-submit")
-  button(:change_title_save, class: "flow-edit-title-submit")
+  button(:change_post_save, css: "form.flow-edit-form .flow-edit-submit")
+  button(:change_title_save, css: "form.flow-edit-title-form 
.flow-edit-submit")
   textarea(:comment_field, name: "topic_topic-reply-content")
   button(:comment_reply_save, css: "form.flow-topic-reply-form 
.flow-reply-submit")
   a(:contrib_link, text: "contribs")
@@ -51,11 +51,17 @@
   # XPath CSS class handling copied from
   # http://stackoverflow.com/questions/8808921/selecting-a-css-class-with-xpath
   a(:post_actions_link, xpath: "//div[contains(concat(' ', 
normalize-space(@class), ' '), ' flow-post-container ')]//a[text()='Actions']", 
index: 1)
-  text_field(:post_edit, class: "flow-edit-post-content flow-disabler")
+  # Can't use css attribute with text_area, should be fixed in 2014-02 by 
https://github.com/watir/watir-webdriver/pull/244
+  # NOT YET: text_area(:post_edit, css: "form.flow-edit-form 
.flow-edit-content")
+  # so instead awful xpath:
+  text_area(:post_edit, xpath: "//form[@class='flow-edit-form']//textarea")
   div(:small_spinner, class: "mw-spinner mw-spinner-small mw-spinner-inline")
   list_item(:small_view, title: "Small view")
   a(:talk_link, text: "Talk")
-  text_field(:title_edit, class: "mw-ui-input flow-edit-title-textbox")
+  # Can't use css attribute with text_field, should be fixed in 2014-02 by 
https://github.com/watir/watir-webdriver/pull/244
+  # NOT YET: text_field(:title_edit, css: "form.flow-edit-title-form 
.flow-edit-content")
+  # so instead awful xpath:
+  text_field(:title_edit, xpath: 
"//form[@class='flow-edit-title-form']//input[@type='text']")
   a(:topic_actions_link, xpath: "//div[contains(concat(' ', 
normalize-space(@class), ' '), ' flow-topic-container 
')]//a[text()='Actions']", index: actions_index)
   div(:topic_post, class: "flow-post-content", index: topic_index)
   div(:topic_title, class: "flow-topic-title", index: topic_index)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e1d0cbba3cc1e06e6914c979eacd71fc9628493
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage <sp...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to