summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets
diff options
context:
space:
mode:
authorxue <>2006-06-27 14:21:23 +0000
committerxue <>2006-06-27 14:21:23 +0000
commitae57f5fb591ecc01c9cb007c4517efa5c4ff9e72 (patch)
tree444debad2bb57a7b2e00cb8006aea4a0d96c9fa2 /tests/FunctionalTests/tickets
parent56466c36f4bbe5a1fee8d77642dc57b2366164e3 (diff)
Fixed #239.
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket239.page19
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket239.php16
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket239TestCase.php55
3 files changed, 90 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket239.page b/tests/FunctionalTests/tickets/protected/pages/Ticket239.page
new file mode 100644
index 00000000..a67c38a8
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket239.page
@@ -0,0 +1,19 @@
+<com:TContent ID="Content">
+
+<com:TMultiView ActiveViewIndex="0">
+ <com:TView ID="view1" OnActivate="activateView" OnDeactivate="deactivateView">
+ view1
+ <com:TButton Text="Next view" CommandName="NextView" />
+ </com:TView>
+ <com:TView ID="view2" OnActivate="activateView" OnDeactivate="deactivateView">
+ view2
+ <com:TButton Text="Prev view" CommandName="PreviousView" />
+ <com:TButton Text="Next view" CommandName="NextView" />
+ </com:TView>
+ <com:TView ID="view3" OnActivate="activateView" OnDeactivate="deactivateView">
+ view3
+ <com:TButton Text="Prev view" CommandName="PreviousView" />
+ </com:TView>
+</com:TMultiView>
+<com:TLabel ID="Result" EnableViewState="false" />
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket239.php b/tests/FunctionalTests/tickets/protected/pages/Ticket239.php
new file mode 100644
index 00000000..a40c94b5
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket239.php
@@ -0,0 +1,16 @@
+<?php
+
+class Ticket239 extends TPage
+{
+ public function activateView($sender,$param)
+ {
+ $this->Result->Text.=$sender->ID." is activated. ";
+ }
+
+ public function deactivateView($sender,$param)
+ {
+ $this->Result->Text.=$sender->ID." is deactivated. ";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
new file mode 100644
index 00000000..9d895cb4
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
@@ -0,0 +1,55 @@
+<?php
+
+class Ticket239TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket239');
+
+ // view1
+ $this->verifyTextPresent('view1 is activated','');
+ $this->verifyTextNotPresent('view1 is deactivated','');
+ $this->verifyTextNotPresent('view2 is activated','');
+ $this->verifyTextNotPresent('view2 is deactivated','');
+ $this->verifyTextNotPresent('view3 is activated','');
+ $this->verifyTextNotPresent('view3 is deactivated','');
+
+ // goto view2
+ $this->clickAndWait('name=ctl0$Content$ctl1');
+ $this->verifyTextNotPresent('view1 is activated','');
+ $this->verifyTextPresent('view1 is deactivated','');
+ $this->verifyTextPresent('view2 is activated','');
+ $this->verifyTextNotPresent('view2 is deactivated','');
+ $this->verifyTextNotPresent('view3 is activated','');
+ $this->verifyTextNotPresent('view3 is deactivated','');
+
+ // goto view3
+ $this->clickAndWait('name=ctl0$Content$ctl3');
+ $this->verifyTextNotPresent('view1 is activated','');
+ $this->verifyTextNotPresent('view1 is deactivated','');
+ $this->verifyTextNotPresent('view2 is activated','');
+ $this->verifyTextPresent('view2 is deactivated','');
+ $this->verifyTextPresent('view3 is activated','');
+ $this->verifyTextNotPresent('view3 is deactivated','');
+
+ // goto view2
+ $this->clickAndWait('name=ctl0$Content$ctl4');
+ $this->verifyTextNotPresent('view1 is activated','');
+ $this->verifyTextNotPresent('view1 is deactivated','');
+ $this->verifyTextPresent('view2 is activated','');
+ $this->verifyTextNotPresent('view2 is deactivated','');
+ $this->verifyTextNotPresent('view3 is activated','');
+ $this->verifyTextPresent('view3 is deactivated','');
+
+ // goto view1
+ $this->clickAndWait('name=ctl0$Content$ctl2');
+ $this->verifyTextPresent('view1 is activated','');
+ $this->verifyTextNotPresent('view1 is deactivated','');
+ $this->verifyTextNotPresent('view2 is activated','');
+ $this->verifyTextPresent('view2 is deactivated','');
+ $this->verifyTextNotPresent('view3 is activated','');
+ $this->verifyTextNotPresent('view3 is deactivated','');
+ }
+}
+
+?> \ No newline at end of file