Last modified: 2013-10-10 21:02:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56244, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54244 - fix flaky test for HotCat
fix flaky test for HotCat
Status: VERIFIED FIXED
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-17 21:43 UTC by Chris McMahon
Modified: 2013-10-10 21:02 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
link text varies iff one category exists (91.60 KB, image/png)
2013-09-17 21:43 UTC, Chris McMahon
Details

Description Chris McMahon 2013-09-17 21:43:05 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
Comment 1 Tomislav Plavcic 2013-10-05 17:54:13 UTC
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.
Comment 2 Željko Filipin 2013-10-07 08:37:51 UTC
Tomislav, go ahead and make the change. We can discuss the details once you push the commit to Gerrit.
Comment 3 Gerrit Notification Bot 2013-10-07 22:23:03 UTC
Change 88249 had a related patch set uploaded by Plavi:
Fixed Hotcat test - plural/singular for Categories link

https://gerrit.wikimedia.org/r/88249
Comment 4 Tomislav Plavcic 2013-10-07 22:38:47 UTC
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.
Comment 5 Gerrit Notification Bot 2013-10-10 21:02:03 UTC
Change 88249 merged by Zfilipin:
Fixed Hotcat test - plural/singular for Categories link

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links