From c20d7eed7c840fbc3224a468356ba47e8d305f03 Mon Sep 17 00:00:00 2001 From: tof <> Date: Thu, 19 Jul 2007 12:20:24 +0000 Subject: Add functional test for Ticket #592 --- .gitattributes | 3 ++ .../tickets/protected/pages/Ticket592.page | 20 +++++++++ .../tickets/protected/pages/Ticket592.php | 22 ++++++++++ .../tickets/tests/Ticket592TestCase.php | 47 ++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket592.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket592.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket592TestCase.php diff --git a/.gitattributes b/.gitattributes index 3d890f20..fc421b58 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2612,6 +2612,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.page -text tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php -text tests/FunctionalTests/tickets/protected/pages/Ticket591.page -text tests/FunctionalTests/tickets/protected/pages/Ticket591.php -text +tests/FunctionalTests/tickets/protected/pages/Ticket592.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket592.php -text tests/FunctionalTests/tickets/protected/pages/Ticket593.page -text tests/FunctionalTests/tickets/protected/pages/Ticket598.page -text tests/FunctionalTests/tickets/protected/pages/Ticket598.php -text @@ -2667,6 +2669,7 @@ tests/FunctionalTests/tickets/tests/Ticket578TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket585TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket586TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket587TestCase.php -text +tests/FunctionalTests/tickets/tests/Ticket592TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket653TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket659TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket72TestCase.php -text diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket592.page b/tests/FunctionalTests/tickets/protected/pages/Ticket592.page new file mode 100644 index 00000000..d39ddd99 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket592.page @@ -0,0 +1,20 @@ + + +

Without GroupName it is OK

+
+
+ +

+

But with the same...

+
+
+ +

+

With UniqueGroupName...

+
+
+ + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket592.php b/tests/FunctionalTests/tickets/protected/pages/Ticket592.php new file mode 100644 index 00000000..751de056 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket592.php @@ -0,0 +1,22 @@ +label1->Text = "radio1 checked:{".$this->radio1->getChecked()."} radio2 checked:{".$this->radio2->getChecked()."} "; + } + + public function group($sender, $param) + { + $this->label1->Text = "bad_radio1 checked:{".$this->bad_radio1->getChecked()."} bad_radio2 checked:{".$this->bad_radio2->getChecked()."} "; + } + + public function uniquegroup ($sender,$param) + { + $this->label1->Text = "bad_radio3 checked:{".$this->bad_radio3->getChecked()."} bad_radio4 checked:{".$this->bad_radio4->getChecked()."} "; + } + +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php new file mode 100644 index 00000000..b6a734b8 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php @@ -0,0 +1,47 @@ +open('tickets/index.php?page=Ticket592'); + $this->assertTitle("Verifying Ticket 592"); + + $this->assertText("{$base}label1", "Label 1"); + + $this->click("{$base}radio1"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{}'); + + $this->click("{$base}radio2"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{1}'); + + $this->click("{$base}bad_radio1"); + $this->click("{$base}button2"); + $this->pause(800); + $this->assertText("{$base}label1", 'bad_radio1 checked:{1} bad_radio2 checked:{}'); + + $this->click("{$base}bad_radio2"); + $this->click("{$base}button2"); + $this->pause(800); + $this->assertText("{$base}label1", 'bad_radio1 checked:{} bad_radio2 checked:{1}'); + + $this->click("{$base}bad_radio3"); + $this->click("{$base}button3"); + $this->pause(800); + $this->assertText("{$base}label1", 'bad_radio3 checked:{1} bad_radio4 checked:{}'); + + $this->click("{$base}bad_radio4"); + $this->click("{$base}button3"); + $this->pause(800); + $this->assertText("{$base}label1", 'bad_radio3 checked:{} bad_radio4 checked:{1}'); + + } + +} + +?> \ No newline at end of file -- cgit v1.2.3