Last modified: 2014-02-12 23:53:57 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 T32388, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30388 - Add unit tests to MobileFrontend extension
Add unit tests to MobileFrontend extension
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-16 02:59 UTC by Tomasz Finc
Modified: 2014-02-12 23:53 UTC (History)
10 users (show)

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


Attachments

Description Tomasz Finc 2011-08-16 02:59:07 UTC
Were severely lacking them in this extension.
Comment 1 Brion Vibber 2011-08-16 18:46:39 UTC
Examples of things to test:

In phpunit?
* run some known user-agent strings etc through the magic breakdown to confirm they bring up the settings we expect

In ...... some sort of client-side environment?
* masquerade as particular clients and ensure that you actually get the expected layout times
* masquerade as a web client that remembers cookies and confirm that clicking through the various 'view in desktop', 'view in mobile', etc links act as expected
Comment 2 Patrick Reilly 2011-09-13 02:04:43 UTC
Basic unit test support has been added in r96938. Now it's time to add some meaningful tests simular to what Brion mentioned in Comment 1.
Comment 3 Jon 2012-02-13 18:23:04 UTC
Seeing this:
https://www.mediawiki.org/wiki/Extension_talk:MobileFrontend#Issues_with_MobileFrontend_and_possible_rewrite_11940
I thought some unit tests might now be useful.

This diff: http://jonrobson.me.uk/mediawiki/MobileFrontendTests.diff
suggests a possible test suite using qunit and suggest some tests to get started for opensearch.js and application.js. I also have some tests for the beta_ code (not attached) that I am still working on.

To use run

	make remotes

then navigate to tests/client/index.html in your localhost (the tests to do with cookies will not run off a file uri)
Comment 4 Jon 2012-02-23 17:27:39 UTC
Javascript tests were adding in r111741
Comment 5 Patrick Reilly 2012-02-23 17:56:35 UTC
(In reply to comment #2)
> Basic unit test support has been added in r96938. Now it's time to add some
> meaningful tests simular to what Brion mentioned in Comment 1.

s/simular/similar

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


Navigation
Links