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
This commit is contained in:
Jeff Fry 2010-04-20 00:48:03 +00:00
parent 2226d77c27
commit 0ad08d49cc
2 changed files with 25 additions and 17 deletions

View File

@ -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"}
];
}

View File

@ -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