diff options
Diffstat (limited to 'tests/FunctionalTests/tickets')
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 |