summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/Tickets
diff options
context:
space:
mode:
authorwei <>2006-02-02 06:06:30 +0000
committerwei <>2006-02-02 06:06:30 +0000
commit2037f60c73a77f28cc09fcb64cb424e16c593765 (patch)
treeccc4002a0dc984028e0381f5d4e9342022108075 /tests/FunctionalTests/protected/pages/Tickets
parenta2a030c3cfbb0249762fffa4159107bc13f8952d (diff)
Fixed #21
Diffstat (limited to 'tests/FunctionalTests/protected/pages/Tickets')
-rw-r--r--tests/FunctionalTests/protected/pages/Tickets/Ticket_21.page10
-rw-r--r--tests/FunctionalTests/protected/pages/Tickets/Ticket_21.php37
-rw-r--r--tests/FunctionalTests/protected/pages/Tickets/config.xml5
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.page b/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.page
new file mode 100644
index 00000000..e0619ea1
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.page
@@ -0,0 +1,10 @@
+<com:TContent ID="Content">
+<h2 class="defect">TRadioButton always postback if AutoPostBack=true</h2>
+
+<com:TRadioButton ID="button1"
+ AutoPostBack="true"
+ OnCheckedChanged="doClick" />
+<com:TLabel ForControl="button1" Text="radio button 1" /> <br>
+
+<com:TLabel ID="label1" />
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.php b/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.php
new file mode 100644
index 00000000..7a9e3519
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.php
@@ -0,0 +1,37 @@
+<?php
+
+class Ticket_21 extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+
+ if(!$this->IsPostBack)
+ $this->setViewState("clicks", 0);
+ }
+
+ public function doClick($sender, $param)
+ {
+ $clicks = $this->getViewState("clicks");
+ $clicks++;
+ $this->label1->setText("Radio button clicks: $clicks");
+ $this->setViewState("clicks", $clicks);
+ }
+}
+
+class Ticket_21_TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open(Prado::getApplication()->getTestPage(__FILE__));
+ $this->assertTitle("Verifying Ticket 21");
+ $this->clickAndWait("ctl0_Content_button1");
+ $this->verifyTextPresent("Radio button clicks: 1", "");
+ $this->click("ctl0_Content_button1");
+ $this->verifyTextPresent("Radio button clicks: 1", "");
+
+ }
+}
+
+?>
+
diff --git a/tests/FunctionalTests/protected/pages/Tickets/config.xml b/tests/FunctionalTests/protected/pages/Tickets/config.xml
new file mode 100644
index 00000000..8e9db49e
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Tickets/config.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <pages MasterClass="Pages.TicketTestPage" />
+</configuration> \ No newline at end of file