From 031d20c405b922808f4bdf2997f964880b33ab66 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Mon, 10 Feb 2014 15:29:09 +0100 Subject: More tests porting --- .../tickets/protected/pages/Ticket220.page | 18 +++++++----------- .../tickets/protected/pages/Ticket278.page | 12 +++++------- .../tickets/protected/pages/Ticket504.page | 18 +++++++++--------- .../tickets/protected/pages/Ticket585.page | 8 ++++---- .../tickets/protected/pages/Ticket691.page | 4 ++-- .../tickets/tests/Ticket220TestCase.php | 4 ++-- .../tickets/tests/Ticket587TestCase.php | 2 +- .../tickets/tests/Ticket719TestCase.php | 16 ++++++++-------- .../tickets/tests/Ticket769TestCase.php | 10 +++++----- 9 files changed, 43 insertions(+), 49 deletions(-) (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page index e4c8fa95..fec54092 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page @@ -1,30 +1,26 @@

ClientScript Test

- + > if(typeof(ClientScriptInfo) == "undefined") ClientScriptInfo = []; ClientScriptInfo.push("ok 3?") - + if(typeof(ClientScriptInfo) == "undefined") ClientScriptInfo = []; ClientScriptInfo.push("ok 2!") - + - + - Event.observe("button1", "click", function() + $('#button1').click(function() { - element = $("<%= $this->label1->ClientID %>"); - if(element) - element.innerHTML = "Label 1: "+inspect(ClientScriptInfo); - else - alert("failed"); + $("#<%= $this->label1->ClientID %>").html('Label 1: ' + ClientScriptInfo.join('; ')); }); - +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket278.page b/tests/FunctionalTests/tickets/protected/pages/Ticket278.page index e7341bcc..8afaff22 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket278.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket278.page @@ -21,7 +21,7 @@ OnPreRender="validate2_onPostValidate" ErrorMessage="Text 2 is required"> - sender.enabled = $("<%= $this->check1->ClientID %>").checked; + sender.enabled = $("#<%= $this->check1->ClientID %>").get(0).checked; @@ -30,13 +30,11 @@ - Event.OnLoad(function() - { - Event.observe("<%= $this->check1->ClientID %>", "click", function(ev) - { - $("<%= $this->panel1->ClientID %>").toggle(); + jQuery( document ).ready(function() { + jQuery("#<%= $this->check1->ClientID %>").click(function() { + $("#<%= $this->panel1->ClientID %>").toggle(); + }); }); - }); \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket504.page b/tests/FunctionalTests/tickets/protected/pages/Ticket504.page index 767a9c3a..535997d1 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket504.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket504.page @@ -9,48 +9,48 @@ - $('status').innerHTML = sender.ActiveControl.CallbackParameter + " updated"; + $('#status').html(sender.options.CallbackParameter + " updated"); - $('loading').show(); + $('#loading').show(); - $('loading').hide(); + $('#loading').hide(); - - + /> + /> + /> + />

Panel A

diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket585.page b/tests/FunctionalTests/tickets/protected/pages/Ticket585.page index 9c02df4e..58cff91c 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket585.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket585.page @@ -5,12 +5,12 @@ ID="validator1" ControlToValidate="test" OnServerValidate="ChkDate" - ErrorMessage="*"> + ErrorMessage="*"> diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket691.page b/tests/FunctionalTests/tickets/protected/pages/Ticket691.page index e5c4d8f7..ce55715d 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket691.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket691.page @@ -3,7 +3,7 @@ - $('<%=$this->Title->ClientID%>').innerHTML = 'Thanks'; + $('#<%=$this->Title->ClientID%>').html('Thanks'); @@ -16,7 +16,7 @@ - + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php index da5e8c15..120e7bd0 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php @@ -8,9 +8,9 @@ class Ticket220TestCase extends PradoGenericSeleniumTest $this->open('tickets/index.php?page=Ticket220'); $this->assertTextPresent('ClientScript Test'); $this->assertText("{$base}label1", "Label 1"); - + $this->click("button1"); - $this->assertText("{$base}label1", 'exact:Label 1: ["ok", "ok 3?", "ok 2!"]'); + $this->assertText("{$base}label1", 'exact:Label 1: ok; ok 3?; ok 2!'); $this->assertAlertNotPresent(); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php index d5064c1e..7fa37bad 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php @@ -16,7 +16,7 @@ class Ticket587TestCase extends PradoGenericSeleniumTest $this->assertText($base."label1", "Selection 2: value 3 - item 4"); $this->type($base.'text1', 't'); - $this->runScript("Prado.Registry.get('{$base}text1').onKeyPress({})"); + $this->runScript("Prado.Registry['{$base}text1'].onKeyPress({})"); $this->pause(800); $this->select($base."list2", "asd 3 - item 2"); $this->pause(800); diff --git a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php index c71cb0a8..4205427b 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php @@ -6,36 +6,36 @@ class Ticket719TestCase extends PradoGenericSeleniumTest { $this->open("tickets/index.php?page=Ticket719"); $this->verifyTextPresent("Verifying Ticket 719"); - + $base="ctl0_Content_"; - + $this->click("${base}ctl2"); $this->pause(800); $this->assertVisible("${base}ctl0", 'Required'); $this->assertVisible("${base}ctl1", 'Required'); - + $this->type("${base}autocomplete", 'f'); - $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})"); + $this->runScript("Prado.Registry['${base}autocomplete'].onKeyPress({})"); $this->pause(500); $this->verifyTextPresent('Finland'); $this->type("${base}autocomplete", 'fr'); - $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})"); + $this->runScript("Prado.Registry['${base}autocomplete'].onKeyPress({})"); $this->pause(500); $this->verifyTextPresent('French'); $this->type("${base}autocomplete", 'fra'); - $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})"); + $this->runScript("Prado.Registry['${base}autocomplete'].onKeyPress({})"); $this->pause(500); $this->verifyTextPresent('France'); - + $this->click("css=#${base}autocomplete_result ul li"); $this->pause(800); $this->assertNotVisible("${base}ctl1"); $this->type("${base}textbox", "Prado"); $this->assertNotVisible("${base}ctl0"); - + $this->click("${base}ctl2"); $this->pause(800); $this->assertText("${base}Result", "TextBox Content : Prado -- Autocomplete Content :France"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php index 468342a5..74ca48da 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php @@ -7,22 +7,22 @@ class Ticket769TestCase extends PradoGenericSeleniumTest $base="ctl0_Content_"; $this->open('tickets/index.php?page=Ticket769'); $this->assertTitle("Verifying Ticket 769"); - + $this->click($base.'ctl0'); $this->assertVisible($base.'ctl1'); - + $this->type($base.'T1', 'Prado'); $this->click($base.'ctl0'); $this->pause(800); $this->assertNotVisible($base.'ctl1'); $this->verifyTextPresent($base.'ctl0', 'T1 clicked' ); - + $this->click($base.'ctl2'); $this->pause(800); $this->verifyTextPresent($base.'B', 'This is B'); $this->click($base.'ctl3'); $this->pause(800); - + $this->type($base.'T1', ''); $this->click($base.'ctl0'); $this->assertVisible($base.'ctl1'); @@ -31,6 +31,6 @@ class Ticket769TestCase extends PradoGenericSeleniumTest $this->pause(800); $this->assertNotVisible($base.'ctl1'); $this->verifyTextPresent($base.'ctl0', 'T1 clicked clicked' ); - + } } \ No newline at end of file -- cgit v1.2.3