r113897 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113896‎ | r113897 | r113898 >
Date:07:56, 15 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
adjust utils tests

there are some side effects with the old tests
sometimes causing them to fail
this makes them past consistently
Modified paths:
  • /trunk/extensions/MobileFrontend/tests/js/test_application.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/tests/js/test_application.js
@@ -1,14 +1,22 @@
22 var MFE = MobileFrontend;
33 var MFET = window.MobileFrontendTests;
44
5 -module("MobileFrontend application.js: utils");
 5+module("MobileFrontend application.js: utils", {
 6+ setup: function() {
 7+ var section = '<div class="t_section_heading"></div>';
 8+ $('<div id="mfetest">' + section + '<div id="t_section_1">' + section + '</div>').appendTo(document.body);
 9+ },
 10+ teardown: function() {
 11+ $("#mfetest").remove();
 12+ }
 13+});
614
715 test("Basic selector support (#id)", function() {
8 - strictEqual(MFE.utils("#section_1").length, 1, "only one element matches this selector");
 16+ strictEqual(MFE.utils("#t_section_1").length, 1, "only one element matches this selector");
917 });
1018
1119 test("Basic selector support (.className)", function() {
12 - strictEqual(MFE.utils(".section_heading").length, 2, "only two elements matches this selector");
 20+ strictEqual(MFE.utils(".t_section_heading").length, 2, "only two elements matches this selector");
1321 });
1422
1523 test("Basic selector support (tag name)", function() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r114202MFT r113807, r113831, r113832, r113865, r113866, r113870, r113871, r113872, r...awjrichards22:23, 19 March 2012

Status & tagging log