From 7c65b2f40ea9242260eac5a746863f5925423861 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 22 Sep 2013 22:39:41 +0200 Subject: Phing: added target for phpunit+selenium Functional tests were using an old selenium RC version. Ported them to use phpunit + selenium; next: opensauce --- tests/test_tools/selenium/core/scripts/se2html.js | 63 ----------------------- 1 file changed, 63 deletions(-) delete mode 100644 tests/test_tools/selenium/core/scripts/se2html.js (limited to 'tests/test_tools/selenium/core/scripts/se2html.js') diff --git a/tests/test_tools/selenium/core/scripts/se2html.js b/tests/test_tools/selenium/core/scripts/se2html.js deleted file mode 100644 index 4894d4b1..00000000 --- a/tests/test_tools/selenium/core/scripts/se2html.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - -This is an experiment in creating a "selenese" parser that drastically -cuts down on the line noise associated with writing tests in HTML. - -The 'parse' function will accept the follow sample commands. - -test-cases: - //comment - command "param" - command "param" // comment - command "param" "param2" - command "param" "param2" // this is a comment - -TODO: -1) Deal with multiline parameters -2) Escape quotes properly -3) Determine whether this should/will become the "preferred" syntax - for delivered Selenium self-test scripts -*/ - - -function separse(doc) { - // Get object - script = doc.getElementById('testcase') - // Split into lines - lines = script.text.split('\n'); - - - var command_pattern = / *(\w+) *"([^"]*)" *(?:"([^"]*)"){0,1}(?: *(\/\/ *.+))*/i; - var comment_pattern = /^ *(\/\/ *.+)/ - - // Regex each line into selenium command and convert into table row. - // eg. " " - var new_test_source = ''; - var new_line = ''; - for (var x=0; x < lines.length; x++) { - result = lines[x].match(command_pattern); - if (result != null) { - new_line = "" + (result[1] || ' ') + "" + - "" + (result[2] || ' ') + "" + - "" + (result[3] || ' ') + "" + - "" + (result[4] || ' ') + "\n"; - new_test_source += new_line; - } - result = lines[x].match(comment_pattern); - if (result != null) { - new_line = '' + - (result[1] || ' ') + - ''; - new_test_source += new_line; - } - } - - // Create HTML Table - body = doc.body - body.innerHTML += ""+ - new_test_source + - "
"; - -} - - -- cgit v1.2.3