summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket592.page20
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket592.php22
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket592TestCase.php47
3 files changed, 89 insertions, 0 deletions
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 @@
+<com:TContent ID="Content">
+
+<h2><strong>Without</strong> GroupName it is OK</h2>
+ <com:TRadioButton ID="radio1" Text="Radio Button 1" /><br/>
+ <com:TRadioButton ID="radio2" Text="Radio Button 2" /><br/>
+ <com:TActiveButton id="button1" OnCallback="noGroup" Text="test without GroupName" />
+<br/><br/>
+<h2>But with the same...</h2>
+ <com:TRadioButton ID="bad_radio1" GroupName="bad" Text="Bad Radio Button 1" /><br/>
+ <com:TRadioButton ID="bad_radio2" GroupName="bad" Text="Bad Radio Button 2" /><br/>
+ <com:TActiveButton id="button2" OnCallback="group" Text="test with a GroupName" />
+<br/><br/>
+<h2>With UniqueGroupName...</h2>
+ <com:TRadioButton ID="bad_radio3" UniqueGroupName="bad" Text="Bad Radio Button 3" /><br/>
+ <com:TRadioButton ID="bad_radio4" UniqueGroupName="bad" Text="Bad Radio Button 4" /><br/>
+ <com:TActiveButton id="button3" OnCallback="uniquegroup" Text="test with a UniqueGroupName" />
+
+<com:TActiveLabel ID="label1" Text="Label 1"/>
+
+</com:TContent> \ 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 @@
+<?php
+Prado::using('System.Web.UI.ActiveControls.*');
+class Ticket592 extends TPage
+{
+ public function noGroup($sender, $param)
+ {
+ $this->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 @@
+<?php
+
+class Ticket592TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->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