Last modified: 2014-02-12 23:39:50 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 T47440, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45440 - Add testing setup for Parsoid's extension handling
Add testing setup for Parsoid's extension handling
Status: NEW
Product: Parsoid
Classification: Unclassified
tests (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-26 19:26 UTC by ssastry
Modified: 2014-02-12 23:39 UTC (History)
2 users (show)

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


Attachments

Description ssastry 2013-02-26 19:26:59 UTC
Parsoid uses the PHP parser to expand extensions and incorporate them into the token stream.  However, there are no tests for this functionality since parserTests does not use the API.

So, we need another way of testing this functionality -- possibly something that might require a wiki with installed extensions.  This might be a spinoff of parsertests that either stubs the wiki/api (ideal since it doesn't rely on Net access) or calls an existing wiki.

What we are interested here is not so much on extension output itself but that Parsoid does handle extension tags and incorporate that into the token stream for it to RT correctly.  So, stubbed API that returns dummy content is not necessarily a bad thing.  Something that is achievable either by adding additional options to the parserTests.js script or by writing a new script that uses/inherits from it.

This testing framework would have to be accompanied with an initial set of tests for one or two extensions.
Comment 1 ssastry 2013-04-16 23:26:41 UTC
Implemented in https://gerrit.wikimedia.org/r/#/c/52090/

Do we need any additional tests or are we done with this?
Comment 2 Gabriel Wicke 2013-06-12 00:21:34 UTC
So far we are not yet testing extensions in the mock API. For that we'd need an action=parse mock end point. And a way to use that from parserTests.
Comment 3 Gabriel Wicke 2013-07-08 18:08:38 UTC
Our mock API should also emit two trailing newlines from the action=parse stand-in to test stripping for those as discussed in bug 50713.

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


Navigation
Links