diff --git a/src/main/webapp/scripts/util/dom.js b/src/main/webapp/scripts/util/dom.js index e1dc9045e..a3fc6c224 100644 --- a/src/main/webapp/scripts/util/dom.js +++ b/src/main/webapp/scripts/util/dom.js @@ -1,34 +1,34 @@ -var DOM = {}; - -DOM.bind = function(elmt) { - var map = {}; - - for (var i = 0; i < elmt.length; i++) { - DOM._bindDOMElement(elmt[i], map); - } - - return map; -}; - -DOM._bindDOMElement = function(elmt, map) { - var bind = elmt.getAttribute("bind"); - if (bind !== null && bind.length > 0) { - map[bind] = $(elmt); - elmt.removeAttribute("bind"); - } - - if (elmt.hasChildNodes()) { - DOM._bindDOMChildren(elmt, map); - } -}; - -DOM._bindDOMChildren = function(elmt, map) { - var node = elmt.firstChild; - while (node !== null) { - var node2 = node.nextSibling; - if (node.nodeType == 1) { - DOM._bindDOMElement(node, map); - } - node = node2; - } +var DOM = {}; + +DOM.bind = function(elmt) { + var map = {}; + + for (var i = 0; i < elmt.length; i++) { + DOM._bindDOMElement(elmt[i], map); + } + + return map; +}; + +DOM._bindDOMElement = function(elmt, map) { + var bind = elmt.getAttribute("bind"); + if (bind !== null && bind.length > 0) { + map[bind] = $(elmt); + elmt.removeAttribute("bind"); + } + + if (elmt.hasChildNodes()) { + DOM._bindDOMChildren(elmt, map); + } +}; + +DOM._bindDOMChildren = function(elmt, map) { + var node = elmt.firstChild; + while (node !== null) { + var node2 = node.nextSibling; + if (node.nodeType == 1) { + DOM._bindDOMElement(node, map); + } + node = node2; + } }; \ No newline at end of file diff --git a/tests/windmill/js/test_basic_functions.js b/tests/windmill/js/test_basic_functions.js index 00f511250..66de68d24 100644 --- a/tests/windmill/js/test_basic_functions.js +++ b/tests/windmill/js/test_basic_functions.js @@ -1,25 +1,25 @@ -var test_basicFunctionality = new function() {//try cutting 'new' at some point - this.test_openProject = [ - { params: { "link": "Food" }, method: "click" }, - { params: {"timeout": "20000"}, method: "waits.forPageLoad"} - //assert the project is open - ]; - var column_name = 'Shrt_Desc'; - this.test_filterColumn = [ -// {method: "click", params: { jquery: '(".column-header-layout tr:contains( '+ column_name + ' ) .column-header-menu")[0]' } }, - {method: "click", params: { jquery: '(".column-header-layout tr:contains(\'Shrt_Desc\') .column-header-menu")[0]'} }, - {method: "mouseOver", params: { jquery: '("td:contains(\'Facet\')")[0]'} }, - {method: "click", params: { jquery: '(".menu-item:contains(\'Custom Text Facet\')")[0]'} }, - {method: "type", params: { jquery: '(".expression-preview-code")[0]', text: "value.split(',')[0]"} }, - {method: "waits.forElement", params: { jquery: '("td:contains(\'value.split\')")[0]'} }, - {method: "click", params: { jquery: '("button:contains(\'OK\')")[0]'} }, - {method: "waits.forElement", params: { jquery: '("a:contains(\'Count\')")[0]'} }, - {method: "click", params: { jquery: '("a:contains(\'Count\')")[0]'} } -// assert_expected_top_value(client, 'BEEF') - - ]; -}; - - - +var test_basicFunctionality = new function() {//try cutting 'new' at some point + this.test_openProject = [ + { params: { "link": "Food" }, method: "click" }, + { params: {"timeout": "20000"}, method: "waits.forPageLoad"} + //assert the project is open + ]; + var column_name = 'Shrt_Desc'; + this.test_filterColumn = [ +// {method: "click", params: { jquery: '(".column-header-layout tr:contains( '+ column_name + ' ) .column-header-menu")[0]' } }, + {method: "click", params: { jquery: '(".column-header-layout tr:contains(\'Shrt_Desc\') .column-header-menu")[0]'} }, + {method: "mouseOver", params: { jquery: '("td:contains(\'Facet\')")[0]'} }, + {method: "click", params: { jquery: '(".menu-item:contains(\'Custom Text Facet\')")[0]'} }, + {method: "type", params: { jquery: '(".expression-preview-code")[0]', text: "value.split(',')[0]"} }, + {method: "waits.forElement", params: { jquery: '("td:contains(\'value.split\')")[0]'} }, + {method: "click", params: { jquery: '("button:contains(\'OK\')")[0]'} }, + {method: "waits.forElement", params: { jquery: '("a:contains(\'Count\')")[0]'} }, + {method: "click", params: { jquery: '("a:contains(\'Count\')")[0]'} } +// assert_expected_top_value(client, 'BEEF') + + ]; +}; + + + // {method: "waits.forElement", params: { jquery: '("body[ajax_in_progress=\'false\']")[0]'} }, //wants to be a method \ No newline at end of file