Last modified: 2013-10-10 21:02:40 UTC
Created attachment 13297 [details] link text varies iff one category exists Hotcat test fails when random page has single category on the page because of a singular/plural link text
Link text only varies in test2 env, but on en.beta env it is always in plural! If you want to make the test pass on both envs we could use xpath (which i try to avoid, but maybe here it would be usefull since there's no id's/other better stuff). It could be created like this: #give me the first child link of the div with id mw-normal... //div[@id=\'mw-normal-catlinks\']/a[1] or like this #give me the link which has a title Special... //a[@title=\'Special:Categories\'] Not sure which of these would be more robust, and I didn't try them but they should work. If you think this is good enough or have a better proposal tell me and I can make a change.
Tomislav, go ahead and make the change. We can discuss the details once you push the commit to Gerrit.
Change 88249 had a related patch set uploaded by Plavi: Fixed Hotcat test - plural/singular for Categories link https://gerrit.wikimedia.org/r/88249
Few notes here: I tested few things here but at the end I only changed the xpath as I stated above. I didn't see there wasn't the tag for beta env in the test feature file, so at start I have runned the test always on beta and not on test2 - not sure if it was intended so or it is just missing. On beta I get more timeouts which can be fixed by adding sleep(1) in steps "I click the Categories link" and "I click the Modify several categories button". On test2 env I don't get them as much (and I get them more in FF then in Chrome). I didn't add these sleeps as I know you don't like to use them, and I have tried when_present and when_visible methods but they didn't work like sleep did. Also I didn't add the tag for the beta env because there clearly is some changes in functionality between those two envs for this gadged, and I'm not sure if this test was intended on purpose to run only on test2 env.
Change 88249 merged by Zfilipin: Fixed Hotcat test - plural/singular for Categories link https://gerrit.wikimedia.org/r/88249