QUnit, Promises and ArticlePlaceHolder

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

QUnit, Promises and ArticlePlaceHolder

Antoine Musso-3
Hello,

The ArticlePlaceholder extension has QUnit tests run via nodejs.  I am
trying to port them to Special:JavaScriptTest.

I am hitting a wall due to an OOUi widget not being found on the first
test.  Most probably because the window is opened asynchronously and the
assertions are run before it opens.

JavaScript Promises are not my thing and I know nothing about OOUi.  If
that is in your area of expertise, I could use a hand to finish up the port:

https://gerrit.wikimedia.org/r/#/c/444936/6

Thank you!


--
Antoine "hashar" Musso




_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: QUnit, Promises and ArticlePlaceHolder

Aleksey Bekh-Ivanov
Hi!

Why did you start working on that? (Task description says nothing about the
reason)

I express my personal opinion here:
I would like it to stay like it is (running in nodejs) - it is far more
developer friendly to run nodejs tests than Special:JavaScriptTest.
And, to be honest, I would want to migrate more JS test code supported by
WMDE to nodejs.


On 21 July 2018 at 00:13, Antoine Musso <[hidden email]> wrote:

> Hello,
>
> The ArticlePlaceholder extension has QUnit tests run via nodejs.  I am
> trying to port them to Special:JavaScriptTest.
>
> I am hitting a wall due to an OOUi widget not being found on the first
> test.  Most probably because the window is opened asynchronously and the
> assertions are run before it opens.
>
> JavaScript Promises are not my thing and I know nothing about OOUi.  If
> that is in your area of expertise, I could use a hand to finish up the
> port:
>
> https://gerrit.wikimedia.org/r/#/c/444936/6
>
> Thank you!
>
>
> --
> Antoine "hashar" Musso
>
>
>
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: QUnit, Promises and ArticlePlaceHolder

Stephen Niedzielski
I'd like to share this relevant blog post[0] by Joaquin for work done
on the Popups extension and upcoming plans for other repos. The post
discusses some of the tradeoffs of Special:JavaScriptTest tests and
Node.js headless QUnit tests.

[0]
https://phabricator.wikimedia.org/phame/post/view/96/fast_and_isolated_js_unit_tests/

On Sat, Jul 21, 2018 at 11:05 AM Aleksey Bekh-Ivanov <
[hidden email]> wrote:

> Hi!
>
> Why did you start working on that? (Task description says nothing about the
> reason)
>
> I express my personal opinion here:
> I would like it to stay like it is (running in nodejs) - it is far more
> developer friendly to run nodejs tests than Special:JavaScriptTest.
> And, to be honest, I would want to migrate more JS test code supported by
> WMDE to nodejs.
>
>
> On 21 July 2018 at 00:13, Antoine Musso <[hidden email]> wrote:
>
> > Hello,
> >
> > The ArticlePlaceholder extension has QUnit tests run via nodejs.  I am
> > trying to port them to Special:JavaScriptTest.
> >
> > I am hitting a wall due to an OOUi widget not being found on the first
> > test.  Most probably because the window is opened asynchronously and the
> > assertions are run before it opens.
> >
> > JavaScript Promises are not my thing and I know nothing about OOUi.  If
> > that is in your area of expertise, I could use a hand to finish up the
> > port:
> >
> > https://gerrit.wikimedia.org/r/#/c/444936/6
> >
> > Thank you!
> >
> >
> > --
> > Antoine "hashar" Musso
> >
> >
> >
> >
> > _______________________________________________
> > Wikitech-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: QUnit, Promises and ArticlePlaceHolder

Derk-Jan Hartman
In reply to this post by Aleksey Bekh-Ivanov
Well following the trail of links, leads me to this likely cause:
https://phabricator.wikimedia.org/T180171#4236340

The extension relies on grunt-contrib-qunit which depends on
> phantomjs-prebuild and run qunit tests with PhantomJS. The tests are under
> tests/qunit:


which indirectly is triggered by hashar's work on quibble I presume.

DJ

On Sat, Jul 21, 2018 at 6:05 PM Aleksey Bekh-Ivanov <
[hidden email]> wrote:

> Hi!
>
> Why did you start working on that? (Task description says nothing about the
> reason)
>
> I express my personal opinion here:
> I would like it to stay like it is (running in nodejs) - it is far more
> developer friendly to run nodejs tests than Special:JavaScriptTest.
> And, to be honest, I would want to migrate more JS test code supported by
> WMDE to nodejs.
>
>
> On 21 July 2018 at 00:13, Antoine Musso <[hidden email]> wrote:
>
> > Hello,
> >
> > The ArticlePlaceholder extension has QUnit tests run via nodejs.  I am
> > trying to port them to Special:JavaScriptTest.
> >
> > I am hitting a wall due to an OOUi widget not being found on the first
> > test.  Most probably because the window is opened asynchronously and the
> > assertions are run before it opens.
> >
> > JavaScript Promises are not my thing and I know nothing about OOUi.  If
> > that is in your area of expertise, I could use a hand to finish up the
> > port:
> >
> > https://gerrit.wikimedia.org/r/#/c/444936/6
> >
> > Thank you!
> >
> >
> > --
> > Antoine "hashar" Musso
> >
> >
> >
> >
> > _______________________________________________
> > Wikitech-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l