| hashar added subscribers: Aleksey_WMDE, Sniedzielski. hashar added a comment. |
I have poked wikitech-l and got feedback from @Aleksey_WMDE For reference the thread is:
The last post is pointing at node Blog Post: Fast and isolated JS unit tests, or how to run QUnit tests with NodeJS. Which is definitely developer friendly and probably faster but has its own drawbacks (using stubs since mediawiki JS not being available).
I have migrated the CI of almost all extensions to use #Quibble and ArticlePlaceholder is one of the last left to migrate. It currently fails on CI due to grunt-contrib-qunit depending on phantomjs which can't be installed due to lack of bzip2. That itself could be fixed, then that repository is the sole using that mechanism and should be normalized to use the MediaWiki karma runner. There are a few reasons for that:
- The mediawiki core karma runner is the standard way (for now) to run the QUnit tests
- That uses MediaWiki _javascript_ and its dependencies (oojs, oojs-ui, qunit, sinon)
I have proposed change 44936 which does the integration, but the tests fail. As I understand it there is an helper method (createAndShowDialog)to open an OOUi dialog, but by the time the assertion is run, the dialog is not opened yet.
The createAndShowDialog creates the dialog then ask OOUi window manager to open a window with it. But that is done asynchronously and the assertion runs first. That thus fails to find the ui element.
I have tried to make createAndShowDialog to return the opened promise and then write the test in it, but it still fails. My knowledge of _javascript_, OOUi or Promises is rather limited and I can't find a way to fix it up :-/
Once fixed, ArticlePlaceholder will be aligned with all other extensions and I will be able to migrate it to the new CI jobs based on Quibble :]
Cc: Sniedzielski, Aleksey_WMDE, WMDE-leszek, gerritbot, hashar, Legoktm, Aklapper, stebsco, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, cmadeo, LawExplorer, Lewizho99, Maathavan, Izno, Wikidata-bugs, aude, Dinoguy1000, jayvdb, Ricordisamoa, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
