From 135f8700617458a7af4a61f9f79e88ca86665e4c Mon Sep 17 00:00:00 2001 From: Stefano Mazzocchi Date: Wed, 7 Apr 2010 22:56:46 +0000 Subject: [PATCH] - adding interactive test mode so one can use the Windmill IDE to make tests (use ./gridworks test interactive) - split the windmill tests between python and js (the js one is just a silly test, waiting for Jeff to fill it up with more meaty stuff) git-svn-id: http://google-refine.googlecode.com/svn/trunk@418 7d457c2a-affb-35e4-300a-418c747d4874 --- gridworks | 9 ++++++++- tests/windmill/js/basic.js | 17 +++++++++++++++++ .../{ => python}/test_basic_functions.py | 0 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/windmill/js/basic.js rename tests/windmill/{ => python}/test_basic_functions.py (100%) diff --git a/gridworks b/gridworks index d92ee2b45..52b4188a7 100755 --- a/gridworks +++ b/gridworks @@ -450,6 +450,8 @@ test() { } ui_test() { + INTERACTIVE=$1 + windmill_prepare GRIDWORKS_DATA_DIR="${GRIDWORKS_TEST_DIR}/temp" @@ -468,7 +470,12 @@ ui_test() { echo "" echo "Starting Windmill..." - $WINDMILL firefox http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/ test=$GRIDWORKS_TEST_DIR/windmill exit > /dev/null + if [ "$INTERACTIVE" == "" ] ; then + $WINDMILL firefox http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/ test=$GRIDWORKS_TEST_DIR/windmill/python exit > /dev/null + #$WINDMILL firefox http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/ jsdir=$GRIDWORKS_TEST_DIR/windmill/js exit > /dev/null + else + $WINDMILL firefox http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/ > /dev/null + fi echo "" echo "Killing Gridworks" diff --git a/tests/windmill/js/basic.js b/tests/windmill/js/basic.js new file mode 100644 index 000000000..bf821eb6e --- /dev/null +++ b/tests/windmill/js/basic.js @@ -0,0 +1,17 @@ +// 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/test_basic_functions.py b/tests/windmill/python/test_basic_functions.py similarity index 100% rename from tests/windmill/test_basic_functions.py rename to tests/windmill/python/test_basic_functions.py