Investigate the best method for adding testing support for the WikimediaApiPortalOAuth extension
Note that this is causing all post-merge builds to fail (T273326)
Investigate the best method for adding testing support for the WikimediaApiPortalOAuth extension
Note that this is causing all post-merge builds to fail (T273326)
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • eprodromou | T235270 Wikimedia API Gateway | |||
Open | None | T255034 Wikimedia API Gateway Long-term Use | |||
Resolved | VirginiaPoundstone | T284325 Example Node Prototype API | |||
Open | None | T258757 Write unit tests for WikimediaApiPortalOAuth |
There's no code merged in this repo yet. Can't really write tests until the code is there.
For JS tests we have this documentation: https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing
And these examples:
https://github.com/wikimedia/mediawiki-extensions-Echo/tree/master/tests/qunit/model
Generally, we need to split widgets(view) from model and primarily test the model. For example, this is the test
for the model supporting this widget
@Art.tsymbar Were you able to make any progress on this before the end of 2020 that you can share? Even a work-in-progress patch would be a helpful starting point for someone else to pick this up. (Happy new year!)
Here is the initial work done on this task by Art: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaApiPortalOAuth/+/655947
This still seems reasonable to do, but one of the API Platform engineers would need to become familiar with this code and testing framework (and with the code to be tested for that matter).