Last modified: 2014-03-05 18:27:51 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 T52009, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50009 - mediawiki.api.js tests fails with $wgDebugToolbar = true and/or $wgDebugAPI = true
mediawiki.api.js tests fails with $wgDebugToolbar = true and/or $wgDebugAPI =...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-22 08:29 UTC by Umherirrender
Modified: 2014-03-05 18:27 UTC (History)
5 users (show)

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


Attachments

Description Umherirrender 2013-06-22 08:29:19 UTC
Setting $wgDebugToolbar = true in LocalSettings will break one qunit test:

mediawiki.api: Basic functionality

With the toolbar each api response has a 'debuginfo' section, but the test asume a empty result.
Comment 1 Krinkle 2013-06-22 23:30:10 UTC
wgDebugToolbar causes all kinds of issues in the front-end due to overlapping of the interface and what not.

I think it is poor design that it injects such property in API responses. If you want such information from the API, perhaps it should be a special format (e.g. format=debug) instead of injecting an undocumented parameter in all responses.
Comment 2 Umherirrender 2013-06-23 12:42:01 UTC
wgDebugToolbar works for the api in the same way as for the gui: it added unconditionally the text which was passed to wfDebug and so on.
Comment 3 Umherirrender 2013-11-30 15:55:02 UTC
$wgDebugAPI = true always sets a warning, which gives also false positive
Comment 4 Gerrit Notification Bot 2014-02-03 18:55:08 UTC
Change 110894 had a related patch set uploaded by Alex Monk:
Fix API QUnit tests that are not aware of wgDebugToolbar

https://gerrit.wikimedia.org/r/110894
Comment 5 Alex Monk 2014-02-03 18:56:18 UTC
That patch doesn't deal with wgDebugAPI... Not sure there's a nice clean way to do it really...
Comment 6 Gerrit Notification Bot 2014-03-05 18:26:59 UTC
Change 110894 abandoned by Krinkle:
Fix API QUnit tests that are not aware of wgDebugToolbar

Reason:
This is obsolete now that we've taken the more elegant route of not relying on the server in the first place and limiting the test to testing the client-side logic. Whether it should account for wgDebugToolbar is separate question still, but at least the QUnit run won't be affected by that.

https://gerrit.wikimedia.org/r/110894
Comment 7 Krinkle 2014-03-05 18:27:51 UTC
As of I20b17f256bc5114c6c2c3185653 we no longer interact with api.php from our unit tests, so this bug has become obsolete.

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


Navigation
Links