r113951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113950‎ | r113951 | r113952 >
Date:20:37, 15 March 2012
Author:yonishostak
Status:deferred
Tags:
Comment:
AFTv5: fixed feedback page test prerequisite step
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/tests/Selenium/FeedbackPage/000_prerequisite_login_hider.testcase (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/tests/Selenium/FeedbackPage/000_prerequisite_login_hider.testcase
@@ -32,18 +32,24 @@
3333 <td></td>
3434 </tr>
3535 <tr>
 36+ <td>waitForPageToLoad</td>
 37+ <td>5000</td>
 38+ <td></td>
 39+</tr>
 40+<tr>
3641 <td>deleteAllVisibleCookies</td>
3742 <td></td>
3843 <td></td>
3944 </tr>
 45+<!--Attempt log out-->
4046 <tr>
4147 <td>storeEval</td>
42 - <td>null != window.document.getElementById('pt-logout')</td>
43 - <td>canLogOut</td>
 48+ <td>window.document.getElementById('pt-logout')</td>
 49+ <td>logout</td>
4450 </tr>
4551 <tr>
4652 <td>if</td>
47 - <td>&quot;false&quot; != &quot;${canLogOut}&quot;</td>
 53+ <td>logout != &quot;null&quot;</td>
4854 <td></td>
4955 </tr>
5056 <tr>
@@ -56,12 +62,70 @@
5763 <td></td>
5864 <td></td>
5965 </tr>
 66+<!--Attempt login via anonlogin-->
6067 <tr>
 68+ <td>storeEval</td>
 69+ <td>window.document.getElementById('pt-anonlogin')</td>
 70+ <td>login</td>
 71+</tr>
 72+<tr>
 73+ <td>if</td>
 74+ <td>login != null</td>
 75+ <td></td>
 76+</tr>
 77+<tr>
6178 <td>clickAndWait</td>
6279 <td>xpath=//*[@id='pt-anonlogin']/a</td>
6380 <td></td>
6481 </tr>
6582 <tr>
 83+ <td>else</td>
 84+ <td></td>
 85+ <td></td>
 86+</tr>
 87+<!--Attempt login via normal login-->
 88+<tr>
 89+ <td>storeEval</td>
 90+ <td>window.document.getElementById('pt-login')</td>
 91+ <td>login</td>
 92+</tr>
 93+<tr>
 94+ <td>if</td>
 95+ <td>login != null</td>
 96+ <td></td>
 97+</tr>
 98+<tr>
 99+ <td>clickAndWait</td>
 100+ <td>xpath=//*[@id='pt-login']/a</td>
 101+ <td></td>
 102+</tr>
 103+<tr>
 104+ <td>else</td>
 105+ <td></td>
 106+ <td></td>
 107+</tr>
 108+<tr>
 109+ <td>getEval</td>
 110+ <td>LOG.warn('Cannot locate login element')</td>
 111+ <td></td>
 112+</tr>
 113+<!--FATAL - cannot login-->
 114+<tr>
 115+ <td>assertEval</td>
 116+ <td>1</td>
 117+ <td>0</td>
 118+</tr>
 119+<tr>
 120+ <td>endIf</td>
 121+ <td></td>
 122+ <td></td>
 123+</tr>
 124+<tr>
 125+ <td>endIf</td>
 126+ <td></td>
 127+ <td></td>
 128+</tr>
 129+<tr>
66130 <td>type</td>
67131 <td>xpath=//input[@name='wpName']</td>
68132 <td>${hiderUserName}</td>
@@ -76,6 +140,17 @@
77141 <td>id=wpLoginAttempt</td>
78142 <td></td>
79143 </tr>
 144+<!--Assert logged in correctly-->
 145+<tr>
 146+ <td>assertElementPresent</td>
 147+ <td>id=pt-userpage</td>
 148+ <td></td>
 149+</tr>
 150+<tr>
 151+ <td>assertText</td>
 152+ <td>xpath=//*[@id='pt-userpage']/a</td>
 153+ <td>${hiderUserName}</td>
 154+</tr>
80155 </tbody></table>
81156 </body>
82157 </html>

Status & tagging log