Commit graph

9 commits

Author SHA1 Message Date
Leszek Manicki 8d91433b61 Open links in the "tutorial" in the new window
In particular, link to a Meta page on the related community wish
should open in the new window/tab.

Bug: T140875
Change-Id: Ib0d7bf679c9ac8a3ee2fdf2289fc53cfdfdaa671
2016-07-20 12:28:20 +02:00
Leszek Manicki 8e2365502b Make RevisionList expect list of Revision object
Despite its documentation the "constructor" of RevisionList tends
to expect array of revision data in a format returned by API instead
of array of Revision objects.
Due to different name of ID fields in Revision object and in API array,
if "real" Revision object is passed to RevisionList, its ID is lost.

This changes RevisionList so that it only accepts an array of Revision
objects. This provides better abstraction.

This is basically a revert of I147270f28381038d05f8bcfd2317e8c269b2e458
which aimed at the same problem but suggested solution doesn't seem right.

Change-Id: Ic45cdd3e7b707a8c6a19eecf0a84d4c11696cd1f
2016-07-05 00:01:46 +02:00
jenkins-bot 488f8ec8a8 Merge "Make QUnit tests language-setting-proof" 2016-07-04 13:29:13 +00:00
WMDE-Fisch 471ee2eb47 Remove empty test file
Change-Id: Ica247e802cb9f2abfb1de97b87a6100af4376aef
2016-07-04 14:02:01 +02:00
WMDE-Fisch a27925152a Make QUnit tests language-setting-proof
There seems to be no good way to enforce language on the QUnit tests. It works
for the number formatting by setting the user language on the fly but for everything
else it fails. I simplified some tests and skip some tests or asserts when the language
is not 'en'.

I also added a helper to have conditions for skipping tests. This should be part of
QUnit IMO.

Still I dont know if this is something we should care about at all or just assume, that
devs will know what they do when they try to run tests.

Change-Id: I624ccf3984434e06200abffe7ccdd25b396251af
2016-07-04 11:59:49 +00:00
Ed Sanders a5f36af0f3 Prefix all classes and IDs with mw-revslider
Bug: T139105
Change-Id: Ia92396ec4f8acea39398173c81842d66257dc519
2016-07-01 11:27:23 +01:00
Ed Sanders cdd4a6bd83 Fix linting path for test files and make a pass
Change-Id: Iee023c901d6e87c6d23ce78a57c16c73d90e3efb
2016-07-01 11:26:18 +01:00
WMDE-Fisch f7ae734b99 Add more QUnit tests for public methods
Added tests for DiffPage, HelpDialog and RevisionListView.
Slightly refactored RevisionListView to improve testability.

Bug:T137964
Change-Id: I07dc8059d5a90bdd6623fd7748d36ba212763e15
2016-06-30 17:01:10 +02:00
addshore d5809a08c2 Move qunit tests to a directory
Change-Id: I5aa8d951e8fb77321748af341a1a17277aad9820
2016-06-27 12:24:47 +01:00