From bdf90bfcfbdc88b143dc0a4fbe4ea56ca8acecdf Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 5 Jun 2014 10:00:59 -0700 Subject: [PATCH] Remove superfluous JSInput test The behavior previously tested here was to check that if a JSInput element was marked as not processed, re-walking the DOM *should* have reinitialized it. Unfortunately, this behavior is not supported by the underlying JSChannel library. In fact, if JSChannel detects an existing channel with the same origin and scope, it throws an uncaught exception, leaving the DOM in a "broken" state. JSInput will prevent duplicates from being added, as long as we don't manually update the `data-processed` attribute. This behavior is already being tested. --- common/static/js/capa/spec/jsinput_spec.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/common/static/js/capa/spec/jsinput_spec.js b/common/static/js/capa/spec/jsinput_spec.js index c54265ca7d..b62097b72c 100644 --- a/common/static/js/capa/spec/jsinput_spec.js +++ b/common/static/js/capa/spec/jsinput_spec.js @@ -15,15 +15,6 @@ describe("JSInput", function () { }); }); - it('sets the data-processed attribute to true on subsequent load', function() { - var section1 = $(this.sections[0]); - var section2 = $(this.sections[1]); - section1.attr('data-processed', false); - JSInput.walkDOM(); - expect(section1.attr('data-processed')).toEqual('true'); - expect(section2.attr('data-processed')).toEqual('true'); - }); - it('sets the waitfor attribute to its update function', function () { inputFields.each(function (index, item) { expect(item).toHaveAttr('waitfor');