diff options
Diffstat (limited to 'tests/FunctionalTests/tickets')
9 files changed, 43 insertions, 49 deletions
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 @@ <com:TContent ID="Content"> <h1>ClientScript Test</h1> - + <com:TClientScript ScriptUrl=<%~ test.js %>> if(typeof(ClientScriptInfo) == "undefined") ClientScriptInfo = []; ClientScriptInfo.push("ok 3?") </com:TClientScript> - + <com:TClientScript> if(typeof(ClientScriptInfo) == "undefined") ClientScriptInfo = []; ClientScriptInfo.push("ok 2!") </com:TClientScript> - + <com:TLabel ID="label1" Text="Label 1" /> <input type="button" id="button1" value="update" /> - + <com:TClientScript PradoScripts="prado"> - 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('; ')); }); </com:TClientScript> - + </com:TContent>
\ 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">
<prop:ClientSide.OnValidate>
- sender.enabled = $("<%= $this->check1->ClientID %>").checked;
+ sender.enabled = $("#<%= $this->check1->ClientID %>").get(0).checked;
</prop:ClientSide.OnValidate>
</com:TRequiredFieldValidator>
@@ -30,13 +30,11 @@ <com:TButton ID="button1" Text="Submit!" />
<com:TClientScript>
- 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();
+ });
});
- });
</com:TClientScript>
</com:TContent>
\ 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 @@ <com:TCallbackOptions ID="LoadDataOptions">
<prop:ClientSide.OnSuccess>
- $('status').innerHTML = sender.ActiveControl.CallbackParameter + " updated";
+ $('#status').html(sender.options.CallbackParameter + " updated");
</prop:ClientSide.OnSuccess>
<prop:ClientSide.OnLoading>
- $('loading').show();
+ $('#loading').show();
</prop:ClientSide.OnLoading>
<prop:ClientSide.OnComplete>
- $('loading').hide();
+ $('#loading').hide();
</prop:ClientSide.OnComplete>
</com:TCallbackOptions>
-
-<com:TActiveLinkButton
+
+<com:TActiveLinkButton
Text="Tab A"
ID="linka"
OnCallback="changePanel"
ActiveControl.CallbackOptions="LoadDataOptions"
ActiveControl.CallbackParameter="panelA"
- />
+ />
<com:TActiveLinkButton
Text="Tab B"
ID="linkb"
OnCallback="changePanel"
ActiveControl.CallbackOptions="LoadDataOptions"
ActiveControl.CallbackParameter="panelB"
- />
+ />
<com:TActiveLinkButton
Text="Tab C"
ID="linkc"
OnCallback="changePanel"
ActiveControl.CallbackOptions="LoadDataOptions"
ActiveControl.CallbackParameter="panelC"
- />
+ />
<com:TActiveLinkButton
Text="Tab D"
ID="linkd"
OnCallback="changePanel"
ActiveControl.CallbackOptions="LoadDataOptions"
ActiveControl.CallbackParameter="panelD"
- />
+ />
<com:TActivePanel ID="panelA">
<h1>Panel A</h1>
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="*">
<prop:ClientSide
- OnValidationError="$('error').innerHTML='Error'"
- OnValidationSuccess="$('error').innerHTML='Success'"
+ OnValidationError="$('#error').html('Error')"
+ OnValidationSuccess="$('#error').html('Success')"
ObserveChanges="false"
-
+
/>
</com:TActiveCustomValidator>
<span id="error"></span>
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 @@ <com:TCallbackOptions ID="RatingOption"> <prop:ClientSide.OnComplete> - $('<%=$this->Title->ClientID%>').innerHTML = 'Thanks'; + $('#<%=$this->Title->ClientID%>').html('Thanks'); </prop:ClientSide.OnComplete> </com:TCallbackOptions> <com:TActiveLabel ID="Title" Text="Cast your vote:" /> @@ -16,7 +16,7 @@ <com:TListItem Value="5" Text="Five stars" /> <com:TListItem Value="6" Text="Six stars" /> </com:TActiveRatingList> -<com:TActiveLabel ID="Result"/> +<com:TActiveLabel ID="Result"/> </com:TContent>
\ 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 |