<div dir="ltr">Hello, <div><br></div><div>My mentor(Amir Aharoni) in GSOC had assigned me a task of writing browser test for one of the task in VisualEditor Help Guide[1]. Then Chris suggested me to work on references_features. He notified me about an awesome patch[2] which was about to be merged that time, which made tests run faster. Here are the steps I followed: </div>
<div><br></div><div>* Confirmed my idea of running tests for "Using an existing references in VisualEditor" with Chris.</div><div><br></div><div>* Even though I had written 1 test previously on qa-browsertest repository, the VisualEditor was different because of it's complexity. </div>
<div><br></div><div>* First thing I wanted to check was if there is a reference link in the VE or not. To do that I thought I will use <sup> element. But that lead to a ugly code[3] and I got confused with presence of _elements(I saw it in some stackoverflow). </div>
<div> </div><div>* Then Chris gave me some link[4] to study about page object elements. </div><div><br></div><div>* Then Chris suggested me to use <span style="color:rgb(0,0,0);white-space:pre-wrap"><a>text:"[1]" with index to identify both of the link. </span></div>
<div><br></div><div>* He also gave some more resources regarding watir-webdriver[5][6].</div><div><br></div><div>* After getting done with my test seemed to fail: </div><div><br></div><div>on(VisualEditorPage).second_reference_element.should be_visible<br>
</div><div><br></div><div>But Chris corrected me by adding when_present: </div><div><br></div><div>on(VisualEditorPage).second_reference_element.when_present.should be_visible<br></div><div><br></div><div>* Finally test shows green :) and I also changed my test to make sure that those were failing if I changed it to should_not </div>
<div><br></div><div>* I remembered <span style="font-family:arial,sans-serif;font-size:13px">Željko's comment for my previous commit and made sure that it works for both </span><font face="arial, sans-serif"><a href="http://test2.wikipedia.org">test2.wikipedia.org</a> and <a href="http://en.wikipedia.beta.wmflabs.org">en.wikipedia.beta.wmflabs.org</a> (as it had respective tags of it). Also corrected my spaces in code and added firefox tag to it. </font></div>
<div><br></div><div>Finally my code in gerrit[7]. </div><div><br></div><div>Thank you Chris for teaching me these thing :) </div><div><br></div><div>-</div><div><br></div><div>[1]: <a href="https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide" target="_blank">https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide</a></div>
<div><br></div><div>[2]: <a href="https://gerrit.wikimedia.org/r/#/c/120832/" target="_blank">https://gerrit.wikimedia.org/r/#/c/120832/</a></div><div><br></div><div>[3]: <a href="https://etherpad.wikimedia.org/p/vikas_ve/timeslider#237">https://etherpad.wikimedia.org/p/vikas_ve/timeslider#237</a></div>
<div><br></div><div>[4]: <span style="color:rgb(0,0,0);white-space:pre-wrap"><a href="https://github.com/cheezy/page-object/wiki/Elements">https://github.com/cheezy/page-object/wiki/Elements</a></span></div><div><br></div>
<div>[5]: <span style="color:rgb(0,0,0);white-space:pre-wrap"><a href="http://www.slideshare.net/jariba/watirwebdriver">http://www.slideshare.net/jariba/watirwebdriver</a></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br>
</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">[6]: </span><span style="color:rgb(0,0,0);white-space:pre-wrap"><a href="https://speakerdeck.com/jarib/automating-130-browser-platform-and-language-combinations-without-going-insane">https://speakerdeck.com/jarib/automating-130-browser-platform-and-language-combinations-without-going-insane</a></span></div>
<div><br></div><div>[7]: <a href="https://gerrit.wikimedia.org/r/#/c/121586/">https://gerrit.wikimedia.org/r/#/c/121586/</a></div><div><div>Regards </div>-- <br>Vikas S Yaligar<br>(9481543789)<br>
IT Department <br>NITK Surathkal<br>
</div><font face="yw-04b1231f2b49ebfc02591937fa6d6ece0e8f71c2-476d518872de78e7917e1cfc5c0ee2ca--o" style></font></div>