Index: trunk/extensions/MobileFrontend/tests/js/test_application.js |
— | — | @@ -3,6 +3,18 @@ |
4 | 4 | |
5 | 5 | module("MobileFrontend application.js: utils"); |
6 | 6 | |
| 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 | + |
7 | 19 | test("addClass", function() { |
8 | 20 | var el = $("<div />")[0]; |
9 | 21 | MFE.utils(el).addClass("foo"); |