diff --git a/tests/windmill/js/initialize.js b/tests/windmill/js/initialize.js index a3ee2d214..32c6af72a 100644 --- a/tests/windmill/js/initialize.js +++ b/tests/windmill/js/initialize.js @@ -11,11 +11,13 @@ params = params || {}; }; } + actions.gw_wait4ajaxend = function () { return action("waits.forElement", { jquery: '("body[ajax_in_progress=\'false\']")[0]' } ); }; + actions.gw_wait4menuitem = function (params) { - return action("waits.forElement", { jquery: '(".menu-item:contains(\'' + params.name + '\')")[0]' } ); + return action("waits.forElement", { jquery: '(".menu-item:contains(\"' + params.name + '\")")[0]' } ); }; actions.gw_click_column_header = function (params) { @@ -32,14 +34,14 @@ function assert(what,params) { }; } +//TODO: is there a way to make the assert wait first, rather than putting this before each call of the assert?, asserts.gw_row_count = function (count) { - action("waits.forElement", { jquery: '(".viewPanel-summary-row-count")[0]' } ); + //action("waits.forElement", { jquery: '(".viewPanel-summary-row-count")[0]' } ); // doesn't work bc waits can't go inside functions asserts.assertText( { jquery: '(".viewPanel-summary-row-count")[0]', validator: count } ); }; asserts.gw_expected_top_value = function (expected_value) { // action("waits.forElement", { jquery: '("a.facet-choice-label")[0]' } ); // doesn't work bc waits can't go inside functions - //TODO: is there a way to make the assert wait first, rather than putting this before each call of the assert?, asserts.assertEquals(expected_value, $.trim($("a.facet-choice-label")[0].text)); };