Commit e2cab190 by stv

Ensure JSInput tests actually run

This test currently fails, meaning that the existing tests weren't
testing what they claimed.

Assertions are made for each element returned by the CSS selectors.
However, the selectors are assumed to be wildcard matches, but are
actually literal selectors. As there are no matched elements, this
causes the assertions to be (silently) checked zero times, without
failure.
parent 858f3ae5
......@@ -27,4 +27,12 @@ describe("JSInput", function() {
expect(inputField.data('waitfor')).toBeDefined();
});
});
it('tests the correct number of sections', function () {
var sections = $(document).find('section[id="inputtype_"]');
var inputFields = $(document).find('input[id="input_"]');
expect(sections.length).toEqual(2);
expect(sections.length).toEqual(inputFields.length);
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment