Last modified: 2013-04-08 11:02:12 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 T30873, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28873 - Make mediawiki.util.test.js test suite easily reusable and extensible
Make mediawiki.util.test.js test suite easily reusable and extensible
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Krinkle
https://secure.wikimedia.org/wikisour...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-07 15:25 UTC by Helder
Modified: 2013-04-08 11:02 UTC (History)
4 users (show)

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


Attachments

Description Helder 2011-05-07 15:25:24 UTC
I was trying to create a suite of tests for a script used on Portuguese Wikisource and found the mediawiki.util.test.js test suite in SVN:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js?annotate=87360

It saved me a lot of work! =) (thanks Krinkle =D )

Nonetheless, instead of just copying all the code and then removing the tests I don't need to add my own JS tests (see the URL above), it would be better to be able to import the code  (maybe as a resource loader module?) and then just implement my tests. I think this could be useful to other local JS developers as well.

Would this be feasible?

PS: This seems to be related to bug 26908.
Comment 1 Helder 2011-05-07 15:27:05 UTC
Besides, it could be made more localizable ;-)
Comment 2 Krinkle 2011-05-08 16:14:08 UTC
Localization is certainly something that should be done in-core and not from the client-side. I'll get on that right away.

I'm expanding the summary to include "extendible" as wel. I can imagine extensions would like to add tests as well. So they should probably (also) be feeded through php somehow.

However, as you pointed out, bug 26908 will likely replace this test suite with one of the extisting frameworks / libraries / plugins out there. Which, when added to SVN, will be useable from anywhere.

--
Krinkle

PS: The script revision you copied to SVN needs wgAvailableSkins, just FYI: Since that variable doesn't exist yet in the version of the software that Wikimedia runs, the skin-navigator doesn't work.

You can see here: http://translatewiki.net/w/i.php?title=Special:BlankPage&action=mwutiltest&debug=true what it will look like.
Comment 3 Krinkle 2011-05-22 22:26:28 UTC
Marking FIXED. This is redundant now with bug 26908 and bug 28915 fixed.

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


Navigation
Links