r112896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112895‎ | r112896 | r112897 >
Date:14:00, 2 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
add tests for basic selector support

ideally all mobile devices at some point should be
able to handle at least these selectors
Modified paths:
  • /trunk/extensions/MobileFrontend/tests/js/test_application.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/tests/js/test_application.js
@@ -3,6 +3,18 @@
44
55 module("MobileFrontend application.js: utils");
66
 7+test("Basic selector support (#id)", function() {
 8+ strictEqual(MFE.utils("#section_1").length, 1, "only one element matches this selector");
 9+});
 10+
 11+test("Basic selector support (.className)", function() {
 12+ strictEqual(MFE.utils(".section_heading").length, 2, "only two elements matches this selector");
 13+});
 14+
 15+test("Basic selector support (tag name)", function() {
 16+ strictEqual(MFE.utils("body").length, 1, "only one element matches this selector");
 17+});
 18+
719 test("addClass", function() {
820 var el = $("<div />")[0];
921 MFE.utils(el).addClass("foo");

Status & tagging log