From 0ad08d49ccfd73e427f821bc871fed26660d22c6 Mon Sep 17 00:00:00 2001 From: Jeff Fry Date: Tue, 20 Apr 2010 00:48:03 +0000 Subject: [PATCH] Remove basic.js , add initial JS test. Currently does little, but it works. More to come, now that I'm more up to speed at Windmill's JS library, and JS in general... git-svn-id: http://google-refine.googlecode.com/svn/trunk@505 7d457c2a-affb-35e4-300a-418c747d4874 --- tests/windmill/js/basic.js | 17 --------------- tests/windmill/js/test_basic_functions.js | 25 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 17 deletions(-) delete mode 100644 tests/windmill/js/basic.js create mode 100644 tests/windmill/js/test_basic_functions.js diff --git a/tests/windmill/js/basic.js b/tests/windmill/js/basic.js deleted file mode 100644 index bf821eb6e..000000000 --- a/tests/windmill/js/basic.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the windmill services transformer -var test_recordingSuite0 = new function() { - this.test_actions = [ -{"params": {"link": "Food"}, "method": "click"}, -{"params": {"timeout": "20000"}, "method": "waits.forPageLoad"}, -{"params": {"xpath": "//div[@id='body']/div[1]/div[2]/table/tbody/tr[1]/td[3]/table/tbody/tr/td[2]/a", "timeout": "8000"}, "method": "waits.forElement"}, -{"params": {"xpath": "//div[@id='body']/div[1]/div[2]/table/tbody/tr[1]/td[3]/table/tbody/tr/td[2]/a"}, "method": "click"}, -{"params": {"xpath": "Error - Could not find a reliable locator for this node."}, "method": "click"}, -{"params": {"xpath": "/html/body/div[5]/div/div[2]/div/table/tbody/tr[2]/td[1]/div/textarea"}, "method": "click"}, -{"params": {"xpath": "/html/body/div[5]/div/div[2]/div/table/tbody/tr[2]/td[1]/div/textarea", "text": "value.split(\",\")[0]"}, "method": "type"}, -{"params": {"xpath": "Error - Could not find a reliable locator for this node."}, "method": "click"}, -{"params": {"link": "BEEF"}, "method": "click"}, -{"params": {"xpath": "//div[@id='body']/div[1]/div[2]/table/tbody/tr[1]/td[4]/table/tbody/tr/td[2]/a"}, "method": "click"}, -{"params": {"xpath": "Error - Could not find a reliable locator for this node."}, "method": "click"}, -{"params": {"xpath": "//div[@id='body']/div[1]/div[1]/span/span"}, "method": "click"} - ]; -} diff --git a/tests/windmill/js/test_basic_functions.js b/tests/windmill/js/test_basic_functions.js new file mode 100644 index 000000000..00f511250 --- /dev/null +++ b/tests/windmill/js/test_basic_functions.js @@ -0,0 +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') + + ]; +}; + + + +// {method: "waits.forElement", params: { jquery: '("body[ajax_in_progress=\'false\']")[0]'} }, //wants to be a method \ No newline at end of file