From 934069ca2164753f72783eaa7d9fd98e4280f2ec Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 13 Feb 2006 06:04:33 +0000 Subject: Reorganized FT test folder. --- tests/FunctionalTests/tickets/application.xml | 4 ++ tests/FunctionalTests/tickets/index.php | 8 ++++ .../tickets/protected/pages/Layout.php | 14 +++++++ .../tickets/protected/pages/Layout.tpl | 45 ++++++++++++++++++++++ .../tickets/protected/pages/Ticket21.page | 10 +++++ .../tickets/protected/pages/Ticket21.php | 22 +++++++++++ .../tickets/protected/pages/Ticket27.page | 17 ++++++++ .../tickets/protected/pages/config.xml | 5 +++ .../tickets/tests/Ticket21TestCase.php | 16 ++++++++ .../tickets/tests/Ticket27TestCase.php | 18 +++++++++ 10 files changed, 159 insertions(+) create mode 100644 tests/FunctionalTests/tickets/application.xml create mode 100644 tests/FunctionalTests/tickets/index.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Layout.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Layout.tpl create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket21.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket21.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket27.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/config.xml create mode 100644 tests/FunctionalTests/tickets/tests/Ticket21TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket27TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/application.xml b/tests/FunctionalTests/tickets/application.xml new file mode 100644 index 00000000..e973d37d --- /dev/null +++ b/tests/FunctionalTests/tickets/application.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/index.php b/tests/FunctionalTests/tickets/index.php new file mode 100644 index 00000000..fe127639 --- /dev/null +++ b/tests/FunctionalTests/tickets/index.php @@ -0,0 +1,8 @@ +run(); + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Layout.php new file mode 100644 index 00000000..64b0aebe --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.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/tickets/protected/pages/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl new file mode 100644 index 00000000..bf2f8fab --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl @@ -0,0 +1,45 @@ + + + + + + + + + +

+ + +
+ +
+
+ + Validate XHTML 1.0 + +View Source +
+ + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket21.page b/tests/FunctionalTests/tickets/protected/pages/Ticket21.page new file mode 100644 index 00000000..e0619ea1 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket21.page @@ -0,0 +1,10 @@ + +

TRadioButton always postback if AutoPostBack=true

+ + +
+ + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket21.php b/tests/FunctionalTests/tickets/protected/pages/Ticket21.php new file mode 100644 index 00000000..041ba4b7 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket21.php @@ -0,0 +1,22 @@ +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); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket27.page b/tests/FunctionalTests/tickets/protected/pages/Ticket27.page new file mode 100644 index 00000000..f92511c7 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket27.page @@ -0,0 +1,17 @@ + +

TCheckBoxList demo js error on IE

+ + + + + + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/config.xml b/tests/FunctionalTests/tickets/protected/pages/config.xml new file mode 100644 index 00000000..83bb5791 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/config.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php new file mode 100644 index 00000000..d9677779 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php @@ -0,0 +1,16 @@ +open('tickets/index.php?page=Ticket21'); + $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", ""); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php new file mode 100644 index 00000000..6a5ccdb9 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php @@ -0,0 +1,18 @@ +open('tickets/index.php?page=Ticket27'); + $this->verifyTitle("Verifying Ticket 27", ""); + $this->click("//input[@value='Agree']", ""); + $this->assertVisible("ctl0_Content_validator1", ""); + $this->type("ctl0_Content_TextBox", "122"); + $this->assertNotVisible("ctl0_Content_validator1", ""); + $this->clickAndWait("//input[@value='Disagree']", ""); + $this->assertNotVisible("ctl0_Content_validator1", ""); + } +} + +?> \ No newline at end of file -- cgit v1.2.3