JGonera has uploaded a new change for review.

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

Change subject: QA: Fix browser tests for issues (cleanup templates)
......................................................................

QA: Fix browser tests for issues (cleanup templates)

The page created for the test using API contained an external link so
page creation would fail on a vagrant instance with ConfirmEdit
installed (captcha would be triggered).

Also, use api helper instead of APIPage.

Change-Id: I82bf9b8c6b79961bfb35cf9c01dec479cc67f37f
---
M tests/browser/features/step_definitions/create_page_api_steps.rb
1 file changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/45/154345/1

diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb 
b/tests/browser/features/step_definitions/create_page_api_steps.rb
index 38688ad..c760679 100644
--- a/tests/browser/features/step_definitions/create_page_api_steps.rb
+++ b/tests/browser/features/step_definitions/create_page_api_steps.rb
@@ -30,14 +30,20 @@
 end
 
 Given(/^I am on a page which has cleanup templates$/) do
-    wikitext = 'This page is used by Selenium to test MediaWiki functionality.
+    wikitext = <<-END.gsub(/^ */, '')
+      This page is used by Selenium to test MediaWiki functionality.
 
-<table class="metadata plainlinks ambox ambox-content ambox-Refimprove" 
role="presentation">
-<tr><td class="mbox-image">[[File:Question_book-new.svg|thumb]]</td>
-<td class="mbox-text"><span class="mbox-text-span">This article \'\'\'needs 
additional citations for [[Wikipedia:Verifiability|verification]]\'\'\'. <span 
class="hide-when-compact">Please help 
[//en.wikipedia.org/w/index.php?title=Doomsday_device&amp;action=edit improve 
this article] by [[Help:Introduction_to_referencing/1|adding citations to 
reliable sources]]. Unsourced material may be challenged and removed.</span> 
<small><i>(October 2012)</i></small></span></td>
-</tr></table>'
+      <table class="metadata plainlinks ambox ambox-content ambox-Refimprove" 
role="presentation">
+        <tr>
+          <td class="mbox-image">[[File:Question_book-new.svg|thumb]]</td>
+          <td class="mbox-text">
+            <span class="mbox-text-span">This article \'\'\'needs additional 
citations for [[Wikipedia:Verifiability|verification]]\'\'\'. <span 
class="hide-when-compact">Please help [[Selenium page issues test 
page#editor/0|improve this article]] by 
[[Help:Introduction_to_referencing/1|adding citations to reliable sources]]. 
Unsourced material may be challenged and removed.</span> <small><i>(October 
2012)</i></small></span>
+          </td>
+        </tr>
+      </table>
+    END
 
-    on(APIPage).create "Selenium page issues test page", wikitext
+    api.create_page "Selenium page issues test page", wikitext
     step 'I am on the "Selenium page issues test page" page'
 end
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82bf9b8c6b79961bfb35cf9c01dec479cc67f37f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <jgon...@wikimedia.org>

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

Reply via email to