From 2037f60c73a77f28cc09fcb64cb424e16c593765 Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 2 Feb 2006 06:06:30 +0000 Subject: Fixed #21 --- .../protected/pages/TicketTestPage.php | 14 +++++++ .../protected/pages/TicketTestPage.tpl | 45 ++++++++++++++++++++++ .../protected/pages/Tickets/Ticket_21.page | 10 +++++ .../protected/pages/Tickets/Ticket_21.php | 37 ++++++++++++++++++ .../protected/pages/Tickets/config.xml | 5 +++ 5 files changed, 111 insertions(+) create mode 100644 tests/FunctionalTests/protected/pages/TicketTestPage.php create mode 100644 tests/FunctionalTests/protected/pages/TicketTestPage.tpl create mode 100644 tests/FunctionalTests/protected/pages/Tickets/Ticket_21.page create mode 100644 tests/FunctionalTests/protected/pages/Tickets/Ticket_21.php create mode 100644 tests/FunctionalTests/protected/pages/Tickets/config.xml (limited to 'tests/FunctionalTests/protected') diff --git a/tests/FunctionalTests/protected/pages/TicketTestPage.php b/tests/FunctionalTests/protected/pages/TicketTestPage.php new file mode 100644 index 00000000..f647f56b --- /dev/null +++ b/tests/FunctionalTests/protected/pages/TicketTestPage.php @@ -0,0 +1,14 @@ +getPage())); + $this->getPage()->setTitle("Verifying Ticket $num"); + $this->ticketlink->setText("Verifying Ticket $num"); + $this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/ticket/{$num}"); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/TicketTestPage.tpl b/tests/FunctionalTests/protected/pages/TicketTestPage.tpl new file mode 100644 index 00000000..bf2f8fab --- /dev/null +++ b/tests/FunctionalTests/protected/pages/TicketTestPage.tpl @@ -0,0 +1,45 @@ + + + + + + + + + +

+ + +
+ +
+
+ + Validate XHTML 1.0 + +View Source +
+ + \ No newline at end of file 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 @@ + +

TRadioButton always postback if AutoPostBack=true

+ + +
+ + +
\ 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 @@ +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 @@ + + + + + \ No newline at end of file -- cgit v1.2.3