diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /tests/FunctionalTests | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'tests/FunctionalTests')
231 files changed, 7384 insertions, 7384 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php index e873ae9d..d0b8650e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php @@ -1,26 +1,26 @@ -<?php
-
-class ActiveControlExpressionTag extends TPage
-{
- public function button1_clicked($sender, $param)
- {
- $this->subpanel1->Visible = true;
- $data = array('1', 'two');
- $this->repeater1->DataSource = $data;
- $this->repeater1->dataBind();
- }
-
- public function button1_callback($sender, $param)
- {
- $this->panel1->renderControl($param->NewWriter);
- $this->button2->Enabled=true;
- }
-
- public function button2_callback($sender, $param)
- {
- $this->panel2->Visible=true;
- $this->Page->CallbackClient->insertContentAfter('contents', $this->panel2);
- }
-}
-
+<?php + +class ActiveControlExpressionTag extends TPage +{ + public function button1_clicked($sender, $param) + { + $this->subpanel1->Visible = true; + $data = array('1', 'two'); + $this->repeater1->DataSource = $data; + $this->repeater1->dataBind(); + } + + public function button1_callback($sender, $param) + { + $this->panel1->renderControl($param->NewWriter); + $this->button2->Enabled=true; + } + + public function button2_callback($sender, $param) + { + $this->panel2->Visible=true; + $this->Page->CallbackClient->insertContentAfter('contents', $this->panel2); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php index a154e0dd..ec9040a1 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php @@ -1,11 +1,11 @@ -<?php
-
-class ActiveControlWithTinyMce extends TPage
-{
- function button1_callback($sender, $param)
- {
- $this->label1->Text = $this->text1->SafeText;
- }
-}
-
+<?php + +class ActiveControlWithTinyMce extends TPage +{ + function button1_callback($sender, $param) + { + $this->label1->Text = $this->text1->SafeText; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php index eced2457..44c20ef6 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php @@ -1,31 +1,31 @@ -<?php
-
-class ActiveImageButtonTest extends TPage
-{
- function change_text($sender, $param)
- {
- $this->image1->AlternateText = "Muahahahah";
- }
-
- function change_image($sender, $param)
- {
- $this->image1->ImageUrl = $sender->CustomData;
- }
-
- function change_align($sender, $param)
- {
- $this->image1->ImageAlign="absbottom";
- }
-
- function change_description($sender, $param)
- {
- $this->image1->DescriptionUrl = "maahahhaa";
- }
-
- function image1_clicked($sender, $param)
- {
- $this->label1->Text = "Image clicked at x={$param->x}, y={$param->y}";
- }
-}
-
+<?php + +class ActiveImageButtonTest extends TPage +{ + function change_text($sender, $param) + { + $this->image1->AlternateText = "Muahahahah"; + } + + function change_image($sender, $param) + { + $this->image1->ImageUrl = $sender->CustomData; + } + + function change_align($sender, $param) + { + $this->image1->ImageAlign="absbottom"; + } + + function change_description($sender, $param) + { + $this->image1->DescriptionUrl = "maahahhaa"; + } + + function image1_clicked($sender, $param) + { + $this->label1->Text = "Image clicked at x={$param->x}, y={$param->y}"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php index 4fc3a23e..74ce985c 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php @@ -1,16 +1,16 @@ -<?php
-
-class ActiveLinkButtonTest extends TPage
-{
- function button2_onclick($sender, $param)
- {
- $this->label1->Text = "Button 1 was clicked ";
- }
-
- function button2_oncallback($sender, $param)
- {
- $this->label1->Text .= "using callback!";
- }
-}
-
+<?php + +class ActiveLinkButtonTest extends TPage +{ + function button2_onclick($sender, $param) + { + $this->label1->Text = "Button 1 was clicked "; + } + + function button2_oncallback($sender, $param) + { + $this->label1->Text .= "using callback!"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php index d2991653..eaa61fd6 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php @@ -1,47 +1,47 @@ -<?php
-
-class ActiveListBoxMasterTest extends TPage
-{
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function select_index_123()
- {
- $this->list1->setSelectedIndices(array(1,2,3));
- }
-
- function select_index_4()
- {
- $this->list1->setSelectedIndex(4);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_1()
- {
- $this->list1->setSelectedValue("value 1");
- }
-
- function select_values_25()
- {
- $this->list1->setSelectedValues(array('value 2', 'value 5'));
- }
-
- function change_to_multiple()
- {
- $this->list1->SelectionMode="Multiple";
- }
-
- function change_to_single()
- {
- $this->list1->SelectionMode="Single";
- }
-}
-
+<?php + +class ActiveListBoxMasterTest extends TPage +{ + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function select_index_123() + { + $this->list1->setSelectedIndices(array(1,2,3)); + } + + function select_index_4() + { + $this->list1->setSelectedIndex(4); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_1() + { + $this->list1->setSelectedValue("value 1"); + } + + function select_values_25() + { + $this->list1->setSelectedValues(array('value 2', 'value 5')); + } + + function change_to_multiple() + { + $this->list1->SelectionMode="Multiple"; + } + + function change_to_single() + { + $this->list1->SelectionMode="Single"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php index 942bb1a0..a80dbc1c 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php @@ -1,47 +1,47 @@ -<?php
-
-class ActiveListBoxTest extends TPage
-{
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function select_index_123()
- {
- $this->list1->setSelectedIndices(array(1,2,3));
- }
-
- function select_index_4()
- {
- $this->list1->setSelectedIndex(4);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_1()
- {
- $this->list1->setSelectedValue("value 1");
- }
-
- function select_values_25()
- {
- $this->list1->setSelectedValues(array('value 2', 'value 5'));
- }
-
- function change_to_multiple()
- {
- $this->list1->SelectionMode="Multiple";
- }
-
- function change_to_single()
- {
- $this->list1->SelectionMode="Single";
- }
-}
-
+<?php + +class ActiveListBoxTest extends TPage +{ + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function select_index_123() + { + $this->list1->setSelectedIndices(array(1,2,3)); + } + + function select_index_4() + { + $this->list1->setSelectedIndex(4); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_1() + { + $this->list1->setSelectedValue("value 1"); + } + + function select_values_25() + { + $this->list1->setSelectedValues(array('value 2', 'value 5')); + } + + function change_to_multiple() + { + $this->list1->SelectionMode="Multiple"; + } + + function change_to_single() + { + $this->list1->SelectionMode="Single"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php index e922319e..aaf43abc 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php @@ -1,18 +1,18 @@ -<?php
-
-class ActivePanelVisibleTest extends TPage
-{
- public function showA()
- {
- $this->pnlB->Visible = false;
- $this->pnlA->Visible = true;
- }
-
- public function showB()
- {
- $this->pnlB->Visible = true;
- $this->pnlA->Visible = false;
- }
-}
-
+<?php + +class ActivePanelVisibleTest extends TPage +{ + public function showA() + { + $this->pnlB->Visible = false; + $this->pnlA->Visible = true; + } + + public function showB() + { + $this->pnlB->Visible = true; + $this->pnlA->Visible = false; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php index ee805e11..22d2c79c 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php @@ -1,28 +1,28 @@ -<?php
-
-class ActiveRadioButtonListTest extends TPage
-{
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- var_dump($values);
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function select_index_4()
- {
- $this->list1->setSelectedIndex(4);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_1()
- {
- $this->list1->setSelectedValue("value 1");
- }
-}
-
+<?php + +class ActiveRadioButtonListTest extends TPage +{ + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + var_dump($values); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function select_index_4() + { + $this->list1->setSelectedIndex(4); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_1() + { + $this->list1->setSelectedValue("value 1"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php index 64e7d92e..fce204d1 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php @@ -1,34 +1,34 @@ -<?php
-
-class ActiveRadioButtonTest extends TPage
-{
- function change_radio1_text()
- {
- $this->radio1->Text = "Hello Radio Button 1";
- }
-
- function change_radio1_checked()
- {
- $this->radio1->Checked = !$this->radio1->Checked;
- }
-
- function change_radio2_text()
- {
- $this->radio2->Text = "Radio Button 2 World";
- }
-
- function change_radio2_checked()
- {
- $this->radio2->Checked = !$this->radio2->Checked;
- }
-
- function radiobutton_requested($sender, $param)
- {
- $this->label1->Text = "Label 1:".$sender->Text.
- ($sender->checked ? ' Checked ' : ' Not Checked');
- }
-
-
-}
-
+<?php + +class ActiveRadioButtonTest extends TPage +{ + function change_radio1_text() + { + $this->radio1->Text = "Hello Radio Button 1"; + } + + function change_radio1_checked() + { + $this->radio1->Checked = !$this->radio1->Checked; + } + + function change_radio2_text() + { + $this->radio2->Text = "Radio Button 2 World"; + } + + function change_radio2_checked() + { + $this->radio2->Checked = !$this->radio2->Checked; + } + + function radiobutton_requested($sender, $param) + { + $this->label1->Text = "Label 1:".$sender->Text. + ($sender->checked ? ' Checked ' : ' Not Checked'); + } + + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php index c825f3f8..50b9817d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php @@ -1,27 +1,27 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListAllowInputTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListAllowInputTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php index 4b087b76..c094a34b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php @@ -1,27 +1,27 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListAutoPostBackTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListAutoPostBackTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php index 5c6dfa70..0ba260d4 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php @@ -1,23 +1,23 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListCheckBoxesTest extends TPage{ }
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListCheckBoxesTest extends TPage{ } ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php index 0cac7418..fde87812 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php @@ -1,37 +1,37 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListEnabledTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-
- public function enable($sender, $param){
- $this->RatingList->setEnabled(true);
- $this->Status->setText('Enabled=true');
- }
-
- public function disable($sender, $param){
- $this->RatingList->setEnabled(false);
- $this->Status->setText('Enabled=false');
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListEnabledTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } + + public function enable($sender, $param){ + $this->RatingList->setEnabled(true); + $this->Status->setText('Enabled=true'); + } + + public function disable($sender, $param){ + $this->RatingList->setEnabled(false); + $this->Status->setText('Enabled=false'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php index 06d82d39..c8281256 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php @@ -1,27 +1,27 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListHoverCaptionTest extends TPage{
- public function ratingChanged($sender, $param){
- $sender->setCaption($sender->getRating().' : '.$sender->getSelectedValue());
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListHoverCaptionTest extends TPage{ + public function ratingChanged($sender, $param){ + $sender->setCaption($sender->getRating().' : '.$sender->getSelectedValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php index fe5c8404..97369a8d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php @@ -1,32 +1,32 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListRatingTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText('Rating: '.$sender->getRating());
- }
-
- public function setRating($sender, $param){
- $this->RatingList->setRating(3);
- $this->ratingChanged($this->RatingList, null);
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListRatingTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText('Rating: '.$sender->getRating()); + } + + public function setRating($sender, $param){ + $this->RatingList->setRating(3); + $this->ratingChanged($this->RatingList, null); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php index 070fd13f..722f60ea 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php @@ -1,38 +1,38 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListReadOnlyTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-
- public function readOnly($sender, $param){
- $this->RatingList->setReadOnly(true);
- $this->Status->setText('ReadOnly=true');
- }
-
- public function writable($sender, $param){
- $this->RatingList->setReadOnly(false);
- $this->Status->setText('ReadOnly=false');
- }
-
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListReadOnlyTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } + + public function readOnly($sender, $param){ + $this->RatingList->setReadOnly(true); + $this->Status->setText('ReadOnly=true'); + } + + public function writable($sender, $param){ + $this->RatingList->setReadOnly(false); + $this->Status->setText('ReadOnly=false'); + } + +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php index 4dbc6949..f0d8d2ef 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php @@ -1,32 +1,32 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListSelectedIndexTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText('SelectedIndex: '.$sender->getSelectedIndex());
- }
-
- public function setSelectedIndex($sender, $param){
- $this->RatingList->setSelectedIndex(5);
- $this->ratingChanged($this->RatingList, null);
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListSelectedIndexTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText('SelectedIndex: '.$sender->getSelectedIndex()); + } + + public function setSelectedIndex($sender, $param){ + $this->RatingList->setSelectedIndex(5); + $this->ratingChanged($this->RatingList, null); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php index 65958eeb..a3c714fe 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php @@ -1,12 +1,12 @@ -<?php
-
-class ActiveRedirectionTest extends TPage
-{
- function button_clicked($sender, $param)
- {
- $default=$this->Service->constructUrl($this->Service->DefaultPage);
- $this->Response->redirect($default);
- }
-}
-
+<?php + +class ActiveRedirectionTest extends TPage +{ + function button_clicked($sender, $param) + { + $default=$this->Service->constructUrl($this->Service->DefaultPage); + $this->Response->redirect($default); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Callback.php b/tests/FunctionalTests/active-controls/protected/pages/Callback.php index d19d92aa..00357f1e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Callback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Callback.php @@ -1,13 +1,13 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Callback extends TPage
-{
- function callback1_Requested()
- {
- var_dump("ok!");
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Callback extends TPage +{ + function callback1_Requested() + { + var_dump("ok!"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php index bf8d730b..319cc354 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php @@ -1,11 +1,11 @@ -<?php
-
-class CallbackCustomValidatorTest extends TPage
-{
- function validate_text1($sender, $param)
- {
- $param->IsValid = $param->Value == 'Prado';
- }
-}
-
+<?php + +class CallbackCustomValidatorTest extends TPage +{ + function validate_text1($sender, $param) + { + $param->IsValid = $param->Value == 'Prado'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php index 84099114..e747bb63 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php @@ -1,17 +1,17 @@ -<?php
-
-class ClientSideDispatch extends TPage
-{
-
- function method1($sender, $param)
- {
- $this->status1->Text = "Method 1 callback with parameter: {$param->CallbackParameter}";
- }
-
- function method2($sender, $param)
- {
- $this->status2->Text = "Method 2 callback";
- }
-}
-
+<?php + +class ClientSideDispatch extends TPage +{ + + function method1($sender, $param) + { + $this->status1->Text = "Method 1 callback with parameter: {$param->CallbackParameter}"; + } + + function method2($sender, $param) + { + $this->status2->Text = "Method 2 callback"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php index 7da2834e..8a3e6c9f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php @@ -1,11 +1,11 @@ -<?php
-
-class CustomTemplateComponent extends TTemplateControl
-{
- public function suboncallback ($sender, $param)
- {
- $sender->setText("Foo");
- }
-}
-
+<?php + +class CustomTemplateComponent extends TTemplateControl +{ + public function suboncallback ($sender, $param) + { + $sender->setText("Foo"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php index 18005a2b..a1d55adc 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php @@ -1,27 +1,27 @@ -<?php
-
-class CustomTemplateControlTest extends TPage
-{
- function button2_onclick($sender, $param)
- {
-
- $this->label1->Text = "Button 1 was clicked ";
- $this->label1->Text .= $this->foo->Text;
-
- $x=Prado::createComponent('Application.pages.CustomTemplateComponent');
-
- $this->placeholder->getControls()->add($x);
- $this->placeholder->dataBind();
- }
-
- function button2_callback($sender, $param)
- {
- $this->placeholder->render($param->NewWriter);
-
- $this->label1->Text .= " using callback!";
- $this->label1->Text .= "... and this is the textbox text: ". $this->foo->Text;
- }
-
-}
-
+<?php + +class CustomTemplateControlTest extends TPage +{ + function button2_onclick($sender, $param) + { + + $this->label1->Text = "Button 1 was clicked "; + $this->label1->Text .= $this->foo->Text; + + $x=Prado::createComponent('Application.pages.CustomTemplateComponent'); + + $this->placeholder->getControls()->add($x); + $this->placeholder->dataBind(); + } + + function button2_callback($sender, $param) + { + $this->placeholder->render($param->NewWriter); + + $this->label1->Text .= " using callback!"; + $this->label1->Text .= "... and this is the textbox text: ". $this->foo->Text; + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php index 54c99c64..edc68ae4 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php @@ -1,37 +1,37 @@ -<?php
-
-class CustomValidatorByPass extends TPage
-{
- public function onLoad($param)
- {
-
- parent::onLoad($param);
-
- $Client = $this->validator2->getActiveControl()->getClientSide();
-
- $Client->setOnLoading('$(\'loginLoader\').show();');
- $Client->setOnComplete('$(\'loginLoader\').hide();');
-
- //$Client->setOnValidationError('alert(\'Authentication Failed\');');
- //$Client->setOnValidationSuccess('new Effect.Fade(\'loginBox\')');
-
- }
-
- public function validateUser($sender,$param)
- {
- $param->IsValid = $this->Password->Text=='test';
- }
-
- public function doLogin($sender,$param)
- {
-
- /* This isnt even getting called */
- if($this->Page->IsValid)
- {
- // Re-Render the active panel
- }
-
- }
-}
-
+<?php + +class CustomValidatorByPass extends TPage +{ + public function onLoad($param) + { + + parent::onLoad($param); + + $Client = $this->validator2->getActiveControl()->getClientSide(); + + $Client->setOnLoading('$(\'loginLoader\').show();'); + $Client->setOnComplete('$(\'loginLoader\').hide();'); + + //$Client->setOnValidationError('alert(\'Authentication Failed\');'); + //$Client->setOnValidationSuccess('new Effect.Fade(\'loginBox\')'); + + } + + public function validateUser($sender,$param) + { + $param->IsValid = $this->Password->Text=='test'; + } + + public function doLogin($sender,$param) + { + + /* This isnt even getting called */ + if($this->Page->IsValid) + { + // Re-Render the active panel + } + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php index d318660d..ce3d1bc0 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php @@ -1,63 +1,63 @@ -<?php
-
-class DMessagesPanel extends TTemplateControl
-{
- private $_panelCssClass = '';
-
- public function onInit($param)
- {
- parent::onInit($param);
- $this->MessagesPanelEffect->Text = "";
- }
-
- public function setMessage($value)
- {
- $this->Message->Text = $value;
- if ($value != '')
- $this->setVisible(true);
- else
- $this->setVisible(false);
- }
-
- public function setVisible($value)
- {
- $this->ensureChildControls();
- if ($value === true) {
- echo "set visible";
- $this->MessagesPanel->Visible = true;
- $this->Message->Visible = true;
- $this->setEffect(null);
- } else {
- $this->MessagesPanel->Visible = false;
- }
- }
-
- public function setEffect($effect = null)
- {
- if ($effect !== null) {
- $text = "<script type=\"text/javascript\" language=\"javascript\">\r\n";
- $text .= "// <![CDATA[\r\n";
- //$text .= "new Effect.$effect(\"" . $this->Page->DMessagesPanel->MessagesPanel->ClientID . "\");\r\n";
- $text .= "new Effect.$effect(\"" . $this->ClientID . "\");\r\n";
- $text .= "// ]]>\r\n";
- $text .= "</script>";
- $this->MessagesPanelEffect->Text = $text;
- } else {
- $this->MessagesPanelEffect->Text = '';
- }
- }
-
- public function setPanelCssClass($value)
- {
- $this->ensureChildControls();
- $this->MessagesPanel->CssClass = $value;
- }
-
- public function setMessageCssClass($value)
- {
- $this->ensureChildControls();
- $this->Message->CssClass = $value;
- }
-}
-
+<?php + +class DMessagesPanel extends TTemplateControl +{ + private $_panelCssClass = ''; + + public function onInit($param) + { + parent::onInit($param); + $this->MessagesPanelEffect->Text = ""; + } + + public function setMessage($value) + { + $this->Message->Text = $value; + if ($value != '') + $this->setVisible(true); + else + $this->setVisible(false); + } + + public function setVisible($value) + { + $this->ensureChildControls(); + if ($value === true) { + echo "set visible"; + $this->MessagesPanel->Visible = true; + $this->Message->Visible = true; + $this->setEffect(null); + } else { + $this->MessagesPanel->Visible = false; + } + } + + public function setEffect($effect = null) + { + if ($effect !== null) { + $text = "<script type=\"text/javascript\" language=\"javascript\">\r\n"; + $text .= "// <![CDATA[\r\n"; + //$text .= "new Effect.$effect(\"" . $this->Page->DMessagesPanel->MessagesPanel->ClientID . "\");\r\n"; + $text .= "new Effect.$effect(\"" . $this->ClientID . "\");\r\n"; + $text .= "// ]]>\r\n"; + $text .= "</script>"; + $this->MessagesPanelEffect->Text = $text; + } else { + $this->MessagesPanelEffect->Text = ''; + } + } + + public function setPanelCssClass($value) + { + $this->ensureChildControls(); + $this->MessagesPanel->CssClass = $value; + } + + public function setMessageCssClass($value) + { + $this->ensureChildControls(); + $this->Message->CssClass = $value; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php index 94a4ec25..05fd323e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php @@ -1,17 +1,17 @@ -<?php
-
-class DatePickerInCallback extends TPage {
-
- public function onLoad($param){
- parent::onLoad($param);
- if(!$this->IsPostBack)
- $this->datepicker->setTimeStamp(time());
- }
-
- public function testDatePicker($sender, $param){
- $this->status->Text = $this->datepicker->getTimestamp()." ".$this->datepicker->getText();
- }
-
- }
-
+<?php + +class DatePickerInCallback extends TPage { + + public function onLoad($param){ + parent::onLoad($param); + if(!$this->IsPostBack) + $this->datepicker->setTimeStamp(time()); + } + + public function testDatePicker($sender, $param){ + $this->status->Text = $this->datepicker->getTimestamp()." ".$this->datepicker->getText(); + } + + } + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php index 7e9195dc..1785bd34 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php @@ -1,21 +1,21 @@ -<?php
-
-class DelayedCallback extends TPage
-{
- function callback1($sender, $param)
- {
- $ms = 4;
- sleep($ms);
- $this->status->Text="Callback 1 returned after {$ms}s";
- }
-
- function callback2($sender, $param)
- {
- $ms = 2;
- sleep($ms);
- $this->status->Text="Callback 2 delayed {$ms}s";
- }
-
-}
-
+<?php + +class DelayedCallback extends TPage +{ + function callback1($sender, $param) + { + $ms = 4; + sleep($ms); + $this->status->Text="Callback 1 returned after {$ms}s"; + } + + function callback2($sender, $param) + { + $ms = 2; + sleep($ms); + $this->status->Text="Callback 2 delayed {$ms}s"; + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php index a49a8bfa..7c791564 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php @@ -1,26 +1,26 @@ -<?php
-
-class DisplayStyleTest extends TPage
-{
- function display_button1()
- {
- $this->button1->Display="Dynamic";
- }
-
- function hide_button1()
- {
- $this->button1->Display="None";
- }
-
- function show_button2()
- {
- $this->button2->Display="Fixed";
- }
-
- function hide_button2()
- {
- $this->button2->Display="Hidden";
- }
-}
-
+<?php + +class DisplayStyleTest extends TPage +{ + function display_button1() + { + $this->button1->Display="Dynamic"; + } + + function hide_button1() + { + $this->button1->Display="None"; + } + + function show_button2() + { + $this->button2->Display="Fixed"; + } + + function hide_button2() + { + $this->button2->Display="Hidden"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php index 729a87dc..0df32f6a 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php @@ -1,23 +1,23 @@ -<?php
-
-class DynamicRepeaterDataTest extends TPage
-{
- function button_clicked($sender, $param)
- {
- $this->_repeater->dataSource = array(1,2,3);
- $this->_repeater->dataBind();
- }
-
- function button_callback($sender, $param)
- {
- $this->panel1->render($param->NewWriter);
- }
-
- function rpt_button_clicked($sender, $param)
- {
- $item = $sender->NamingContainer;
- $item->label1->Text = $sender->Text;
- }
-}
-
+<?php + +class DynamicRepeaterDataTest extends TPage +{ + function button_clicked($sender, $param) + { + $this->_repeater->dataSource = array(1,2,3); + $this->_repeater->dataBind(); + } + + function button_callback($sender, $param) + { + $this->panel1->render($param->NewWriter); + } + + function rpt_button_clicked($sender, $param) + { + $item = $sender->NamingContainer; + $item->label1->Text = $sender->Text; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php index dc47d867..bcc53389 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php @@ -1,21 +1,21 @@ -<?php
-
-class EventTriggeredCallback extends TPage
-{
- function text1_focused($sender, $param)
- {
- $this->label1->Text = 'text 1 focused';
- }
-
- function panel1_onmouseover($sender, $param)
- {
- $this->label1->Text = 'panel 1 on mouse over '.time();
- }
-
- function button1_clicked($sender, $param)
- {
- $this->label1->Text = 'button 1 clicked';
- }
-}
-
+<?php + +class EventTriggeredCallback extends TPage +{ + function text1_focused($sender, $param) + { + $this->label1->Text = 'text 1 focused'; + } + + function panel1_onmouseover($sender, $param) + { + $this->label1->Text = 'panel 1 on mouse over '.time(); + } + + function button1_clicked($sender, $param) + { + $this->label1->Text = 'button 1 clicked'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php index d31c10f6..e2ffbf07 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php +++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php @@ -1,53 +1,53 @@ -<?php
-
-class GerTurno2 extends TPage {
-
- private $_turnos = null;
-
-
- public function onLoad($param) {
- parent::onLoad($param);
-
- $this->loadTurnoOptions();
-
- if (!$this->IsPostBack) {
- $this->ativaModoEdicao();
- }
- }
-
-
- protected function loadTurnoOptions()
- {
- $this->DDropTurno->DataTextField="descricao";
- $this->DDropTurno->DataValueField="id";
- $this->_turnos = array(
- array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'),
- array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2')
- );
- $this->DDropTurno->setDataSource($this->_turnos);
- $this->DDropTurno->dataBind();
- }
-
-
- protected function ativaModoEdicao() {
- $this->loadDadosTurno($this->DDropTurno->getSelectedValue());
- }
-
-
- protected function loadDadosTurno($id) {
- foreach ($this->_turnos as $key => $tur) {
- if ($tur['id'] == $id) {
- $this->Codigo->setText($tur['codigo']);
- $this->Descricao->setText($tur['descricao']);
- }
- }
- }
-
-
- public function trocaTurno($sender,$param) {
- $this->loadDadosTurno($sender->getSelectedValue());
- }
-
-}
-
+<?php + +class GerTurno2 extends TPage { + + private $_turnos = null; + + + public function onLoad($param) { + parent::onLoad($param); + + $this->loadTurnoOptions(); + + if (!$this->IsPostBack) { + $this->ativaModoEdicao(); + } + } + + + protected function loadTurnoOptions() + { + $this->DDropTurno->DataTextField="descricao"; + $this->DDropTurno->DataValueField="id"; + $this->_turnos = array( + array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'), + array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2') + ); + $this->DDropTurno->setDataSource($this->_turnos); + $this->DDropTurno->dataBind(); + } + + + protected function ativaModoEdicao() { + $this->loadDadosTurno($this->DDropTurno->getSelectedValue()); + } + + + protected function loadDadosTurno($id) { + foreach ($this->_turnos as $key => $tur) { + if ($tur['id'] == $id) { + $this->Codigo->setText($tur['codigo']); + $this->Descricao->setText($tur['descricao']); + } + } + } + + + public function trocaTurno($sender,$param) { + $this->loadDadosTurno($sender->getSelectedValue()); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Home.php b/tests/FunctionalTests/active-controls/protected/pages/Home.php index 22b6528a..3dfb4bb0 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Home.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Home.php @@ -1,11 +1,11 @@ -<?php
-
-class Home extends TPage
-{
- public function btnTest_OnCallback($sender,$param)
- {
- $this->lblTest->Text = "Testing";
- }
-}
-
+<?php + +class Home extends TPage +{ + public function btnTest_OnCallback($sender,$param) + { + $this->lblTest->Text = "Testing"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php index e69ffdf2..c58a006a 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php +++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php @@ -1,13 +1,13 @@ -<?php
-
-class InPlaceWithValidator extends TPage
-{
- function button_valid($sender, $param){
-
- $this->status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text;
-
- }
-
-}
-
+<?php + +class InPlaceWithValidator extends TPage +{ + function button_valid($sender, $param){ + + $this->status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text; + + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php index 1102ffb2..51e56d48 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php @@ -1,22 +1,22 @@ -<?php
-
-class LargePageStateTest extends TPage
-{
- function onLoad($param)
- {
- parent::onLoad($param);
- for($i=0;$i<100;$i++) //may try 10000, but may crash PHP.
- {
- $label = new TLabel();
- $label->Text=" this is a very long label with some text $i:";
- $this->Panel1->Controls[] = $label;
- }
- }
-
- function button_clicked($sender, $param)
- {
- $this->status->Text .= ' Callback Clicked... ';
- }
-}
-
+<?php + +class LargePageStateTest extends TPage +{ + function onLoad($param) + { + parent::onLoad($param); + for($i=0;$i<100;$i++) //may try 10000, but may crash PHP. + { + $label = new TLabel(); + $label->Text=" this is a very long label with some text $i:"; + $this->Panel1->Controls[] = $label; + } + } + + function button_clicked($sender, $param) + { + $this->status->Text .= ' Callback Clicked... '; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php index 3c3038c2..56f9c68f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php @@ -1,22 +1,22 @@ -<?php
-
-class LargePageStateTest2 extends TPage
-{
- function onLoad($param)
- {
- parent::onLoad($param);
- for($i=0;$i<100;$i++) //may try 10000, but may crash PHP.
- {
- $label = new TLabel();
- $label->Text=" this is a very long label with some text $i:";
- $this->Panel1->Controls[] = $label;
- }
- }
-
- function button_clicked($sender, $param)
- {
- $this->status->Text .= ' Callback Clicked... ';
- }
-}
-
+<?php + +class LargePageStateTest2 extends TPage +{ + function onLoad($param) + { + parent::onLoad($param); + for($i=0;$i<100;$i++) //may try 10000, but may crash PHP. + { + $label = new TLabel(); + $label->Text=" this is a very long label with some text $i:"; + $this->Panel1->Controls[] = $label; + } + } + + function button_clicked($sender, $param) + { + $this->status->Text .= ' Callback Clicked... '; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.php b/tests/FunctionalTests/active-controls/protected/pages/Master1.php index 173a59f0..1bbcb9c4 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Master1.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.php @@ -1,7 +1,7 @@ -<?php
-
-class Master1 extends TTemplateControl
-{
-}
-
+<?php + +class Master1 extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php index 9a59713d..d3713308 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php @@ -1,16 +1,16 @@ -<?php
-
-class MessagesPanelTest extends TPage
-{
- function show_clicked($sender, $param)
- {
- $this->panel1->setMessage("hello world");
- }
-
- function hide_clicked($sender, $param)
- {
- $this->panel1->setMessage("");
- }
-}
-
+<?php + +class MessagesPanelTest extends TPage +{ + function show_clicked($sender, $param) + { + $this->panel1->setMessage("hello world"); + } + + function hide_clicked($sender, $param) + { + $this->panel1->setMessage(""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyControl.php b/tests/FunctionalTests/active-controls/protected/pages/MyControl.php index 2c6b7f5b..5ced5d3a 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/MyControl.php +++ b/tests/FunctionalTests/active-controls/protected/pages/MyControl.php @@ -1,8 +1,8 @@ -<?php
-
-class MyControl extends TTemplateControl
-{
-
-}
-
+<?php + +class MyControl extends TTemplateControl +{ + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php index 723af42d..6736138d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php @@ -1,42 +1,42 @@ -<?php
-
-class MyTabPanelTest extends TPage
-{
- private $panels = array('pnlContentsA', 'pnlContentsB', 'pnlContentsC', );
-
- private function showPanel($id, $param)
- {
- foreach($this->panels as $panel)
- {
- if($id == $panel)
- {
- $this->$panel->setAttribute('style', 'display: block;');
- $this->$panel->setVisible(true);
- $this->$panel->render($param->NewWriter);
- }
- else
- {
- $this->$panel->setVisible(false);
- }
- }
- }
-
- public function onShowPanelA($sender, $param)
- {
- $this->showPanel('pnlContentsA', $param);
- }
-
- public function onShowPanelB($sender, $param)
- {
- $this->showPanel('pnlContentsB', $param);
- }
-
- public function onShowPanelC($sender, $param)
- {
- $this->showPanel('pnlContentsC', $param);
- }
-}
-
-
-
+<?php + +class MyTabPanelTest extends TPage +{ + private $panels = array('pnlContentsA', 'pnlContentsB', 'pnlContentsC', ); + + private function showPanel($id, $param) + { + foreach($this->panels as $panel) + { + if($id == $panel) + { + $this->$panel->setAttribute('style', 'display: block;'); + $this->$panel->setVisible(true); + $this->$panel->render($param->NewWriter); + } + else + { + $this->$panel->setVisible(false); + } + } + } + + public function onShowPanelA($sender, $param) + { + $this->showPanel('pnlContentsA', $param); + } + + public function onShowPanelB($sender, $param) + { + $this->showPanel('pnlContentsB', $param); + } + + public function onShowPanelC($sender, $param) + { + $this->showPanel('pnlContentsC', $param); + } +} + + + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php index 0abd8eb5..f6e5071d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php @@ -1,11 +1,11 @@ <?php -
-class NullStateTest extends TPage
-{
- public function btnTest_OnCallback($sender,$param)
- {
- $this->lblTest->Text = "Testing";
- }
-}
+ +class NullStateTest extends TPage +{ + public function btnTest_OnCallback($sender,$param) + { + $this->lblTest->Text = "Testing"; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php index 022f6dad..8a1ba198 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php +++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php @@ -1,34 +1,34 @@ -<?php
-
-class PopulateActiveList extends TPage
-{
- public function populate_list1($sender, $param)
- {
- $data = array('Hello', 'World', 'Prado');
- $this->list1->Items->clear();
- for($i = 0,$k=count($data); $i<$k; $i++)
- {
- $item = new TListItem($data[$i], $i);
- $this->list1->Items[] = $item;
- }
- }
-
- public function populate_list2($sender, $param)
- {
- $data = array('Hello', 'World', 'Prado');
- $this->list2->Items->clear();
- for($i = 0,$k=count($data); $i<$k; $i++)
- {
- $item = new TListItem($data[$i], $i);
- $this->list2->Items[] = $item;
- }
- }
-
- public function list_changed($sender, $param)
- {
- $text = $sender->SelectedItem ? $sender->SelectedItem->Text : 'Not selected';
- $this->label1->Text = $sender->ID . ': '.$text;
- }
-}
-
+<?php + +class PopulateActiveList extends TPage +{ + public function populate_list1($sender, $param) + { + $data = array('Hello', 'World', 'Prado'); + $this->list1->Items->clear(); + for($i = 0,$k=count($data); $i<$k; $i++) + { + $item = new TListItem($data[$i], $i); + $this->list1->Items[] = $item; + } + } + + public function populate_list2($sender, $param) + { + $data = array('Hello', 'World', 'Prado'); + $this->list2->Items->clear(); + for($i = 0,$k=count($data); $i<$k; $i++) + { + $item = new TListItem($data[$i], $i); + $this->list2->Items[] = $item; + } + } + + public function list_changed($sender, $param) + { + $text = $sender->SelectedItem ? $sender->SelectedItem->Text : 'Not selected'; + $this->label1->Text = $sender->ID . ': '.$text; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php index 1257b45b..d22f2922 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php @@ -1,45 +1,45 @@ -<?php
-
-class PostLoadingTest extends TPage
-{
- public function onInit($param)
- {
- parent::onInit($param);
-
- // Text Box
- $textBox=new TTextBox();
- $textBox->setVisible(false);
- $textBox->setID("MyTextBox");
- $this->panel1->getControls()->add($textBox);
- $this->registerObject("MyTextBox", $textBox);
-
-
- // Submit button
- $button=new TActiveButton();
- $button->setVisible(false);
- $button->setID("MyButton");
- $button->setText("Submit");
- $button->attachEventHandler("OnCallback", array($this, "clickedButton"));
- $this->panel1->getControls()->add($button);
- $this->registerObject("MyButton", $button);
-
- }
-
-
- function callback1_requested($sender, $param)
- {
- $this->MyTextBox->visible = true;
- $this->MyButton->ActiveControl->EnableUpdate=false;
- $this->MyButton->visible = true;
- $this->panel1->render($param->NewWriter);
- }
-
- function clickedButton($sender, $param)
- {
- $this->panel1->getControls()->add('Result is '.$this->MyTextBox->getText());
- $this->panel1->render($param->NewWriter);
- $this->Page->CallbackClient->Highlight('heading');
- }
-}
-
+<?php + +class PostLoadingTest extends TPage +{ + public function onInit($param) + { + parent::onInit($param); + + // Text Box + $textBox=new TTextBox(); + $textBox->setVisible(false); + $textBox->setID("MyTextBox"); + $this->panel1->getControls()->add($textBox); + $this->registerObject("MyTextBox", $textBox); + + + // Submit button + $button=new TActiveButton(); + $button->setVisible(false); + $button->setID("MyButton"); + $button->setText("Submit"); + $button->attachEventHandler("OnCallback", array($this, "clickedButton")); + $this->panel1->getControls()->add($button); + $this->registerObject("MyButton", $button); + + } + + + function callback1_requested($sender, $param) + { + $this->MyTextBox->visible = true; + $this->MyButton->ActiveControl->EnableUpdate=false; + $this->MyButton->visible = true; + $this->panel1->render($param->NewWriter); + } + + function clickedButton($sender, $param) + { + $this->panel1->getControls()->add('Result is '.$this->MyTextBox->getText()); + $this->panel1->render($param->NewWriter); + $this->Page->CallbackClient->Highlight('heading'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php index 10c45aa3..eb77073b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php @@ -1,28 +1,28 @@ -<?php
-
-class RadioButtonListTest extends TPage
-{
- public function radChange($sender,$param){
- $choice = 'Choice : ';
- switch($this->rad_button_list->SelectedValue){
- case 'yes':
- $choice.='Yes :-)';
- break;
- case 'no':
- $choice.='No :-(';
- break;
- case 'whynot':
- $choice.='Why not ???';
- break;
- }
- $this->label->Text = $choice;
- }
-
- public function action($sender,$param){
- $this->label->Text = 'Action...';
- }
-
-}
-
-
+<?php + +class RadioButtonListTest extends TPage +{ + public function radChange($sender,$param){ + $choice = 'Choice : '; + switch($this->rad_button_list->SelectedValue){ + case 'yes': + $choice.='Yes :-)'; + break; + case 'no': + $choice.='No :-('; + break; + case 'whynot': + $choice.='Why not ???'; + break; + } + $this->label->Text = $choice; + } + + public function action($sender,$param){ + $this->label->Text = 'Action...'; + } + +} + + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php index 98b62e04..8fd879bc 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php @@ -1,34 +1,34 @@ -<?php
-
-class RatingList extends TPage
-{
- function list1_oncallback($sender, $param)
- {
- $newRating = ($sender->Rating + $sender->SelectedIndex+1)/2;
- $sender->Rating = $newRating;
- $sender->Caption = "Rating : ".$newRating;
- $sender->Enabled=false;
- }
-
-
- function list2_oncallback($sender, $param)
- {
- }
-
- function button1_clicked($sender, $param)
- {
- $this->list1->Enabled = true;
- }
-
- function button2_clicked($sender, $param)
- {
- $this->list1->Enabled=false;
- }
-
- function button5_clicked($sender, $param)
- {
- $this->list1->SelectedIndex=3;
- }
-}
-
+<?php + +class RatingList extends TPage +{ + function list1_oncallback($sender, $param) + { + $newRating = ($sender->Rating + $sender->SelectedIndex+1)/2; + $sender->Rating = $newRating; + $sender->Caption = "Rating : ".$newRating; + $sender->Enabled=false; + } + + + function list2_oncallback($sender, $param) + { + } + + function button1_clicked($sender, $param) + { + $this->list1->Enabled = true; + } + + function button2_clicked($sender, $param) + { + $this->list1->Enabled=false; + } + + function button5_clicked($sender, $param) + { + $this->list1->SelectedIndex=3; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php index c5235dc6..013ffe61 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php @@ -1,61 +1,61 @@ -<?php
-
-class RepeaterWithActiveControls extends TPage
-{
- private $_data=array('Hello', 'World', 'Prado');
-
- private $_status='';
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- if(!$this->IsCallback)
- {
- $this->repeater1->DataSource = $this->_data;
- $this->repeater1->dataBind();
- }
- }
-
- public function label_changed($sender, $param)
- {
- $index = $sender->getParent()->ItemIndex + 1;
- $this->_status .= " Update textbox {$index}: ".$sender->Text;
- }
-
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- if(trim($this->_status))
- $this->label1->Text = $this->_status;
- }
-
- public function enable_edit($sender, $param)
- {
- if($this->update_button->Enabled==false)
- {
- for($i = 0; $i<count($this->repeater1->Items); $i++)
- {
- $textbox = $this->repeater1->Items[$i]->edit_box;
- $textbox->DisplayTextBox = true;
- }
- $this->update_button->Enabled = true;
- $sender->Enabled=false;
- }
- }
-
- public function disable_edit($sender, $param)
- {
- if($this->update_button->Enabled==true)
- {
- for($i = 0; $i<count($this->repeater1->Items); $i++)
- {
- $textbox = $this->repeater1->Items[$i]->edit_box;
- $textbox->DisplayTextBox = false;
- }
- $this->edit_button->Enabled = true;
- $sender->Enabled=false;
- }
- }
-}
-
+<?php + +class RepeaterWithActiveControls extends TPage +{ + private $_data=array('Hello', 'World', 'Prado'); + + private $_status=''; + + public function onLoad($param) + { + parent::onLoad($param); + if(!$this->IsCallback) + { + $this->repeater1->DataSource = $this->_data; + $this->repeater1->dataBind(); + } + } + + public function label_changed($sender, $param) + { + $index = $sender->getParent()->ItemIndex + 1; + $this->_status .= " Update textbox {$index}: ".$sender->Text; + } + + public function onPreRender($param) + { + parent::onPreRender($param); + if(trim($this->_status)) + $this->label1->Text = $this->_status; + } + + public function enable_edit($sender, $param) + { + if($this->update_button->Enabled==false) + { + for($i = 0; $i<count($this->repeater1->Items); $i++) + { + $textbox = $this->repeater1->Items[$i]->edit_box; + $textbox->DisplayTextBox = true; + } + $this->update_button->Enabled = true; + $sender->Enabled=false; + } + } + + public function disable_edit($sender, $param) + { + if($this->update_button->Enabled==true) + { + for($i = 0; $i<count($this->repeater1->Items); $i++) + { + $textbox = $this->repeater1->Items[$i]->edit_box; + $textbox->DisplayTextBox = false; + } + $this->edit_button->Enabled = true; + $sender->Enabled=false; + } + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php index a5358d98..a6df2abd 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php @@ -1,42 +1,42 @@ -<?php
-
-class ReplaceContentTest extends TPage
-{
- function appendContent($sender, $param)
- {
- $this->CallbackClient->appendContent($this->subpanel, $this->replacementContent());
- }
-
- function prependContent($sender, $param)
- {
- $this->CallbackClient->prependContent($this->subpanel, $this->replacementContent());
- }
-
- function insertContentBefore($sender, $param)
- {
- $this->CallbackClient->insertContentBefore($this->subpanel, $this->replacementContent());
- }
-
- function insertContentAfter($sender, $param)
- {
- $this->CallbackClient->insertContentAfter($this->subpanel, $this->replacementContent());
- }
-
- function replaceContent($sender, $param)
- {
- $this->CallbackClient->replaceContent($this->subpanel, $this->replacementContent());
- }
-
- function replacementContent()
- {
- if($this->check1->Checked)
- {
- $this->newPanel->Visible=true;
- return $this->newPanel;
- }
- else
- return $this->content->Text;
- }
-}
-
+<?php + +class ReplaceContentTest extends TPage +{ + function appendContent($sender, $param) + { + $this->CallbackClient->appendContent($this->subpanel, $this->replacementContent()); + } + + function prependContent($sender, $param) + { + $this->CallbackClient->prependContent($this->subpanel, $this->replacementContent()); + } + + function insertContentBefore($sender, $param) + { + $this->CallbackClient->insertContentBefore($this->subpanel, $this->replacementContent()); + } + + function insertContentAfter($sender, $param) + { + $this->CallbackClient->insertContentAfter($this->subpanel, $this->replacementContent()); + } + + function replaceContent($sender, $param) + { + $this->CallbackClient->replaceContent($this->subpanel, $this->replacementContent()); + } + + function replacementContent() + { + if($this->check1->Checked) + { + $this->newPanel->Visible=true; + return $this->newPanel; + } + else + return $this->content->Text; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php index 4a488107..9d4a7695 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php @@ -1,13 +1,13 @@ -<?php
-
-class PageStateTest extends TPage
-{
- function button1_oncallback($sender, $param)
- {
- //sleep(rand(0,5));
- $sender->CustomData = $sender->CustomData + 1;
- $this->label1->Text = " button1 clicked ".$sender->CustomData." times";
- }
-}
-
+<?php + +class PageStateTest extends TPage +{ + function button1_oncallback($sender, $param) + { + //sleep(rand(0,5)); + $sender->CustomData = $sender->CustomData + 1; + $this->label1->Text = " button1 clicked ".$sender->CustomData." times"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php index 9b5a05f7..6cc5a500 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php @@ -1,26 +1,26 @@ -<?php
-
-class TInPlaceTextBoxTest extends TPage
-{
- function load_text($sender, $param)
- {
- $sender->Text = "muahaha";
- }
-
- function label1_changed($sender, $param)
- {
- $this->status->Text = "Status: ". $sender->Text;
- }
-
- function button_clicked($sender, $param)
- {
- $this->label1->Text = "hahahaha";
- }
-
- function NewPackageSubject($sender, $param)
- {
- throw new TException('Exist');
- }
-}
-
+<?php + +class TInPlaceTextBoxTest extends TPage +{ + function load_text($sender, $param) + { + $sender->Text = "muahaha"; + } + + function label1_changed($sender, $param) + { + $this->status->Text = "Status: ". $sender->Text; + } + + function button_clicked($sender, $param) + { + $this->label1->Text = "hahahaha"; + } + + function NewPackageSubject($sender, $param) + { + throw new TException('Exist'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php b/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php index dc643e52..170e618b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php @@ -1,7 +1,7 @@ -<?php
-
-class TestMasterPage extends TTemplateControl
-{
-}
-
+<?php + +class TestMasterPage extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php index cf43bccd..1d2cc92f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php @@ -1,11 +1,11 @@ -<?php
-
-class TextBoxValidationCallback extends TPage
-{
-
- function lookupZipCode()
- {
- $this->City->Text = "City: ".$this->Address->Text . ' Zip: '.$this->ZipCode->Text;
- }
-}
+<?php + +class TextBoxValidationCallback extends TPage +{ + + function lookupZipCode() + { + $this->City->Text = "City: ".$this->Address->Text . ' Zip: '.$this->ZipCode->Text; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php index a8f83187..69985541 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php @@ -1,12 +1,12 @@ -<?php
-
-class ValueTriggerCallbackTest extends TPage
-{
- function text1_changed($sender, $param)
- {
- $values = $param->getCallbackParameter();
- $this->label1->Text = "Old = ".$values->OldValue." : New Value = ".$values->NewValue;
- }
-}
-
+<?php + +class ValueTriggerCallbackTest extends TPage +{ + function text1_changed($sender, $param) + { + $values = $param->getCallbackParameter(); + $this->label1->Text = "Old = ".$values->OldValue." : New Value = ".$values->NewValue; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php index 7da7315c..0cf7d927 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php @@ -1,20 +1,20 @@ -<?php
-
-class ActiveControlExpressionTagTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=ActiveControlExpressionTag');
- $this->assertTextPresent('Active Control With Expression Tag Test');
- $this->assertTextNotPresent('Text box content:');
-
- $this->type('textbox1', 'Hello world');
- $this->click('button1');
- $this->pause(800);
-
- $this->assertText('repeats', 'result - 1 result - two');
- $this->assertText('contents', 'Text box content: Hello world');
- }
-}
-
+<?php + +class ActiveControlExpressionTagTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=ActiveControlExpressionTag'); + $this->assertTextPresent('Active Control With Expression Tag Test'); + $this->assertTextNotPresent('Text box content:'); + + $this->type('textbox1', 'Hello world'); + $this->click('button1'); + $this->pause(800); + + $this->assertText('repeats', 'result - 1 result - two'); + $this->assertText('contents', 'Text box content: Hello world'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php index d497e915..477f7fea 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php @@ -1,17 +1,17 @@ -<?php
-
-class ActiveImageButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveImageButtonTest");
- $this->assertTextPresent("TActiveImageButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("image1");
- $this->pause(800);
- //unable to determine mouse position
- $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+");
- }
-}
-
+<?php + +class ActiveImageButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveImageButtonTest"); + $this->assertTextPresent("TActiveImageButton Functional Test"); + $this->assertText("label1", "Label 1"); + $this->click("image1"); + $this->pause(800); + //unable to determine mouse position + $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php index 305a5c93..7024acd2 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php @@ -1,16 +1,16 @@ -<?php
-
-class ActiveLinkButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveLinkButtonTest");
- $this->verifyTextPresent("TActiveLinkButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("button2");
- $this->pause(800);
- $this->assertText("label1", "Button 1 was clicked using callback!");
- }
-}
-
+<?php + +class ActiveLinkButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveLinkButtonTest"); + $this->verifyTextPresent("TActiveLinkButton Functional Test"); + $this->assertText("label1", "Label 1"); + $this->click("button2"); + $this->pause(800); + $this->assertText("label1", "Button 1 was clicked using callback!"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php index 7f006d9e..116dd4ad 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php @@ -1,49 +1,49 @@ -<?php
-
-class ActiveListBoxMasterTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveListBoxMasterTest");
- $this->assertTextPresent('Active List Box Functional Test');
-
- $base = 'ctl0_body_';
-
- $this->assertText($base."label1", "Label 1");
-
- $this->click($base."button1");
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '1,2,3');
-
- $this->click($base.'button3');
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '0');
-
- $this->click($base.'button4');
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '4');
-
- $this->click($base.'button5');
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '1,4');
-
- $this->click($base.'button2');
- $this->pause(800);
- $this->assertEmptySelection($base."list1");
-
- $this->click($base.'button6');
- $this->pause(800);
- $this->click($base."button1");
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '1,2,3');
-
- $this->select($base."list1", "item 1");
- $this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1');
-
- $this->addSelection($base."list1", "item 4");
- $this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1, value 4');
- }
-}
+<?php + +class ActiveListBoxMasterTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveListBoxMasterTest"); + $this->assertTextPresent('Active List Box Functional Test'); + + $base = 'ctl0_body_'; + + $this->assertText($base."label1", "Label 1"); + + $this->click($base."button1"); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '1,2,3'); + + $this->click($base.'button3'); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '0'); + + $this->click($base.'button4'); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '4'); + + $this->click($base.'button5'); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '1,4'); + + $this->click($base.'button2'); + $this->pause(800); + $this->assertEmptySelection($base."list1"); + + $this->click($base.'button6'); + $this->pause(800); + $this->click($base."button1"); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '1,2,3'); + + $this->select($base."list1", "item 1"); + $this->pause(800); + $this->assertText($base.'label1', 'Selection: value 1'); + + $this->addSelection($base."list1", "item 4"); + $this->pause(800); + $this->assertText($base.'label1', 'Selection: value 1, value 4'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php index 96f56b30..78dbd77e 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php @@ -1,47 +1,47 @@ -<?php
-
-class ActiveListBoxTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveListBoxTest");
- $this->assertTextPresent('Active List Box Functional Test');
-
- $this->assertText("label1", "Label 1");
-
- $this->click("button1");
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '1,2,3');
-
- $this->click('button3');
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '0');
-
- $this->click('button4');
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '4');
-
- $this->click('button5');
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '1,4');
-
- $this->click('button2');
- $this->pause(800);
- $this->assertEmptySelection("list1");
-
- $this->click('button6');
- $this->pause(800);
- $this->click("button1");
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '1,2,3');
-
- $this->select("list1", "item 1");
- $this->pause(800);
- $this->assertText('label1', 'Selection: value 1');
-
- $this->addSelection("list1", "item 4");
- $this->pause(800);
- $this->assertText('label1', 'Selection: value 1, value 4');
- }
-}
+<?php + +class ActiveListBoxTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveListBoxTest"); + $this->assertTextPresent('Active List Box Functional Test'); + + $this->assertText("label1", "Label 1"); + + $this->click("button1"); + $this->pause(800); + $this->assertSelectedIndexes('list1', '1,2,3'); + + $this->click('button3'); + $this->pause(800); + $this->assertSelectedIndexes('list1', '0'); + + $this->click('button4'); + $this->pause(800); + $this->assertSelectedIndexes('list1', '4'); + + $this->click('button5'); + $this->pause(800); + $this->assertSelectedIndexes('list1', '1,4'); + + $this->click('button2'); + $this->pause(800); + $this->assertEmptySelection("list1"); + + $this->click('button6'); + $this->pause(800); + $this->click("button1"); + $this->pause(800); + $this->assertSelectedIndexes('list1', '1,2,3'); + + $this->select("list1", "item 1"); + $this->pause(800); + $this->assertText('label1', 'Selection: value 1'); + + $this->addSelection("list1", "item 4"); + $this->pause(800); + $this->assertText('label1', 'Selection: value 1, value 4'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php index ce269cd1..45078830 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php @@ -1,50 +1,50 @@ -<?php
-
-class ActiveRadioButtonListTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $this->open("active-controls/index.php?page=ActiveRadioButtonListTest");
- $this->verifyTextPresent("TActiveRadioButtonList Test Case");
-
- $this->assertText("label1", "Label 1");
-
-
- $this->click("button3");
- $this->pause(800);
- $this->assertCheckBoxes(array(0));
-
- $this->click("button2");
- $this->pause(800);
- $this->assertCheckBoxes(array());
-
- $this->click("button4");
- $this->pause(800);
- $this->assertCheckBoxes(array(4));
-
- $this->click("list1_c2");
- $this->pause(800);
- $this->assertText("label1", "Selection: value 3");
-
- $this->click("list1_c3");
- $this->pause(800);
- $this->assertText("label1", "Selection: value 4");
-
- }
-
- function assertCheckBoxes($checks, $total = 5)
- {
- for($i = 0; $i < $total; $i++)
- {
- if(in_array($i, $checks))
- $this->assertChecked("list1_c{$i}");
- else
- $this->assertNotChecked("list1_c{$i}");
- }
- }
-}
-
+<?php + +class ActiveRadioButtonListTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $this->open("active-controls/index.php?page=ActiveRadioButtonListTest"); + $this->verifyTextPresent("TActiveRadioButtonList Test Case"); + + $this->assertText("label1", "Label 1"); + + + $this->click("button3"); + $this->pause(800); + $this->assertCheckBoxes(array(0)); + + $this->click("button2"); + $this->pause(800); + $this->assertCheckBoxes(array()); + + $this->click("button4"); + $this->pause(800); + $this->assertCheckBoxes(array(4)); + + $this->click("list1_c2"); + $this->pause(800); + $this->assertText("label1", "Selection: value 3"); + + $this->click("list1_c3"); + $this->pause(800); + $this->assertText("label1", "Selection: value 4"); + + } + + function assertCheckBoxes($checks, $total = 5) + { + for($i = 0; $i < $total; $i++) + { + if(in_array($i, $checks)) + $this->assertChecked("list1_c{$i}"); + else + $this->assertNotChecked("list1_c{$i}"); + } + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php index 46925960..2991da9b 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php @@ -1,57 +1,57 @@ -<?php
-
-class ActiveRadioButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $this->open("active-controls/index.php?page=ActiveRadioButtonTest");
- $this->verifyTextPresent("Active Radio Button Test");
- $this->assertText('label1', 'Label 1');
-
- $this->assertNotChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
-
- $this->assertText('radio1_label', 'Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
-
- $this->click('change_text1');
- $this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
-
- $this->click('change_text2');
- $this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2 World');
- $this->assertText('radio3_label', 'Radio Button 3');
-
- $this->click('change_radio1');
- $this->pause(800);
- $this->assertChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
-
- $this->click('change_radio2');
- $this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertNotChecked('radio3');
-
-
- $this->click('radio3');
- $this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertChecked('radio3');
- $this->assertText('label1', 'Label 1:Radio Button 3 Checked');
-
-
- }
-}
+<?php + +class ActiveRadioButtonTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $this->open("active-controls/index.php?page=ActiveRadioButtonTest"); + $this->verifyTextPresent("Active Radio Button Test"); + $this->assertText('label1', 'Label 1'); + + $this->assertNotChecked('radio1'); + $this->assertNotChecked('radio2'); + $this->assertNotChecked('radio3'); + + $this->assertText('radio1_label', 'Radio Button 1'); + $this->assertText('radio2_label', 'Radio Button 2'); + $this->assertText('radio3_label', 'Radio Button 3'); + + $this->click('change_text1'); + $this->pause(800); + $this->assertText('radio1_label', 'Hello Radio Button 1'); + $this->assertText('radio2_label', 'Radio Button 2'); + $this->assertText('radio3_label', 'Radio Button 3'); + + $this->click('change_text2'); + $this->pause(800); + $this->assertText('radio1_label', 'Hello Radio Button 1'); + $this->assertText('radio2_label', 'Radio Button 2 World'); + $this->assertText('radio3_label', 'Radio Button 3'); + + $this->click('change_radio1'); + $this->pause(800); + $this->assertChecked('radio1'); + $this->assertNotChecked('radio2'); + $this->assertNotChecked('radio3'); + + $this->click('change_radio2'); + $this->pause(800); + $this->assertNotChecked('radio1'); + $this->assertChecked('radio2'); + $this->assertNotChecked('radio3'); + + + $this->click('radio3'); + $this->pause(800); + $this->assertNotChecked('radio1'); + $this->assertChecked('radio2'); + $this->assertChecked('radio3'); + $this->assertText('label1', 'Label 1:Radio Button 3 Checked'); + + + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php index 9cde186a..59bc2e93 100644 --- a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class CustomTemplateTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=CustomTemplateControlTest');
- $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test');
- $this->assertText('label1', 'Label 1');
-
- $this->type('foo', 'Foo Bar!');
- $this->click('button2');
- $this->pause(800);
-
- $this->assertVisible('ctl1_ThePanel');
- $this->assertTextPresent('Client ID: ctl1_ThePanel');
-
- $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
- }
-}
-
+<?php + +class CustomTemplateTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=CustomTemplateControlTest'); + $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test'); + $this->assertText('label1', 'Label 1'); + + $this->type('foo', 'Foo Bar!'); + $this->click('button2'); + $this->pause(800); + + $this->assertVisible('ctl1_ThePanel'); + $this->assertTextPresent('Client ID: ctl1_ThePanel'); + + $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php index 3653dae1..c5367612 100644 --- a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class DelayedCallbackTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=DelayedCallback");
- $this->verifyTextPresent("Delayed Callback Test");
-
- $this->assertText("status", "");
- $this->click("button1");
- $this->click("button2");
-
- $this->pause("5000");
- $this->assertText("status", "Callback 1 returned after 4s");
- $this->pause("3000");
- $this->assertText("status", "Callback 2 delayed 2s");
-
- }
-}
-
+<?php + +class DelayedCallbackTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=DelayedCallback"); + $this->verifyTextPresent("Delayed Callback Test"); + + $this->assertText("status", ""); + $this->click("button1"); + $this->click("button2"); + + $this->pause("5000"); + $this->assertText("status", "Callback 1 returned after 4s"); + $this->pause("3000"); + $this->assertText("status", "Callback 2 delayed 2s"); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php index 8e400b5b..dc10bd28 100644 --- a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class EventTriggerTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=EventTriggeredCallback");
- $this->verifyTextPresent("Event Triggered Callback Test");
-
- $this->assertText('label1', 'Label 1');
-
- $this->click('button1');
- $this->pause(800);
- $this->assertText('label1', 'button 1 clicked');
-
- $this->type('text1', 'test');
- $this->pause(800);
- $this->assertText('label1', 'text 1 focused');
- }
-}
-
+<?php + +class EventTriggerTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=EventTriggeredCallback"); + $this->verifyTextPresent("Event Triggered Callback Test"); + + $this->assertText('label1', 'Label 1'); + + $this->click('button1'); + $this->pause(800); + $this->assertText('label1', 'button 1 clicked'); + + $this->type('text1', 'test'); + $this->pause(800); + $this->assertText('label1', 'text 1 focused'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php index 4929b879..25a6fde5 100644 --- a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php @@ -1,25 +1,25 @@ -<?php
-
-class PopulateListTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=PopulateActiveList");
- $this->verifyTextPresent("Populate active list controls");
- $this->assertText("label1", "");
-
- $this->click("button1");
- $this->pause(800);
- $this->select("list1", "World");
- $this->pause(800);
- $this->assertText("label1", "list1: World");
-
- $this->click("button2");
- $this->pause(800);
- $this->select("list2", "Prado");
- $this->pause(800);
- $this->assertText("label1", "list2: Prado");
- }
-}
-
+<?php + +class PopulateListTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=PopulateActiveList"); + $this->verifyTextPresent("Populate active list controls"); + $this->assertText("label1", ""); + + $this->click("button1"); + $this->pause(800); + $this->select("list1", "World"); + $this->pause(800); + $this->assertText("label1", "list1: World"); + + $this->click("button2"); + $this->pause(800); + $this->select("list2", "Prado"); + $this->pause(800); + $this->assertText("label1", "list2: Prado"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php index 3b4d0ce9..0fa95b4d 100644 --- a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class PostLoadingTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=PostLoadingTest');
- $this->assertTextPresent('PostLoading Test');
-
- $this->assertTextNotPresent('Hello World');
-
- $this->click('div1');
- $this->pause(800);
- $this->type('MyTextBox', 'Hello World');
- $this->click('MyButton');
-
- $this->pause(800);
- $this->assertTextPresent('Result is Hello World');
- }
-}
-
+<?php + +class PostLoadingTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=PostLoadingTest'); + $this->assertTextPresent('PostLoading Test'); + + $this->assertTextNotPresent('Hello World'); + + $this->click('div1'); + $this->pause(800); + $this->type('MyTextBox', 'Hello World'); + $this->click('MyButton'); + + $this->pause(800); + $this->assertTextPresent('Result is Hello World'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php index b90607e6..910b1063 100644 --- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php @@ -1,95 +1,95 @@ -<?php
-
-class ReplaceContentTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->skipBrowsers(self::INTERNET_EXPLORER);
-
- $this->open('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
-
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'Main Panel Sub Panel');
-
- $this->type('content', 'something');
-
- $this->click('btn_append');
- $this->pause(800);
-
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'Main Panel Sub Panel something');
-
- $this->type('content', 'more');
- $this->click('btn_prepend');
- $this->pause(800);
-
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel more Sub Panel something');
-
-
- $this->type('content', 'prado');
- $this->click('btn_before');
- $this->pause(800);
-
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel pradomore Sub Panel something');
-
- $this->type('content', ' php ');
- $this->click('btn_after');
- $this->pause(800);
-
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
- $this->pause(1000);
-
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
- }
-
- function testIE()
- {
- $this->targetBrowsers(self::INTERNET_EXPLORER);
-
- $this->open('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
-
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel');
-
- $this->type('content', 'something');
-
- $this->click('btn_append');
- $this->pause(800);
-
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something');
-
- $this->type('content', 'more');
- $this->click('btn_prepend');
- $this->pause(800);
-
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*moreSub Panel\s*something');
-
-
- $this->type('content', 'prado');
- $this->click('btn_before');
- $this->pause(800);
-
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
-
- $this->type('content', ' php ');
- $this->click('btn_after');
- $this->pause(800);
-
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
- $this->pause(1000);
-
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
- }
-
-}
-
+<?php + +class ReplaceContentTestCase extends SeleniumTestCase +{ + function test() + { + $this->skipBrowsers(self::INTERNET_EXPLORER); + + $this->open('active-controls/index.php?page=ReplaceContentTest'); + $this->assertTextPresent('Callback Replace Content Test'); + + $this->assertText('subpanel', 'Sub Panel'); + $this->assertText('panel1', 'Main Panel Sub Panel'); + + $this->type('content', 'something'); + + $this->click('btn_append'); + $this->pause(800); + + $this->assertText('subpanel', 'Sub Panel something'); + $this->assertText('panel1', 'Main Panel Sub Panel something'); + + $this->type('content', 'more'); + $this->click('btn_prepend'); + $this->pause(800); + + $this->assertText('subpanel', 'more Sub Panel something'); + $this->assertText('panel1', 'Main Panel more Sub Panel something'); + + + $this->type('content', 'prado'); + $this->click('btn_before'); + $this->pause(800); + + $this->assertText('subpanel', 'more Sub Panel something'); + $this->assertText('panel1', 'Main Panel pradomore Sub Panel something'); + + $this->type('content', ' php '); + $this->click('btn_after'); + $this->pause(800); + + $this->type('content', 'mauahahaha'); + $this->click('btn_replace'); + $this->pause(1000); + + $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); + } + + function testIE() + { + $this->targetBrowsers(self::INTERNET_EXPLORER); + + $this->open('active-controls/index.php?page=ReplaceContentTest'); + $this->assertTextPresent('Callback Replace Content Test'); + + $this->assertText('subpanel', 'Sub Panel'); + $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel'); + + $this->type('content', 'something'); + + $this->click('btn_append'); + $this->pause(800); + + $this->assertText('subpanel', 'Sub Panel something'); + $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something'); + + $this->type('content', 'more'); + $this->click('btn_prepend'); + $this->pause(800); + + $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something'); + $this->assertText('panel1', 'regexp:Main Panel\s*moreSub Panel\s*something'); + + + $this->type('content', 'prado'); + $this->click('btn_before'); + $this->pause(800); + + $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something'); + $this->assertText('panel1', 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something'); + + $this->type('content', ' php '); + $this->click('btn_after'); + $this->pause(800); + + $this->type('content', 'mauahahaha'); + $this->click('btn_replace'); + $this->pause(1000); + + $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php index aff9a1b2..0fa0c982 100644 --- a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php @@ -1,24 +1,24 @@ -<?php
-
-class TextBoxGroupValidationTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=TextBoxValidationCallback");
- $this->assertTextPresent('TextBox AutoPostBack With Group Validation');
- $this->assertNotVisible('validator1');
-
- $this->type('ZipCode', 'test');
- $this->assertVisible('validator1');
-
- $this->type('Address', 'Sydney');
- $this->type('ZipCode', '2000');
-
- $this->assertNotVisible('validator1');
-
- $this->pause(800);
- $this->assertValue('City', 'City: Sydney Zip: 2000');
- }
-}
-
+<?php + +class TextBoxGroupValidationTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=TextBoxValidationCallback"); + $this->assertTextPresent('TextBox AutoPostBack With Group Validation'); + $this->assertNotVisible('validator1'); + + $this->type('ZipCode', 'test'); + $this->assertVisible('validator1'); + + $this->type('Address', 'Sydney'); + $this->type('ZipCode', '2000'); + + $this->assertNotVisible('validator1'); + + $this->pause(800); + $this->assertValue('City', 'City: Sydney Zip: 2000'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php index f98fc4a8..5d2e954c 100644 --- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class ValueTriggerTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ValueTriggerCallbackTest");
- $this->verifyTextPresent("Value Trigger Callback Test");
-
- $this->assertText('label1', 'Label 1');
-
- $this->type('text1', 'test');
- $this->pause(2000);
- $this->assertText('label1', 'Old = : New Value = test');
-
- $this->type('text1', 'more');
- $this->pause(3000);
- $this->assertText('label1', 'Old = test : New Value = more');
- }
-}
-
+<?php + +class ValueTriggerTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ValueTriggerCallbackTest"); + $this->verifyTextPresent("Value Trigger Callback Test"); + + $this->assertText('label1', 'Label 1'); + + $this->type('text1', 'test'); + $this->pause(2000); + $this->assertText('label1', 'Old = : New Value = test'); + + $this->type('text1', 'more'); + $this->pause(3000); + $this->assertText('label1', 'Old = test : New Value = more'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php b/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php index c6dc50c2..921543cd 100644 --- a/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php +++ b/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php @@ -1,253 +1,253 @@ -<?php
-/**
- * ActiveRatingListTestCase.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 22, 2008
- */
-
-/**
- * ActiveRatingListTestCase.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 22, 2008
- *
- * Modifications:
- */
-class ActiveRatingListTestCase extends SeleniumTestCase
-{
- function testCheckBoxes()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListCheckBoxesTest");
- $this->verifyTextPresent("TActiveRatingList Check Boxes Test Case");
- $this->assertCheckBoxes("RatingList", array(2), 6);
-
- // Change the list and make sure the radio buttons get updated properly.
- $this->clickTD("RatingList_c4");
- $this->pause(800);
- $this->assertCheckBoxes("RatingList", array(4), 6);
-
- $this->clickTD("RatingList_c2");
- $this->pause(800);
- $this->assertCheckBoxes("RatingList", array(2), 6);
- }
-
- function testRating()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListRatingTest");
- $this->verifyTextPresent("TActiveRatingList Rating Test Case");
-
- // Check the list, make sure it starts out with 5 stars.
- $this->assertText("Status", "Rating: 5");
-
- // Click on 1 star and make sure the Rating property updates.
- $this->clickTD("RatingList_c0");
- $this->pause(800);
- $this->assertText("Status", "Rating: 1");
-
- // Then set Rating to three on the server side and make sure it's correct.
- $this->click("SetRating");
- $this->pause(800);
- $this->assertText("Status", "Rating: 3");
- }
-
- function testSelectedIndex()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListSelectedIndexTest");
- $this->verifyTextPresent("TActiveRatingList SelectedIndex Test Case");
- $this->assertText("Status", " SelectedIndex: 1");
-
- // Click on 5 stars and make sure the SelectedIndex property updates.
- $this->clickTD("RatingList_c4");
- $this->pause(800);
- $this->assertText("Status", " SelectedIndex: 4");
-
- // Then set SelectedIndex to 5 on the server side and make sure it's correct.
- $this->click("SetSelectedIndex");
- $this->pause(800);
- $this->assertText("Status", " SelectedIndex: 5");
- }
-
- function testAutoPostBack()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListAutoPostBackTest");
- $this->verifyTextPresent("TActiveRatingList AutoPostBack Test Case");
- $this->assertText("Status", "AutoPostback=false");
-
- // Make sure that it doesn't auto post when clicked.
- $this->clickTD("RatingList_c3");
- $this->pause(800);
- $this->assertText("Status", "AutoPostback=false");
-
- // Then submit with an active button and make sure it updates.
- $this->click("Submit");
- $this->pause(800);
- $this->assertText("Status", "4 : Good");
- }
-
- function testAllowInput()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListAllowInputTest");
- $this->verifyTextPresent("TActiveRatingList AllowInput Test Case");
- $this->assertText("Status", "AllowInput=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
-
- // Make sure that clicking doesn't change anything.
- $this->clickTD("RatingList_c5");
- $this->pause(800);
- $this->assertText("Status", "AllowInput=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
- }
-
- function testReadOnly()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListReadOnlyTest");
- $this->verifyTextPresent("TActiveRatingList ReadOnly Test Case");
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(0), 6);
-
- $this->clickTD("RatingList_c4");
- $this->pause(800);
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(0), 6);
-
- // Then set ReadOnly to false, and make sure it works.
- $this->click("Writable");
- $this->pause(800);
- $this->assertText("Status", "ReadOnly=false");
- $this->assertCheckBoxes("RatingList", array(0), 6);
-
-
- $this->clickTD("RatingList_c1");
- $this->pause(800);
- $this->assertText("Status", "2 : Fair");
- $this->assertCheckBoxes("RatingList", array(1), 6);
-
- // Then set ReadOnly to true, and make sure it doesn't work anymore.
- $this->click("ReadOnly");
- $this->pause(800);
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(1), 6);
-
-
- $this->clickTD("RatingList_c2");
- $this->pause(800);
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(1), 6);
- }
-
- function testEnabled()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListEnabledTest");
- $this->verifyTextPresent("TActiveRatingList Enabled Test Case");
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(5), 6);
-
- $this->clickTD("RatingList_c4");
- $this->pause(800);
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(5), 6);
-
- // Then set Enable to true, and make sure it works.
- $this->click("Enable");
- $this->pause(800);
- $this->assertText("Status", "Enabled=true");
- $this->assertCheckBoxes("RatingList", array(5), 6);
-
-
- $this->clickTD("RatingList_c3");
- $this->pause(800);
- $this->assertText("Status", "4 : Good");
- $this->assertCheckBoxes("RatingList", array(3), 6);
-
- // Then set Enable to false, and make sure it doesn't work anymore.
- $this->click("Disable");
- $this->pause(800);
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
-
-
- $this->clickTD("RatingList_c5");
- $this->pause(800);
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
- }
-
- function testHoverCaption()
- {
- // Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListHoverCaptionTest");
- $this->verifyTextPresent("TActiveRatingList Hover Caption Test Case");
- $this->assertText("Status", "CaptionID='Status'");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_half')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
-
- $this->mouseOver("//input[@id='RatingList_c4']/../../");
- $this->assertText("Status", "Excellent");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating_hover')]");
- $this->assertElementNotPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
-
- $this->mouseOut("//input[@id='RatingList_c4']/../../");
- $this->assertText("Status", "CaptionID='Status'");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementNotPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
-
-
- $this->mouseOver("//input[@id='RatingList_c1']/../../");
- $this->assertText("Status", "Fair");
-
- $this->click("//input[@id='RatingList_c1']/../../");
- $this->pause(800);
- $this->assertText("Status", "2 : Fair");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementNotPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
- }
-
- function clickTD($clientID){
- $this->click("//input[@id='{$clientID}']/../..");
- }
-
- function assertCheckBoxes($clientID, $checks, $total = 5)
- {
- for($i = 0; $i < $total; $i++)
- {
- if(in_array($i, $checks))
- $this->assertChecked("{$clientID}_c{$i}");
- else
- $this->assertNotChecked("{$clientID}_c{$i}");
- }
- }
-}
+<?php +/** + * ActiveRatingListTestCase.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 22, 2008 + */ + +/** + * ActiveRatingListTestCase.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 22, 2008 + * + * Modifications: + */ +class ActiveRatingListTestCase extends SeleniumTestCase +{ + function testCheckBoxes() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListCheckBoxesTest"); + $this->verifyTextPresent("TActiveRatingList Check Boxes Test Case"); + $this->assertCheckBoxes("RatingList", array(2), 6); + + // Change the list and make sure the radio buttons get updated properly. + $this->clickTD("RatingList_c4"); + $this->pause(800); + $this->assertCheckBoxes("RatingList", array(4), 6); + + $this->clickTD("RatingList_c2"); + $this->pause(800); + $this->assertCheckBoxes("RatingList", array(2), 6); + } + + function testRating() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListRatingTest"); + $this->verifyTextPresent("TActiveRatingList Rating Test Case"); + + // Check the list, make sure it starts out with 5 stars. + $this->assertText("Status", "Rating: 5"); + + // Click on 1 star and make sure the Rating property updates. + $this->clickTD("RatingList_c0"); + $this->pause(800); + $this->assertText("Status", "Rating: 1"); + + // Then set Rating to three on the server side and make sure it's correct. + $this->click("SetRating"); + $this->pause(800); + $this->assertText("Status", "Rating: 3"); + } + + function testSelectedIndex() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListSelectedIndexTest"); + $this->verifyTextPresent("TActiveRatingList SelectedIndex Test Case"); + $this->assertText("Status", " SelectedIndex: 1"); + + // Click on 5 stars and make sure the SelectedIndex property updates. + $this->clickTD("RatingList_c4"); + $this->pause(800); + $this->assertText("Status", " SelectedIndex: 4"); + + // Then set SelectedIndex to 5 on the server side and make sure it's correct. + $this->click("SetSelectedIndex"); + $this->pause(800); + $this->assertText("Status", " SelectedIndex: 5"); + } + + function testAutoPostBack() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListAutoPostBackTest"); + $this->verifyTextPresent("TActiveRatingList AutoPostBack Test Case"); + $this->assertText("Status", "AutoPostback=false"); + + // Make sure that it doesn't auto post when clicked. + $this->clickTD("RatingList_c3"); + $this->pause(800); + $this->assertText("Status", "AutoPostback=false"); + + // Then submit with an active button and make sure it updates. + $this->click("Submit"); + $this->pause(800); + $this->assertText("Status", "4 : Good"); + } + + function testAllowInput() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListAllowInputTest"); + $this->verifyTextPresent("TActiveRatingList AllowInput Test Case"); + $this->assertText("Status", "AllowInput=false"); + $this->assertCheckBoxes("RatingList", array(3), 6); + + // Make sure that clicking doesn't change anything. + $this->clickTD("RatingList_c5"); + $this->pause(800); + $this->assertText("Status", "AllowInput=false"); + $this->assertCheckBoxes("RatingList", array(3), 6); + } + + function testReadOnly() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListReadOnlyTest"); + $this->verifyTextPresent("TActiveRatingList ReadOnly Test Case"); + $this->assertText("Status", "ReadOnly=true"); + $this->assertCheckBoxes("RatingList", array(0), 6); + + $this->clickTD("RatingList_c4"); + $this->pause(800); + $this->assertText("Status", "ReadOnly=true"); + $this->assertCheckBoxes("RatingList", array(0), 6); + + // Then set ReadOnly to false, and make sure it works. + $this->click("Writable"); + $this->pause(800); + $this->assertText("Status", "ReadOnly=false"); + $this->assertCheckBoxes("RatingList", array(0), 6); + + + $this->clickTD("RatingList_c1"); + $this->pause(800); + $this->assertText("Status", "2 : Fair"); + $this->assertCheckBoxes("RatingList", array(1), 6); + + // Then set ReadOnly to true, and make sure it doesn't work anymore. + $this->click("ReadOnly"); + $this->pause(800); + $this->assertText("Status", "ReadOnly=true"); + $this->assertCheckBoxes("RatingList", array(1), 6); + + + $this->clickTD("RatingList_c2"); + $this->pause(800); + $this->assertText("Status", "ReadOnly=true"); + $this->assertCheckBoxes("RatingList", array(1), 6); + } + + function testEnabled() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListEnabledTest"); + $this->verifyTextPresent("TActiveRatingList Enabled Test Case"); + $this->assertText("Status", "Enabled=false"); + $this->assertCheckBoxes("RatingList", array(5), 6); + + $this->clickTD("RatingList_c4"); + $this->pause(800); + $this->assertText("Status", "Enabled=false"); + $this->assertCheckBoxes("RatingList", array(5), 6); + + // Then set Enable to true, and make sure it works. + $this->click("Enable"); + $this->pause(800); + $this->assertText("Status", "Enabled=true"); + $this->assertCheckBoxes("RatingList", array(5), 6); + + + $this->clickTD("RatingList_c3"); + $this->pause(800); + $this->assertText("Status", "4 : Good"); + $this->assertCheckBoxes("RatingList", array(3), 6); + + // Then set Enable to false, and make sure it doesn't work anymore. + $this->click("Disable"); + $this->pause(800); + $this->assertText("Status", "Enabled=false"); + $this->assertCheckBoxes("RatingList", array(3), 6); + + + $this->clickTD("RatingList_c5"); + $this->pause(800); + $this->assertText("Status", "Enabled=false"); + $this->assertCheckBoxes("RatingList", array(3), 6); + } + + function testHoverCaption() + { + // Verify we're on the right page. + $this->open("active-controls/index.php?page=ActiveRatingListHoverCaptionTest"); + $this->verifyTextPresent("TActiveRatingList Hover Caption Test Case"); + $this->assertText("Status", "CaptionID='Status'"); + $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_half')]"); + $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]"); + + $this->mouseOver("//input[@id='RatingList_c4']/../../"); + $this->assertText("Status", "Excellent"); + $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_hover')]"); + $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_hover')]"); + $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_hover')]"); + $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_hover')]"); + $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating_hover')]"); + $this->assertElementNotPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating_hover')]"); + $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]"); + + $this->mouseOut("//input[@id='RatingList_c4']/../../"); + $this->assertText("Status", "CaptionID='Status'"); + $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementNotPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]"); + + + $this->mouseOver("//input[@id='RatingList_c1']/../../"); + $this->assertText("Status", "Fair"); + + $this->click("//input[@id='RatingList_c1']/../../"); + $this->pause(800); + $this->assertText("Status", "2 : Fair"); + $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementNotPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]"); + $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]"); + $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]"); + } + + function clickTD($clientID){ + $this->click("//input[@id='{$clientID}']/../.."); + } + + function assertCheckBoxes($clientID, $checks, $total = 5) + { + for($i = 0; $i < $total; $i++) + { + if(in_array($i, $checks)) + $this->assertChecked("{$clientID}_c{$i}"); + else + $this->assertNotChecked("{$clientID}_c{$i}"); + } + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php index 9a50d095..ef36863b 100644 --- a/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php +++ b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php @@ -1,25 +1,25 @@ -<?php
-/*
- * Created on 28/04/2006
- */
-
-class LabeledTextBox extends TTemplateControl
-{
- public function __construct()
- {
- parent::__construct();
- $this->ensureChildControls();
- }
-
- public function getTextBox()
- {
- return $this->getRegisteredObject('textbox');
- }
-
- public function getLabel()
- {
- return $this->getRegisteredObject('label');
- }
-}
-
-?>
+<?php +/* + * Created on 28/04/2006 + */ + +class LabeledTextBox extends TTemplateControl +{ + public function __construct() + { + parent::__construct(); + $this->ensureChildControls(); + } + + public function getTextBox() + { + return $this->getRegisteredObject('textbox'); + } + + public function getLabel() + { + return $this->getRegisteredObject('label'); + } +} + +?> diff --git a/tests/FunctionalTests/features/protected/controls/Layout.php b/tests/FunctionalTests/features/protected/controls/Layout.php index 2c6e02d6..f60a9a18 100644 --- a/tests/FunctionalTests/features/protected/controls/Layout.php +++ b/tests/FunctionalTests/features/protected/controls/Layout.php @@ -1,8 +1,8 @@ -<?php
-
-class Layout extends TTemplateControl
-{
-
-}
-
+<?php + +class Layout extends TTemplateControl +{ + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php index b2dd2233..322f4db7 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php @@ -1,43 +1,43 @@ -<?php
-/*
- * Created on 2/05/2006
- */
-
-class ActiveControl extends TPage
-{
- static private $_colors = array('red', 'green', 'blue', 'purple','black','orange');
-
- public function slowResponse($sender, $param)
- {
- //sleep(1);
- $this->label1->setText("The time is ".time()." from ".$sender->ID);
- $this->label1->setForeColor($this->getColor());
- $this->label1->renderControl($param->getOutput());
-
- $this->button2->setEnabled(true);
-
- $this->panel2->setVisible(true);
- $this->panel1->setBackColor($this->getColor());
- $this->panel1->renderControl($param->getOutput());
- $this->getCallbackClient()->shake($this->panel1);
- }
-
- public function onButtonClicked($sender, $param)
- {
- $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID);
- }
-
- public function fastResponse($sender, $param)
- {
- $this->button2->setEnabled(false);
- $style['color'] = $this->getColor();
- $this->getCallbackClient()->setStyle($this->label2, $style);
- $this->getCallbackClient()->shake($this->label2);
- }
-
- private function getColor()
- {
- return self::$_colors[rand(0,count(self::$_colors)-1)];
- }
-}
-?>
+<?php +/* + * Created on 2/05/2006 + */ + +class ActiveControl extends TPage +{ + static private $_colors = array('red', 'green', 'blue', 'purple','black','orange'); + + public function slowResponse($sender, $param) + { + //sleep(1); + $this->label1->setText("The time is ".time()." from ".$sender->ID); + $this->label1->setForeColor($this->getColor()); + $this->label1->renderControl($param->getOutput()); + + $this->button2->setEnabled(true); + + $this->panel2->setVisible(true); + $this->panel1->setBackColor($this->getColor()); + $this->panel1->renderControl($param->getOutput()); + $this->getCallbackClient()->shake($this->panel1); + } + + public function onButtonClicked($sender, $param) + { + $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID); + } + + public function fastResponse($sender, $param) + { + $this->button2->setEnabled(false); + $style['color'] = $this->getColor(); + $this->getCallbackClient()->setStyle($this->label2, $style); + $this->getCallbackClient()->shake($this->label2); + } + + private function getColor() + { + return self::$_colors[rand(0,count(self::$_colors)-1)]; + } +} +?> diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php index 3474234e..ac08e4ed 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php @@ -1,34 +1,34 @@ -<?php
-/*
- * Created on 7/05/2006
- */
-
-class AutoComplete extends TPage
-{
- public function suggestCountries($sender, $param)
- {
- $sender->setDataSource($this->matchCountries($param->getParameter()));
- $sender->dataBind();
- $sender->render($param->getOutput());
- }
-
- protected function matchCountries($token)
- {
- $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en');
- $list = array();
- $count = 0;
- $token = strtolower($token);
- foreach($info->getCountries() as $country)
- {
- if(strpos(strtolower($country), $token) === 0)
- {
- $list[] = $country;
- $count++;
- if($count > 10) break;
- }
- }
- return $list;
- }
-}
-
+<?php +/* + * Created on 7/05/2006 + */ + +class AutoComplete extends TPage +{ + public function suggestCountries($sender, $param) + { + $sender->setDataSource($this->matchCountries($param->getParameter())); + $sender->dataBind(); + $sender->render($param->getOutput()); + } + + protected function matchCountries($token) + { + $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); + $list = array(); + $count = 0; + $token = strtolower($token); + foreach($info->getCountries() as $country) + { + if(strpos(strtolower($country), $token) === 0) + { + $list[] = $country; + $count++; + if($count > 10) break; + } + } + return $list; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php index 9821d8c9..7afd1d59 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php @@ -1,15 +1,15 @@ -<?php
-/*
- * Created on 6/05/2006
- */
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Calculator extends TPage
-{
- public function do_sum($sender, $param)
- {
- $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text);
- }
-}
-
+<?php +/* + * Created on 6/05/2006 + */ +Prado::using('System.Web.UI.ActiveControls.*'); + +class Calculator extends TPage +{ + public function do_sum($sender, $param) + { + $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php index df07440f..3789a3f9 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php @@ -1,20 +1,20 @@ -<?php
-/*
- * Created on 13/05/2006
- */
-
-class Calculator2 extends TPage
-{
- public function do_sum($sender, $param)
- {
- $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text);
- }
-
- public function update_callback($sender, $param)
- {
- $this->do_sum($this->sum, null);
- $this->panel1->renderControl($param->Output);
- }
-}
-
+<?php +/* + * Created on 13/05/2006 + */ + +class Calculator2 extends TPage +{ + public function do_sum($sender, $param) + { + $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text); + } + + public function update_callback($sender, $param) + { + $this->do_sum($this->sum, null); + $this->panel1->renderControl($param->Output); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php index 0c9b16d5..1b1d0cbc 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php @@ -1,36 +1,36 @@ -<?php
-/*
- * Created on 13/05/2006
- */
-
-class VisibleUpdate extends TPage
-{
- function click1($sender)
- {
- $this->label1->setText($this->getButtonState($sender));
-
- //$this->button1->setEnabled(false);
- $this->button1->setVisible(false);
- // $this->button2->setEnabled(true);
- $this->button2->setVisible(true);
- }
-
- function click2($sender)
- {
- $this->label1->setText($this->getButtonState($sender));
-
- // $this->button1->setEnabled(true);
- $this->button1->setVisible(true);
- /// $this->button2->setEnabled(false);
- $this->button2->setVisible(false);
- }
-
- protected function getButtonState($button)
- {
- return "Before you clicked on ".$button->Text.
- ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled').
- " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled');
- }
-}
-
+<?php +/* + * Created on 13/05/2006 + */ + +class VisibleUpdate extends TPage +{ + function click1($sender) + { + $this->label1->setText($this->getButtonState($sender)); + + //$this->button1->setEnabled(false); + $this->button1->setVisible(false); + // $this->button2->setEnabled(true); + $this->button2->setVisible(true); + } + + function click2($sender) + { + $this->label1->setText($this->getButtonState($sender)); + + // $this->button1->setEnabled(true); + $this->button1->setVisible(true); + /// $this->button2->setEnabled(false); + $this->button2->setVisible(false); + } + + protected function getButtonState($button) + { + return "Before you clicked on ".$button->Text. + ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled'). + " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/FeatureList.php b/tests/FunctionalTests/features/protected/pages/FeatureList.php index 7f82d34e..8f28f6de 100644 --- a/tests/FunctionalTests/features/protected/pages/FeatureList.php +++ b/tests/FunctionalTests/features/protected/pages/FeatureList.php @@ -1,34 +1,34 @@ -<?php
-
-class FeatureList extends TPage
-{
- public function onLoad($param)
- {
- parent::onLoad($param);
- $list=$this->getPageList(dirname(__FILE__),'');
- $this->List->DataSource=$list;
- $this->List->dataBind();
- }
-
- protected function getPageList($directory,$basePath)
- {
- $list=array();
- $folder=@opendir($directory);
- while($entry=@readdir($folder))
- {
- if($entry[0]==='.')
- continue;
- else if(is_file($directory.'/'.$entry))
- {
- if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false)
- $list['?page='.$basePath.$page]=$basePath.$page;
- }
- else
- $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.'));
- }
- closedir($folder);
- return $list;
- }
-}
-
+<?php + +class FeatureList extends TPage +{ + public function onLoad($param) + { + parent::onLoad($param); + $list=$this->getPageList(dirname(__FILE__),''); + $this->List->DataSource=$list; + $this->List->dataBind(); + } + + protected function getPageList($directory,$basePath) + { + $list=array(); + $folder=@opendir($directory); + while($entry=@readdir($folder)) + { + if($entry[0]==='.') + continue; + else if(is_file($directory.'/'.$entry)) + { + if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) + $list['?page='.$basePath.$page]=$basePath.$page; + } + else + $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); + } + closedir($folder); + return $list; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/FocusControl.php b/tests/FunctionalTests/features/protected/pages/FocusControl.php index d78f28c4..e534a92a 100644 --- a/tests/FunctionalTests/features/protected/pages/FocusControl.php +++ b/tests/FunctionalTests/features/protected/pages/FocusControl.php @@ -1,17 +1,17 @@ -<?php
-
-class FocusControl extends TPage
-{
- function doFocus($sender, $param)
- {
- $selected = $this->list->SelectedIndex;
- if($selected >= 0)
- {
- $id = "button".($selected+1);
- $controlID = $this->{$id}->ClientID;
- $this->ClientScript->registerFocusControl($controlID);
- }
- }
-}
-
+<?php + +class FocusControl extends TPage +{ + function doFocus($sender, $param) + { + $selected = $this->list->SelectedIndex; + if($selected >= 0) + { + $id = "button".($selected+1); + $controlID = $this->{$id}->ClientID; + $this->ClientScript->registerFocusControl($controlID); + } + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php index cac0a04e..929e2f17 100644 --- a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php +++ b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php @@ -1,45 +1,45 @@ -<?php
-
-/**
- * ${classname}
- *
- * ${description}
- *
- * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
- * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
- * @package ${package}
- */
-class BasicI18N extends TPage
-{
-}
-
-/**
- * ${classname}
- *
- * ${description}
- *
- * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
- * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
- * @package ${package}
- *//*
-class BasicI18NTestCase extends SeleniumTestCase
-{
- function setup()
- {
- $page = Prado::getApplication()->getTestPage(__FILE__);
- $this->open($page);
- }
-
- function testI18N()
- {
- $this->verifyTitle("Basic I18N Test", "");
- $this->verifyTextPresent("Hello", "");
- $this->verifyTextPresent("US$10,000.00", "");
- $this->verifyTextPresent("2006年1月15日 上午12时00分00秒", "");
- $this->verifyTextPresent("None", "");
- $this->verifyTextPresent("One thing.", "");
- $this->verifyTextPresent("Many things.", "");
- }
-}
-*/
+<?php + +/** + * ${classname} + * + * ${description} + * + * @author Wei Zhuo<weizhuo[at]gmail[dot]com> + * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ + * @package ${package} + */ +class BasicI18N extends TPage +{ +} + +/** + * ${classname} + * + * ${description} + * + * @author Wei Zhuo<weizhuo[at]gmail[dot]com> + * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ + * @package ${package} + *//* +class BasicI18NTestCase extends SeleniumTestCase +{ + function setup() + { + $page = Prado::getApplication()->getTestPage(__FILE__); + $this->open($page); + } + + function testI18N() + { + $this->verifyTitle("Basic I18N Test", ""); + $this->verifyTextPresent("Hello", ""); + $this->verifyTextPresent("US$10,000.00", ""); + $this->verifyTextPresent("2006年1月15日 上午12时00分00秒", ""); + $this->verifyTextPresent("None", ""); + $this->verifyTextPresent("One thing.", ""); + $this->verifyTextPresent("Many things.", ""); + } +} +*/ ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php b/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php index 964b48a5..72e6061e 100644 --- a/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php +++ b/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php @@ -1,32 +1,32 @@ -<?php
-
-class MyJavascriptLib extends TComponent
-{
- private $_packages=array(); //keep track of all registrations
-
- private $_manager;
-
- protected function __construct(TPage $owner)
- {
- $this->_manager = $owner->getClientScript();
- $owner->onPreRenderComplete = array($this, 'registerScriptLoader');
- }
-
- public static function registerPackage(TControl $control, $name)
- {
- static $instance;
- if($instance===null)
- $instance=new self($control->getPage());
- $instance->_packages[$name]=true;
- }
-
- protected function registerScriptLoader()
- {
- $dir = dirname(__FILE__).'/myscripts'; //contains my javascript files
- $scripts = array_keys($this->_packages);
- $url = $this->_manager->registerJavascriptPackages($dir, $scripts);
- $this->_manager->registerScriptFile($url,$url);
- }
-}
-
+<?php + +class MyJavascriptLib extends TComponent +{ + private $_packages=array(); //keep track of all registrations + + private $_manager; + + protected function __construct(TPage $owner) + { + $this->_manager = $owner->getClientScript(); + $owner->onPreRenderComplete = array($this, 'registerScriptLoader'); + } + + public static function registerPackage(TControl $control, $name) + { + static $instance; + if($instance===null) + $instance=new self($control->getPage()); + $instance->_packages[$name]=true; + } + + protected function registerScriptLoader() + { + $dir = dirname(__FILE__).'/myscripts'; //contains my javascript files + $scripts = array_keys($this->_packages); + $url = $this->_manager->registerJavascriptPackages($dir, $scripts); + $this->_manager->registerScriptFile($url,$url); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/TestComp.php b/tests/FunctionalTests/features/protected/pages/TestComp.php index f9d02c77..0358357a 100644 --- a/tests/FunctionalTests/features/protected/pages/TestComp.php +++ b/tests/FunctionalTests/features/protected/pages/TestComp.php @@ -1,20 +1,20 @@ -<?php
-
-Prado::using('Application.pages.MyJavascriptLib');
-
-class TestComp extends TControl
-{
- private $_class;
- public function setClass($value)
- {
- $this->_class=$value;
- }
-
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- MyJavascriptLib::registerPackage($this,$this->_class);
- }
-}
-
+<?php + +Prado::using('Application.pages.MyJavascriptLib'); + +class TestComp extends TControl +{ + private $_class; + public function setClass($value) + { + $this->_class=$value; + } + + public function onPreRender($param) + { + parent::onPreRender($param); + MyJavascriptLib::registerPackage($this,$this->_class); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/myscripts/packages.php b/tests/FunctionalTests/features/protected/pages/myscripts/packages.php index 41561a71..e39199f9 100644 --- a/tests/FunctionalTests/features/protected/pages/myscripts/packages.php +++ b/tests/FunctionalTests/features/protected/pages/myscripts/packages.php @@ -1,10 +1,10 @@ -<?php
-
-$packages['test'] = array('test.js');
-
-$deps['test'] = array('test');
-$deps['test2'] = array('test');
-
-return array($packages,$deps);
-
+<?php + +$packages['test'] = array('test.js'); + +$deps['test'] = array('test'); +$deps['test2'] = array('test'); + +return array($packages,$deps); + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/tests/MyTestCase.php b/tests/FunctionalTests/features/tests/MyTestCase.php index cb26d709..43a4762d 100644 --- a/tests/FunctionalTests/features/tests/MyTestCase.php +++ b/tests/FunctionalTests/features/tests/MyTestCase.php @@ -1,19 +1,19 @@ -<?php
-
-class MyTestCase extends SeleniumTestCase
-{
- function test1()
- {
- $this->open('http://127.0.0.1');
- $this->assertTextNotPresent('asd');
- }
-
- function test2()
- {
- $this->skipBrowsers(self::FIREFOX);
- $this->open('http://127.0.0.1');
- $this->assertTextNotPresent('asd');
- }
-}
-
+<?php + +class MyTestCase extends SeleniumTestCase +{ + function test1() + { + $this->open('http://127.0.0.1'); + $this->assertTextNotPresent('asd'); + } + + function test2() + { + $this->skipBrowsers(self::FIREFOX); + $this->open('http://127.0.0.1'); + $this->assertTextNotPresent('asd'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php index c0d6af63..fd12cc4f 100644 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php @@ -1,38 +1,38 @@ -<?php
-//$Id$
-class ActiveButtonTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&notheme=true&lang=en");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- $this->assertTextPresent('TActiveButton Samples (AJAX)');
-
- // a click button
- $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
- $this->click("//input[@type='submit' and @value='click me']", "");
- $this->pause(800);
- $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
-
- // a command button
- $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]");
- $this->click("//input[@type='submit' and @value='click me']", "");
- $this->pause(800);
- $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]");
-
- // a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl2');
- $this->click("//input[@type='submit' and @value='submit']", "");
- $this->pause(800);
- $this->verifyVisible('ctl0_body_ctl2');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->click("//input[@type='submit' and @value='submit']", "");
- $this->pause(800);
- $this->verifyNotVisible('ctl0_body_ctl2');
- $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", "");
- }
-}
-
+<?php +//$Id$ +class ActiveButtonTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&notheme=true&lang=en"); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + $this->assertTextPresent('TActiveButton Samples (AJAX)'); + + // a click button + $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->click("//input[@type='submit' and @value='click me']", ""); + $this->pause(800); + $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + + // a command button + $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); + $this->click("//input[@type='submit' and @value='click me']", ""); + $this->pause(800); + $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); + + // a button causing validation + $this->verifyNotVisible('ctl0_body_ctl2'); + $this->click("//input[@type='submit' and @value='submit']", ""); + $this->pause(800); + $this->verifyVisible('ctl0_body_ctl2'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->click("//input[@type='submit' and @value='submit']", ""); + $this->pause(800); + $this->verifyNotVisible('ctl0_body_ctl2'); + $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php index 80784086..ca17a5dc 100644 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php @@ -1,58 +1,58 @@ -<?php
-
-//$Id$
-class ActiveCheckBoxTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- $this->assertTextPresent('TActiveCheckBox Samples (AJAX)');
-
-
- // an auto postback checkbox
- $this->verifyTextNotPresent("ctl0_body_ctl0 clicked using callback");
- $this->click("//input[@name='ctl0\$body\$ctl0']");
- $this->pause(800);
- $this->assertChecked("//input[@name='ctl0\$body\$ctl0']");
- $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback");
- $this->click("//input[@name='ctl0\$body\$ctl0']");
- $this->pause(800);
- $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback");
- $this->assertNotChecked("//input[@name='ctl0\$body\$ctl0']");
-
- // a checkbox causing validation on a textbox
- $this->verifyNotVisible('ctl0_body_ctl1');
- $this->click("//input[@name='ctl0\$body\$ctl2']");
- $this->verifyVisible('ctl0_body_ctl1');
- $this->click("//input[@name='ctl0\$body\$ctl2']", "");
- $this->verifyVisible('ctl0_body_ctl3');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->click("//input[@name='ctl0\$body\$ctl2']", "");
- $this->pause(800);
- $this->verifyNotVisible('ctl0_body_ctl1');
- $this->assertTextPresent("ctl0_body_ctl2 clicked using callback");
-
- // a checkbox validated by a required field validator
- $this->assertNotChecked("//input[@name='ctl0\$body\$CheckBox']");
- $this->verifyNotVisible('ctl0_body_ctl4');
- $this->click("//input[@type='submit' and @value='Submit']", "");
- $this->verifyVisible('ctl0_body_ctl4');
- $this->click("//input[@name='ctl0\$body\$CheckBox']", "");
- $this->assertChecked("//input[@name='ctl0\$body\$CheckBox']");
- $this->click("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl4');
- $this->assertTextPresent("ctl0_body_CheckBox clicked");
-
- // a checkbox validated by a required field validator using AutoPostBack
- $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']");
- $this->verifyNotVisible('ctl0_body_ctl5');
- $this->click("//input[@name='ctl0\$body\$CheckBox2']", "");
- $this->verifyVisible('ctl0_body_ctl5');
- $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']");
- }
-}
-
+<?php + +//$Id$ +class ActiveCheckBoxTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + $this->assertTextPresent('TActiveCheckBox Samples (AJAX)'); + + + // an auto postback checkbox + $this->verifyTextNotPresent("ctl0_body_ctl0 clicked using callback"); + $this->click("//input[@name='ctl0\$body\$ctl0']"); + $this->pause(800); + $this->assertChecked("//input[@name='ctl0\$body\$ctl0']"); + $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback"); + $this->click("//input[@name='ctl0\$body\$ctl0']"); + $this->pause(800); + $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback"); + $this->assertNotChecked("//input[@name='ctl0\$body\$ctl0']"); + + // a checkbox causing validation on a textbox + $this->verifyNotVisible('ctl0_body_ctl1'); + $this->click("//input[@name='ctl0\$body\$ctl2']"); + $this->verifyVisible('ctl0_body_ctl1'); + $this->click("//input[@name='ctl0\$body\$ctl2']", ""); + $this->verifyVisible('ctl0_body_ctl3'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->click("//input[@name='ctl0\$body\$ctl2']", ""); + $this->pause(800); + $this->verifyNotVisible('ctl0_body_ctl1'); + $this->assertTextPresent("ctl0_body_ctl2 clicked using callback"); + + // a checkbox validated by a required field validator + $this->assertNotChecked("//input[@name='ctl0\$body\$CheckBox']"); + $this->verifyNotVisible('ctl0_body_ctl4'); + $this->click("//input[@type='submit' and @value='Submit']", ""); + $this->verifyVisible('ctl0_body_ctl4'); + $this->click("//input[@name='ctl0\$body\$CheckBox']", ""); + $this->assertChecked("//input[@name='ctl0\$body\$CheckBox']"); + $this->click("//input[@type='submit' and @value='Submit']", ""); + $this->verifyNotVisible('ctl0_body_ctl4'); + $this->assertTextPresent("ctl0_body_CheckBox clicked"); + + // a checkbox validated by a required field validator using AutoPostBack + $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); + $this->verifyNotVisible('ctl0_body_ctl5'); + $this->click("//input[@name='ctl0\$body\$CheckBox2']", ""); + $this->verifyVisible('ctl0_body_ctl5'); + $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php index 3346f2b1..4b81e872 100644 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php @@ -1,34 +1,34 @@ -<?php
-//$Id: ActiveButtonTestCase.php 1405 2006-09-10 01:03:56Z wei $
-class ActiveCustomValidatorTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&notheme=true&lang=en");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- $this->assertTextPresent('TActiveCustomValidator Samples (AJAX)');
-
- $base = 'ctl0_body_';
-
- $this->assertNotVisible($base.'validator1');
- $this->click($base.'button1');
- $this->pause(800);
- $this->assertVisible($base.'validator1');
-
- $this->type($base.'textbox1', 'hello');
- $this->pause(800);
- $this->assertVisible($base.'validator1');
-
- $this->type($base.'textbox1', 'Prado');
- $this->pause(800);
- $this->assertVisible($base.'validator1');
-
- $this->click($base.'button1');
- $this->pause(800);
- $this->assertNotVisible($base.'validator1');
- }
-}
-
+<?php +//$Id: ActiveButtonTestCase.php 1405 2006-09-10 01:03:56Z wei $ +class ActiveCustomValidatorTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&notheme=true&lang=en"); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + $this->assertTextPresent('TActiveCustomValidator Samples (AJAX)'); + + $base = 'ctl0_body_'; + + $this->assertNotVisible($base.'validator1'); + $this->click($base.'button1'); + $this->pause(800); + $this->assertVisible($base.'validator1'); + + $this->type($base.'textbox1', 'hello'); + $this->pause(800); + $this->assertVisible($base.'validator1'); + + $this->type($base.'textbox1', 'Prado'); + $this->pause(800); + $this->assertVisible($base.'validator1'); + + $this->click($base.'button1'); + $this->pause(800); + $this->assertNotVisible($base.'validator1'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Advanced/I18N.php b/tests/FunctionalTests/quickstart/Advanced/I18N.php index 010b7da5..fb8aa710 100644 --- a/tests/FunctionalTests/quickstart/Advanced/I18N.php +++ b/tests/FunctionalTests/quickstart/Advanced/I18N.php @@ -1,54 +1,54 @@ -<?php
-
-//New Test
-class I18NTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?notheme=true&page=Advanced.Samples.I18N.Home&lang=en&notheme=true", "");
- $this->verifyTextPresent("Internationlization in PRADO", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("$12.40", "");
- $this->verifyTextPresent("€100.00", "");
- $this->verifyTextPresent("December 6, 2004", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh&notheme=true", "");
- $this->verifyTextPresent("PRADO 国际化", "");
- $this->verifyTextPresent("2004 十二月", "");
- $this->verifyTextPresent("US$ 12.40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00 ", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh_TW&notheme=true", "");
- $this->verifyTextPresent("PRADO 國際化", "");
- $this->verifyTextPresent("2004年12月6日", "");
- $this->verifyTextPresent("US$12.40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=de&notheme=true", "");
- $this->verifyTextPresent("Internationalisierung in PRADO", "");
- $this->verifyTextPresent("6. Dezember 2004 ", "");
- $this->verifyTextPresent("$ 12,40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=es&notheme=true", "");
- $this->verifyTextPresent("Internationlization en PRADO", "");
- $this->verifyTextPresent("6 de diciembre de 2004", "");
- $this->verifyTextPresent("US$12.40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=fr&notheme=true", "");
- $this->verifyTextPresent("Internationalisation avec PRADO", "");
- $this->verifyTextPresent("6 décembre 2004", "");
- $this->verifyTextPresent("12,40 $", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=pl&notheme=true", "");
- $this->verifyTextPresent("Internacjonalizacja w PRADO", "");
- $this->verifyTextPresent("6 grudnia 2004", "");
- $this->verifyTextPresent("US$ 12,40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
-
- }
-}
-
+<?php + +//New Test +class I18NTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?notheme=true&page=Advanced.Samples.I18N.Home&lang=en&notheme=true", ""); + $this->verifyTextPresent("Internationlization in PRADO", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("$12.40", ""); + $this->verifyTextPresent("€100.00", ""); + $this->verifyTextPresent("December 6, 2004", ""); + $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh&notheme=true", ""); + $this->verifyTextPresent("PRADO 国际化", ""); + $this->verifyTextPresent("2004 十二月", ""); + $this->verifyTextPresent("US$ 12.40", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("€100.00 ", ""); + $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh_TW&notheme=true", ""); + $this->verifyTextPresent("PRADO 國際化", ""); + $this->verifyTextPresent("2004年12月6日", ""); + $this->verifyTextPresent("US$12.40", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("€100.00", ""); + $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=de&notheme=true", ""); + $this->verifyTextPresent("Internationalisierung in PRADO", ""); + $this->verifyTextPresent("6. Dezember 2004 ", ""); + $this->verifyTextPresent("$ 12,40", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("€100.00", ""); + $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=es&notheme=true", ""); + $this->verifyTextPresent("Internationlization en PRADO", ""); + $this->verifyTextPresent("6 de diciembre de 2004", ""); + $this->verifyTextPresent("US$12.40", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("€100.00", ""); + $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=fr&notheme=true", ""); + $this->verifyTextPresent("Internationalisation avec PRADO", ""); + $this->verifyTextPresent("6 décembre 2004", ""); + $this->verifyTextPresent("12,40 $", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("€100.00", ""); + $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=pl&notheme=true", ""); + $this->verifyTextPresent("Internacjonalizacja w PRADO", ""); + $this->verifyTextPresent("6 grudnia 2004", ""); + $this->verifyTextPresent("US$ 12,40", ""); + $this->verifyTextPresent("46.412,42 €", ""); + $this->verifyTextPresent("€100.00", ""); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php b/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php index 23107824..e1987e38 100644 --- a/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php @@ -1,38 +1,38 @@ -<?php
-
-class BulletedListTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TBulletedList.Home&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- $this->verifyTextPresent('item 1','');
- $this->verifyTextPresent('item 2','');
- $this->verifyTextPresent('item 3','');
- $this->verifyTextPresent('item 4','');
- $this->verifyTextPresent('google','');
- $this->verifyTextPresent('yahoo','');
- $this->verifyTextPresent('amazon','');
-
- // verify order list starting from 5
- $this->verifyElementPresent("//ol[@start='5']");
-
- // unable to verify styles
-
- // verify hyperlink list
- $this->verifyElementPresent("//a[@href='http://www.google.com/']");
- $this->verifyElementPresent("//a[@href='http://www.yahoo.com/']");
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/']");
-
- // verify linkbutton list
- $this->clickAndWait("id=ctl0_body_ctl40", "");
- $this->verifyTextPresent("You clicked google : http://www.google.com/.", "");
- $this->clickAndWait("id=ctl0_body_ctl41", "");
- $this->verifyTextPresent("You clicked yahoo : http://www.yahoo.com/.", "");
- $this->clickAndWait("id=ctl0_body_ctl42", "");
- $this->verifyTextPresent("You clicked amazon : http://www.amazon.com/.", "");
- }
-}
-
+<?php + +class BulletedListTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TBulletedList.Home&notheme=true&lang=en", ""); + + // verify if all required texts are present + $this->verifyTextPresent('item 1',''); + $this->verifyTextPresent('item 2',''); + $this->verifyTextPresent('item 3',''); + $this->verifyTextPresent('item 4',''); + $this->verifyTextPresent('google',''); + $this->verifyTextPresent('yahoo',''); + $this->verifyTextPresent('amazon',''); + + // verify order list starting from 5 + $this->verifyElementPresent("//ol[@start='5']"); + + // unable to verify styles + + // verify hyperlink list + $this->verifyElementPresent("//a[@href='http://www.google.com/']"); + $this->verifyElementPresent("//a[@href='http://www.yahoo.com/']"); + $this->verifyElementPresent("//a[@href='http://www.amazon.com/']"); + + // verify linkbutton list + $this->clickAndWait("id=ctl0_body_ctl40", ""); + $this->verifyTextPresent("You clicked google : http://www.google.com/.", ""); + $this->clickAndWait("id=ctl0_body_ctl41", ""); + $this->verifyTextPresent("You clicked yahoo : http://www.yahoo.com/.", ""); + $this->clickAndWait("id=ctl0_body_ctl42", ""); + $this->verifyTextPresent("You clicked amazon : http://www.amazon.com/.", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php index 50458663..ca079c14 100644 --- a/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php @@ -1,35 +1,35 @@ -<?php
-
-class ButtonTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // a regular button
- $this->clickAndWait("//input[@type='submit' and @value='text']", "");
-
- // a click button
- $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
- $this->clickAndWait("//input[@type='submit' and @value='click me']", "");
- $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
-
- // a command button
- $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]");
- $this->clickAndWait("//input[@type='submit' and @value='click me']", "");
- $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]");
-
- // a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl3');
- $this->click("//input[@type='submit' and @value='submit']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@type='submit' and @value='submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl3');
- }
-}
-
+<?php + +class ButtonTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // a regular button + $this->clickAndWait("//input[@type='submit' and @value='text']", ""); + + // a click button + $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->clickAndWait("//input[@type='submit' and @value='click me']", ""); + $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + + // a command button + $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]"); + $this->clickAndWait("//input[@type='submit' and @value='click me']", ""); + $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]"); + + // a button causing validation + $this->verifyNotVisible('ctl0_body_ctl3'); + $this->click("//input[@type='submit' and @value='submit']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl3'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("//input[@type='submit' and @value='submit']", ""); + $this->verifyNotVisible('ctl0_body_ctl3'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php index a28efd75..01db9da7 100644 --- a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php @@ -1,54 +1,54 @@ -<?php
-
-//New Test
-class CheckBoxListTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&notheme=true&lang=en", "");
-
- // Check box list with default settings:
- $this->click("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']", "");
-
- // Check box list with customized cellpadding, cellspacing, color and text alignment:
- $this->click("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']", "");
-
- // *** Currently unable to test the following cases:
- // Check box list with vertical (default) repeat direction
- // Check box list with horizontal repeat direction
- // Check box list with flow layout and vertical (default) repeat direction
- // Check box list with flow layout and horizontal repeat direction:
-
- // Check box list's behavior upon postback
- $this->click("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", "");
-
- // Auto postback check box list
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']", "");
- $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", "");
-
- // Databind to an integer-indexed array
- $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: 1, Text: item 2)", "");
-
- // Databind to an associative array:
- $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
-
- // Databind with DataTextField and DataValueField specified
- $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']", "");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
-
- // CheckBox list causing validation
- $this->verifyNotVisible('ctl0_body_ctl8');
- $this->click("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl8');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", "");
- $this->verifyNotVisible('ctl0_body_ctl8');
- }
-}
-
+<?php + +//New Test +class CheckBoxListTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&notheme=true&lang=en", ""); + + // Check box list with default settings: + $this->click("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']", ""); + + // Check box list with customized cellpadding, cellspacing, color and text alignment: + $this->click("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']", ""); + + // *** Currently unable to test the following cases: + // Check box list with vertical (default) repeat direction + // Check box list with horizontal repeat direction + // Check box list with flow layout and vertical (default) repeat direction + // Check box list with flow layout and horizontal repeat direction: + + // Check box list's behavior upon postback + $this->click("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyTextPresent("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", ""); + + // Auto postback check box list + $this->clickAndWait("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']", ""); + $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", ""); + + // Databind to an integer-indexed array + $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']", ""); + $this->verifyTextPresent("Your selection is: (Index: 1, Value: 1, Text: item 2)", ""); + + // Databind to an associative array: + $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']", ""); + $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + + // Databind with DataTextField and DataValueField specified + $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']", ""); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + + // CheckBox list causing validation + $this->verifyNotVisible('ctl0_body_ctl8'); + $this->click("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl8'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", ""); + $this->verifyNotVisible('ctl0_body_ctl8'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php index 464769d7..4cd71bd4 100644 --- a/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php @@ -1,55 +1,55 @@ -<?php
-
-class CheckBoxTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBox.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // a regular checkbox
- $this->click("//input[@name='ctl0\$body\$ctl0']", "");
-
- // a checkbox with customized value
- $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", "");
-
- // an auto postback checkbox
- $this->verifyTextNotPresent("I'm clicked");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
-
- // a checkbox causing validation on a textbox
- $this->verifyNotVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl4']", "");
- $this->verifyNotVisible('ctl0_body_ctl3');
-
- // a checkbox validated by a required field validator
- $this->verifyNotVisible('ctl0_body_ctl6');
- $this->click("//input[@type='submit' and @value='Submit']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl6');
- $this->click("//input[@name='ctl0\$body\$CheckBox']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl6');
-
- // a checkbox validated by a required field validator using AutoPostBack
- $this->verifyNotVisible('ctl0_body_ctl7');
- $this->click("//input[@name='ctl0\$body\$CheckBox2']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl7');
-// $this->clickAndWait("//input[@name='ctl0\$body\$CheckBox2' and @value='ctl0\$body\$CheckBox2']", "");
-// $this->verifyNotVisible('ctl0_body_ctl7');
- }
-}
-
+<?php + +class CheckBoxTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBox.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // a regular checkbox + $this->click("//input[@name='ctl0\$body\$ctl0']", ""); + + // a checkbox with customized value + $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", ""); + + // an auto postback checkbox + $this->verifyTextNotPresent("I'm clicked"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", ""); + $this->verifyTextPresent("I'm clicked"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", ""); + $this->verifyTextPresent("I'm clicked"); + + // a checkbox causing validation on a textbox + $this->verifyNotVisible('ctl0_body_ctl3'); + $this->click("//input[@name='ctl0\$body\$ctl4']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl3'); + $this->click("//input[@name='ctl0\$body\$ctl4']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl3'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl4']", ""); + $this->verifyNotVisible('ctl0_body_ctl3'); + + // a checkbox validated by a required field validator + $this->verifyNotVisible('ctl0_body_ctl6'); + $this->click("//input[@type='submit' and @value='Submit']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl6'); + $this->click("//input[@name='ctl0\$body\$CheckBox']", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyNotVisible('ctl0_body_ctl6'); + + // a checkbox validated by a required field validator using AutoPostBack + $this->verifyNotVisible('ctl0_body_ctl7'); + $this->click("//input[@name='ctl0\$body\$CheckBox2']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl7'); +// $this->clickAndWait("//input[@name='ctl0\$body\$CheckBox2' and @value='ctl0\$body\$CheckBox2']", ""); +// $this->verifyNotVisible('ctl0_body_ctl7'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php index 41bb754b..9eea13b8 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php @@ -1,31 +1,31 @@ -<?php
-
-class DataGrid1TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample1&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- $this->verifyTextPresent('id','');
- $this->verifyTextPresent('name','');
- $this->verifyTextPresent('quantity','');
- $this->verifyTextPresent('price','');
- $this->verifyTextPresent('imported','');
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('Motherboard','');
- $this->verifyTextPresent('100','');
- $this->verifyTextPresent('true','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextPresent('Speaker','');
- $this->verifyTextPresent('35','');
- $this->verifyTextPresent('65','');
- $this->verifyTextPresent('false','');
-
- // verify specific table tags
- $this->verifyElementPresent("ctl0_body_DataGrid");
- $this->verifyAttribute("ctl0_body_DataGrid@cellpadding","2");
- }
-}
-
+<?php + +class DataGrid1TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample1&notheme=true&lang=en", ""); + + // verify if all required texts are present + $this->verifyTextPresent('id',''); + $this->verifyTextPresent('name',''); + $this->verifyTextPresent('quantity',''); + $this->verifyTextPresent('price',''); + $this->verifyTextPresent('imported',''); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('Motherboard',''); + $this->verifyTextPresent('100',''); + $this->verifyTextPresent('true',''); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextPresent('Speaker',''); + $this->verifyTextPresent('35',''); + $this->verifyTextPresent('65',''); + $this->verifyTextPresent('false',''); + + // verify specific table tags + $this->verifyElementPresent("ctl0_body_DataGrid"); + $this->verifyAttribute("ctl0_body_DataGrid@cellpadding","2"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php index 3c01c29a..6573125a 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php @@ -1,51 +1,51 @@ -<?php
-
-class DataGrid2TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- $this->verifyTextPresent('Book Title','');
- $this->verifyTextPresent('Publisher','');
- $this->verifyTextPresent('Price','');
- $this->verifyTextPresent('In-stock','');
- $this->verifyTextPresent('Rating','');
-
- // verify book titles
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",'');
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",'');
-
- // verify publishers
- $this->verifyTextPresent("O'Reilly Media, Inc.",'');
- $this->verifyTextPresent("Addison-Wesley Professional",'');
-
- // verify prices
- $this->verifyTextPresent("\$37.49",'');
- $this->verifyTextPresent("\$38.49",'');
-
- // verify in-stock
- $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked','regexp:false|null');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled');
-
- // verify ratings
- //$this->verifyElementPresent("//img[@src='images/star5.gif']",'');
- //$this->verifyElementPresent("//img[@src='images/star2.gif']",'');
-
- // verify toggle column visibility
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", "");
- $this->verifyTextNotPresent('Head First Design Patterns','');
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", "");
- $this->verifyElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5','');
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", "");
- $this->verifyElementPresent('ctl0_body_DataGrid_ctl1_ctl5','');
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", "");
- $this->verifyTextPresent('Head First Design Patterns','');
- }
-}
-
+<?php + +class DataGrid2TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&notheme=true&lang=en", ""); + + // verify if all required texts are present + $this->verifyTextPresent('Book Title',''); + $this->verifyTextPresent('Publisher',''); + $this->verifyTextPresent('Price',''); + $this->verifyTextPresent('In-stock',''); + $this->verifyTextPresent('Rating',''); + + // verify book titles + $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",''); + $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",''); + + // verify publishers + $this->verifyTextPresent("O'Reilly Media, Inc.",''); + $this->verifyTextPresent("Addison-Wesley Professional",''); + + // verify prices + $this->verifyTextPresent("\$37.49",''); + $this->verifyTextPresent("\$38.49",''); + + // verify in-stock + $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked','regexp:false|null'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled'); + + // verify ratings + //$this->verifyElementPresent("//img[@src='images/star5.gif']",''); + //$this->verifyElementPresent("//img[@src='images/star2.gif']",''); + + // verify toggle column visibility + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", ""); + $this->verifyTextNotPresent('Head First Design Patterns',''); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", ""); + $this->verifyElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5',''); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", ""); + $this->verifyElementPresent('ctl0_body_DataGrid_ctl1_ctl5',''); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", ""); + $this->verifyTextPresent('Head First Design Patterns',''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php index f084ff40..d342c791 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php @@ -1,52 +1,52 @@ -<?php
-
-class DataGrid3TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&notheme=true&lang=en", "");
-
- // verify the 2nd row of data
- $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", "");
- $this->verifyTextPresent("Addison-Wesley Professional", "");
- $this->verifyTextPresent("$47.04", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled');
- //$this->verifyElementPresent("//img[@src='images/star5.gif']",'');
-
- // edit the 2nd row
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl7", "");
- $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl1", "Design Pattern: Elements of Reusable Object-Oriented Software");
- $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl3", "Addison Wesley Professional");
- $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl5", "\$57.04");
- $this->click("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl7']", "");
- $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl9", "label=1");
- $this->clickAndWait("link=Save", "");
-
- // verify the 2nd row is saved
- $this->verifyTextPresent("Design Pattern: Elements of Reusable Object-Oriented Software", "");
- $this->verifyTextPresent("Addison Wesley Professional", "");
- $this->verifyTextPresent("$57.04", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:false|null');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled');
- //$this->verifyElementPresent("//img[@src='images/star1.gif']",'');
-
- // verify cancel editting the 3rd row
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl7", "");
- $this->clickAndWait("link=Cancel", "");
- $this->verifyTextPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", "");
-
- // verify deleting
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl9", "");
- $this->verifyConfirmation("Are you sure?");
- $this->verifyTextNotPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", "");
-
- $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",'');
- $this->chooseCancelOnNextConfirmation();
- $this->click("id=ctl0_body_DataGrid_ctl6_ctl9", "");
- $this->verifyConfirmation("Are you sure?");
- $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",'');
- }
-}
-
+<?php + +class DataGrid3TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&notheme=true&lang=en", ""); + + // verify the 2nd row of data + $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", ""); + $this->verifyTextPresent("Addison-Wesley Professional", ""); + $this->verifyTextPresent("$47.04", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:true|checked'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); + //$this->verifyElementPresent("//img[@src='images/star5.gif']",''); + + // edit the 2nd row + $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl7", ""); + $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl1", "Design Pattern: Elements of Reusable Object-Oriented Software"); + $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl3", "Addison Wesley Professional"); + $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl5", "\$57.04"); + $this->click("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl7']", ""); + $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl9", "label=1"); + $this->clickAndWait("link=Save", ""); + + // verify the 2nd row is saved + $this->verifyTextPresent("Design Pattern: Elements of Reusable Object-Oriented Software", ""); + $this->verifyTextPresent("Addison Wesley Professional", ""); + $this->verifyTextPresent("$57.04", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:false|null'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); + //$this->verifyElementPresent("//img[@src='images/star1.gif']",''); + + // verify cancel editting the 3rd row + $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl7", ""); + $this->clickAndWait("link=Cancel", ""); + $this->verifyTextPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); + + // verify deleting + $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl9", ""); + $this->verifyConfirmation("Are you sure?"); + $this->verifyTextNotPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); + + $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",''); + $this->chooseCancelOnNextConfirmation(); + $this->click("id=ctl0_body_DataGrid_ctl6_ctl9", ""); + $this->verifyConfirmation("Are you sure?"); + $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php index 0d36480c..0e554dea 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php @@ -1,30 +1,30 @@ -<?php
-
-class DataGrid4TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&notheme=true&lang=en", "");
-
- // verify the 2nd row of data
- $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", "");
- $this->verifyTextPresent("Addison-Wesley Professional", "");
- $this->verifyTextPresent("$47.04", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled');
-
- // verify sorting
- $this->clickAndWait("link=Book Title", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:false|null');
- $this->clickAndWait("link=Publisher", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked','regexp:false|null');
- $this->clickAndWait("link=Price", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:false|null');
- $this->clickAndWait("link=In-stock", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:false|null');
- $this->clickAndWait("link=Rating", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl4_ctl5@checked','regexp:false|null');
- }
-}
-
+<?php + +class DataGrid4TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&notheme=true&lang=en", ""); + + // verify the 2nd row of data + $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", ""); + $this->verifyTextPresent("Addison-Wesley Professional", ""); + $this->verifyTextPresent("$47.04", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled'); + + // verify sorting + $this->clickAndWait("link=Book Title", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:false|null'); + $this->clickAndWait("link=Publisher", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked','regexp:false|null'); + $this->clickAndWait("link=Price", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:false|null'); + $this->clickAndWait("link=In-stock", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:false|null'); + $this->clickAndWait("link=Rating", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl4_ctl5@checked','regexp:false|null'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php index 065986ec..c602ddf1 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php @@ -1,115 +1,115 @@ -<?php
-
-class DataGrid5TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample5&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- // verify column headers
- $this->verifyTextPresent('id','');
- $this->verifyTextPresent('name','');
- $this->verifyTextPresent('quantity','');
- $this->verifyTextPresent('price','');
- $this->verifyTextPresent('imported','');
-
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
-
- // verify paging
- $this->clickAndWait("link=2", "");
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextPresent('ITN007','');
- $this->verifyTextPresent('ITN008','');
- $this->verifyTextPresent('ITN009','');
- $this->verifyTextPresent('ITN010','');
- $this->verifyTextNotPresent('ITN011','');
- $this->verifyTextNotPresent('ITN005','');
-
- $this->clickAndWait("link=4", "");
- $this->verifyTextPresent('ITN016','');
- $this->verifyTextPresent('ITN017','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN015','');
-
- $this->clickAndWait("link=1", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
-
- // show top pager
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", "");
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl8_ctl3", "");
- $this->clickAndWait("link=1", "");
- // hide top pager
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", "");
-
- // change next prev caption
- $this->type("ctl0\$body\$NextPageText", "Next Page");
- $this->type("ctl0\$body\$PrevPageText", "Prev Page");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
-
- // verify next prev paging
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextNotPresent('ITN006','');
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN005','');
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextNotPresent('ITN011','');
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN010','');
- $this->verifyTextPresent('ITN011','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN015','');
- $this->verifyTextPresent('ITN016','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextNotPresent('ITN010','');
- $this->verifyTextPresent('ITN011','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextNotPresent('ITN005','');
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextNotPresent('ITN011','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextNotPresent('ITN006','');
-
- // change button count
- $this->type("ctl0\$body\$PageButtonCount", "2");
- $this->clickAndWait("name=ctl0\$body\$ctl6", "");
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN010','');
- $this->verifyTextPresent('ITN011','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("link=4", "");
- $this->verifyTextNotPresent('ITN015','');
- $this->verifyTextPresent('ITN016','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextNotPresent('ITN005','');
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextNotPresent('ITN011','');
-
- $this->type("ctl0\$body\$PageButtonCount", "10");
- $this->clickAndWait("name=ctl0\$body\$ctl6", "");
- $this->type("ctl0\$body\$PageSize", "2");
- $this->clickAndWait("name=ctl0\$body\$ctl8", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextNotPresent('ITN003','');
- $this->clickAndWait("link=10", "");
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN018','');
- }
-}
-
+<?php + +class DataGrid5TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample5&notheme=true&lang=en", ""); + + // verify if all required texts are present + // verify column headers + $this->verifyTextPresent('id',''); + $this->verifyTextPresent('name',''); + $this->verifyTextPresent('quantity',''); + $this->verifyTextPresent('price',''); + $this->verifyTextPresent('imported',''); + + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextPresent('ITN005',''); + $this->verifyTextNotPresent('ITN006',''); + + // verify paging + $this->clickAndWait("link=2", ""); + $this->verifyTextPresent('ITN006',''); + $this->verifyTextPresent('ITN007',''); + $this->verifyTextPresent('ITN008',''); + $this->verifyTextPresent('ITN009',''); + $this->verifyTextPresent('ITN010',''); + $this->verifyTextNotPresent('ITN011',''); + $this->verifyTextNotPresent('ITN005',''); + + $this->clickAndWait("link=4", ""); + $this->verifyTextPresent('ITN016',''); + $this->verifyTextPresent('ITN017',''); + $this->verifyTextPresent('ITN018',''); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextNotPresent('ITN015',''); + + $this->clickAndWait("link=1", ""); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextPresent('ITN005',''); + $this->verifyTextNotPresent('ITN006',''); + + // show top pager + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", ""); + $this->clickAndWait("id=ctl0_body_DataGrid_ctl8_ctl3", ""); + $this->clickAndWait("link=1", ""); + // hide top pager + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", ""); + + // change next prev caption + $this->type("ctl0\$body\$NextPageText", "Next Page"); + $this->type("ctl0\$body\$PrevPageText", "Prev Page"); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + + // verify next prev paging + $this->verifyTextPresent('ITN001',''); + $this->verifyTextNotPresent('ITN006',''); + $this->clickAndWait("link=Next Page", ""); + $this->verifyTextNotPresent('ITN005',''); + $this->verifyTextPresent('ITN006',''); + $this->verifyTextNotPresent('ITN011',''); + $this->clickAndWait("link=Next Page", ""); + $this->verifyTextNotPresent('ITN010',''); + $this->verifyTextPresent('ITN011',''); + $this->verifyTextNotPresent('ITN016',''); + $this->clickAndWait("link=Next Page", ""); + $this->verifyTextNotPresent('ITN015',''); + $this->verifyTextPresent('ITN016',''); + $this->clickAndWait("link=Prev Page", ""); + $this->verifyTextNotPresent('ITN010',''); + $this->verifyTextPresent('ITN011',''); + $this->verifyTextNotPresent('ITN016',''); + $this->clickAndWait("link=Prev Page", ""); + $this->verifyTextNotPresent('ITN005',''); + $this->verifyTextPresent('ITN006',''); + $this->verifyTextNotPresent('ITN011',''); + $this->clickAndWait("link=Prev Page", ""); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextNotPresent('ITN006',''); + + // change button count + $this->type("ctl0\$body\$PageButtonCount", "2"); + $this->clickAndWait("name=ctl0\$body\$ctl6", ""); + $this->clickAndWait("link=Next Page", ""); + $this->verifyTextNotPresent('ITN010',''); + $this->verifyTextPresent('ITN011',''); + $this->verifyTextNotPresent('ITN016',''); + $this->clickAndWait("link=4", ""); + $this->verifyTextNotPresent('ITN015',''); + $this->verifyTextPresent('ITN016',''); + $this->clickAndWait("link=Prev Page", ""); + $this->verifyTextNotPresent('ITN005',''); + $this->verifyTextPresent('ITN006',''); + $this->verifyTextNotPresent('ITN011',''); + + $this->type("ctl0\$body\$PageButtonCount", "10"); + $this->clickAndWait("name=ctl0\$body\$ctl6", ""); + $this->type("ctl0\$body\$PageSize", "2"); + $this->clickAndWait("name=ctl0\$body\$ctl8", ""); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextNotPresent('ITN003',''); + $this->clickAndWait("link=10", ""); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextNotPresent('ITN018',''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php index 05368157..1bf00aff 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php @@ -1,50 +1,50 @@ -<?php
-
-class DataGrid6TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&notheme=true&lang=en", "");
-
- // verify column headers
- $this->verifyTextPresent('id','');
- $this->verifyTextPresent('name','');
- $this->verifyTextPresent('quantity','');
- $this->verifyTextPresent('price','');
- $this->verifyTextPresent('imported','');
-
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
-
- // verify paging
- $this->clickAndWait("link=2", "");
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextPresent('ITN007','');
- $this->verifyTextPresent('ITN008','');
- $this->verifyTextPresent('ITN009','');
- $this->verifyTextPresent('ITN010','');
- $this->verifyTextNotPresent('ITN011','');
- $this->verifyTextNotPresent('ITN005','');
-
- $this->clickAndWait("link=4", "");
- $this->verifyTextPresent('ITN016','');
- $this->verifyTextPresent('ITN017','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN015','');
-
- $this->clickAndWait("link=1", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
- }
-}
-
+<?php + +class DataGrid6TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&notheme=true&lang=en", ""); + + // verify column headers + $this->verifyTextPresent('id',''); + $this->verifyTextPresent('name',''); + $this->verifyTextPresent('quantity',''); + $this->verifyTextPresent('price',''); + $this->verifyTextPresent('imported',''); + + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextPresent('ITN005',''); + $this->verifyTextNotPresent('ITN006',''); + + // verify paging + $this->clickAndWait("link=2", ""); + $this->verifyTextPresent('ITN006',''); + $this->verifyTextPresent('ITN007',''); + $this->verifyTextPresent('ITN008',''); + $this->verifyTextPresent('ITN009',''); + $this->verifyTextPresent('ITN010',''); + $this->verifyTextNotPresent('ITN011',''); + $this->verifyTextNotPresent('ITN005',''); + + $this->clickAndWait("link=4", ""); + $this->verifyTextPresent('ITN016',''); + $this->verifyTextPresent('ITN017',''); + $this->verifyTextPresent('ITN018',''); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextNotPresent('ITN015',''); + + $this->clickAndWait("link=1", ""); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextPresent('ITN005',''); + $this->verifyTextNotPresent('ITN006',''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php index 75f0ff30..4a42bf7b 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php @@ -1,26 +1,26 @@ -<?php
-
-class DataList1TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample1&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('$100','');
- $this->verifyTextPresent('Motherboard','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextPresent('Surge protector','');
- $this->verifyTextPresent('45','');
- $this->verifyTextPresent('$15','');
- $this->verifyTextPresent('Total 19 products.','');
- $this->verifyTextPresent('Computer Parts','');
-
- // verify specific table tags
- $this->verifyElementPresent("ctl0_body_DataList");
- $this->verifyElementPresent("//td[@align='right']");
- }
-}
-
+<?php + +class DataList1TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample1&notheme=true&lang=en", ""); + + // verify if all required texts are present + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('$100',''); + $this->verifyTextPresent('Motherboard',''); + $this->verifyTextPresent('ITN018',''); + $this->verifyTextPresent('Surge protector',''); + $this->verifyTextPresent('45',''); + $this->verifyTextPresent('$15',''); + $this->verifyTextPresent('Total 19 products.',''); + $this->verifyTextPresent('Computer Parts',''); + + // verify specific table tags + $this->verifyElementPresent("ctl0_body_DataList"); + $this->verifyElementPresent("//td[@align='right']"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php index 47e9bb94..4d91e409 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php @@ -1,61 +1,61 @@ -<?php
-
-class DataList2TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample2&notheme=true&lang=en", "");
-
- // verify initial presentation
- $this->verifyTextPresent("Motherboard ", "");
- $this->verifyTextPresent("Monitor ", "");
-
- // verify selecting an item
- $this->clickAndWait("link=ITN003", "");
- $this->verifyTextPresent("Quantity", "");
- $this->verifyTextPresent("Price", "");
- $this->verifyTextPresent("\$80", "");
- $this->clickAndWait("link=ITN005", "");
- $this->verifyTextPresent("\$150", "");
-
- // verify editting an item
- $this->clickAndWait("id=ctl0_body_DataList_ctl5_ctl0", "");
- $this->type("ctl0\$body\$DataList\$ctl5\$ProductQuantity", "11");
- $this->type("ctl0\$body\$DataList\$ctl5\$ProductPrice", "140.99");
- $this->click("//input[@name='ctl0\$body\$DataList\$ctl5\$ProductImported']", "");
- $this->clickAndWait("link=Save", "");
-
- // verify item is saved
- $this->clickAndWait("link=ITN005", "");
- $this->verifyTextPresent("\$140.99", "");
- $this->verifyTextPresent("11", "");
-
- // verify editting another item
- $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", "");
- $this->type("ctl0\$body\$DataList\$ctl3\$ProductName", "Hard Drive");
- $this->type("ctl0\$body\$DataList\$ctl3\$ProductQuantity", "23");
- $this->click("//input[@name='ctl0\$body\$DataList\$ctl3\$ProductImported']", "");
- $this->clickAndWait("link=Cancel", "");
-
- // verify item is canceled
- $this->clickAndWait("link=ITN003", "");
- $this->verifyTextPresent("2", "");
- $this->verifyTextPresent("Harddrive ", "");
-
- // verify item deletion
- $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", "");
- $this->verifyConfirmation("Are you sure?");
- $this->chooseCancelOnNextConfirmation();
- $this->click("id=ctl0_body_DataList_ctl5_ctl2", "");
- $this->verifyConfirmation("Are you sure?");
- $this->verifyTextPresent("Motherboard ", "");
- $this->verifyTextPresent("CPU ", "");
- $this->verifyTextNotPresent("Harddrive","");
- $this->verifyTextPresent("Sound card", "");
- $this->verifyTextPresent("Video card", "");
- $this->verifyTextPresent("Keyboard","");
- $this->verifyTextPresent("Monitor ", "");
- }
-}
-
+<?php + +class DataList2TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample2&notheme=true&lang=en", ""); + + // verify initial presentation + $this->verifyTextPresent("Motherboard ", ""); + $this->verifyTextPresent("Monitor ", ""); + + // verify selecting an item + $this->clickAndWait("link=ITN003", ""); + $this->verifyTextPresent("Quantity", ""); + $this->verifyTextPresent("Price", ""); + $this->verifyTextPresent("\$80", ""); + $this->clickAndWait("link=ITN005", ""); + $this->verifyTextPresent("\$150", ""); + + // verify editting an item + $this->clickAndWait("id=ctl0_body_DataList_ctl5_ctl0", ""); + $this->type("ctl0\$body\$DataList\$ctl5\$ProductQuantity", "11"); + $this->type("ctl0\$body\$DataList\$ctl5\$ProductPrice", "140.99"); + $this->click("//input[@name='ctl0\$body\$DataList\$ctl5\$ProductImported']", ""); + $this->clickAndWait("link=Save", ""); + + // verify item is saved + $this->clickAndWait("link=ITN005", ""); + $this->verifyTextPresent("\$140.99", ""); + $this->verifyTextPresent("11", ""); + + // verify editting another item + $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", ""); + $this->type("ctl0\$body\$DataList\$ctl3\$ProductName", "Hard Drive"); + $this->type("ctl0\$body\$DataList\$ctl3\$ProductQuantity", "23"); + $this->click("//input[@name='ctl0\$body\$DataList\$ctl3\$ProductImported']", ""); + $this->clickAndWait("link=Cancel", ""); + + // verify item is canceled + $this->clickAndWait("link=ITN003", ""); + $this->verifyTextPresent("2", ""); + $this->verifyTextPresent("Harddrive ", ""); + + // verify item deletion + $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", ""); + $this->verifyConfirmation("Are you sure?"); + $this->chooseCancelOnNextConfirmation(); + $this->click("id=ctl0_body_DataList_ctl5_ctl2", ""); + $this->verifyConfirmation("Are you sure?"); + $this->verifyTextPresent("Motherboard ", ""); + $this->verifyTextPresent("CPU ", ""); + $this->verifyTextNotPresent("Harddrive",""); + $this->verifyTextPresent("Sound card", ""); + $this->verifyTextPresent("Video card", ""); + $this->verifyTextPresent("Keyboard",""); + $this->verifyTextPresent("Monitor ", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php index 86ef3f00..ebd0b5e7 100644 --- a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php @@ -1,67 +1,67 @@ -<?php
-
-class DropDownListTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // dropdown list with default settings
- $this->verifyElementPresent("ctl0\$body\$ctl0");
-
- // dropdown list with initial options
- $this->verifySelectOptions("ctl0\$body\$ctl1","item 1,item 2,item 3,item 4");
- $this->verifySelected("ctl0\$body\$ctl1","value=value 2");
-
- // dropdown list with customized styles
- $this->verifySelectOptions("ctl0\$body\$ctl2","item 1,item 2,item 3,item 4");
- $this->verifySelected("ctl0\$body\$ctl2","value=value 2");
-
- // a disabled dropdown list
- $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
-
- // an auto postback dropdown list
- $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
- $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
-
- // a single selection list box upon postback
- $this->select("ctl0\$body\$DropDownList1", "label=item 4");
- $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
-
- // Databind to an integer-indexed array
- $this->selectAndWait("ctl0\$body\$DBDropDownList1", "label=item 3");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", "");
-
- // Databind to an associative array
- $this->selectAndWait("ctl0\$body\$DBDropDownList2", "label=item 2");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
-
- // Databind with DataTextField and DataValueField specified
- $this->selectAndWait("ctl0\$body\$DBDropDownList3", "label=Cary");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
-
- // dropdown list is being validated
- $this->verifyNotVisible('ctl0_body_ctl6');
- $this->click("id=ctl0_body_ctl7", "");
- $this->verifyVisible('ctl0_body_ctl6');
- $this->select("ctl0\$body\$VDropDownList1", "label=item 2");
- $this->clickAndWait("id=ctl0_body_ctl7", "");
- $this->verifyNotVisible('ctl0_body_ctl6');
-
- // dropdown list causing validation
- $this->verifyNotVisible('ctl0_body_ctl8');
- $this->select("ctl0\$body\$VDropDownList2", "label=Disagree");
- $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl8');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->selectAndWait("ctl0\$body\$VDropDownList2", "label=Agree");
- $this->verifyNotVisible('ctl0_body_ctl8');
- }
-}
-
+<?php + +class DropDownListTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // dropdown list with default settings + $this->verifyElementPresent("ctl0\$body\$ctl0"); + + // dropdown list with initial options + $this->verifySelectOptions("ctl0\$body\$ctl1","item 1,item 2,item 3,item 4"); + $this->verifySelected("ctl0\$body\$ctl1","value=value 2"); + + // dropdown list with customized styles + $this->verifySelectOptions("ctl0\$body\$ctl2","item 1,item 2,item 3,item 4"); + $this->verifySelected("ctl0\$body\$ctl2","value=value 2"); + + // a disabled dropdown list + $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); + + // an auto postback dropdown list + $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3"); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + + // a single selection list box upon postback + $this->select("ctl0\$body\$DropDownList1", "label=item 4"); + $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + + // Databind to an integer-indexed array + $this->selectAndWait("ctl0\$body\$DBDropDownList1", "label=item 3"); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); + + // Databind to an associative array + $this->selectAndWait("ctl0\$body\$DBDropDownList2", "label=item 2"); + $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + + // Databind with DataTextField and DataValueField specified + $this->selectAndWait("ctl0\$body\$DBDropDownList3", "label=Cary"); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + + // dropdown list is being validated + $this->verifyNotVisible('ctl0_body_ctl6'); + $this->click("id=ctl0_body_ctl7", ""); + $this->verifyVisible('ctl0_body_ctl6'); + $this->select("ctl0\$body\$VDropDownList1", "label=item 2"); + $this->clickAndWait("id=ctl0_body_ctl7", ""); + $this->verifyNotVisible('ctl0_body_ctl6'); + + // dropdown list causing validation + $this->verifyNotVisible('ctl0_body_ctl8'); + $this->select("ctl0\$body\$VDropDownList2", "label=Disagree"); + $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl8'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->selectAndWait("ctl0\$body\$VDropDownList2", "label=Agree"); + $this->verifyNotVisible('ctl0_body_ctl8'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php index 793a1df0..b474518d 100644 --- a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php @@ -1,15 +1,15 @@ -<?php
-
-class ExpressionTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- $this->verifyTextPresent('PRADO QuickStart Sample');
- }
-}
-
+<?php + +class ExpressionTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + $this->verifyTextPresent('PRADO QuickStart Sample'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php index 00055da6..82d3ad24 100644 --- a/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php @@ -1,15 +1,15 @@ -<?php
-
-class HtmlAreaTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // can't perform any test
- }
-}
-
+<?php + +class HtmlAreaTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // can't perform any test + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php index b564c85a..3b48e961 100644 --- a/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php @@ -1,17 +1,17 @@ -<?php
-
-class HyperLinkTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THyperLink.Home&notheme=true&lang=en", "");
- $this->verifyTitle("PRADO QuickStart Sample", "");
- $this->verifyElementPresent("//a[@href=\"http://www.pradosoft.com/\" and @target=\"_blank\"]");
- $this->verifyTextPresent("Welcome to", "");
- $this->verifyTextPresent("Body contents", "");
- $this->verifyElementPresent("//a[img/@alt='Hello World']");
- $this->verifyElementPresent("//a[contains(text(),'Body contents')]");
- }
-}
-
+<?php + +class HyperLinkTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THyperLink.Home&notheme=true&lang=en", ""); + $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->verifyElementPresent("//a[@href=\"http://www.pradosoft.com/\" and @target=\"_blank\"]"); + $this->verifyTextPresent("Welcome to", ""); + $this->verifyTextPresent("Body contents", ""); + $this->verifyElementPresent("//a[img/@alt='Hello World']"); + $this->verifyElementPresent("//a[contains(text(),'Body contents')]"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php index fb40fbea..32568e59 100644 --- a/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php @@ -1,30 +1,30 @@ -<?php
-
-class ImageButtonTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // a click button
- $this->clickAndWait("//input[@type='image' and @alt='hello world']", "");
- $this->verifyTextPresent("You clicked at ","");
-
- // a command button
- $this->clickAndWait("ctl0\$body\$ctl1", "");
- $this->verifyTextPresent("Command name: test, Command parameter: value","");
-
- // a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl2');
- $this->click("id=ctl0_body_ctl3", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl2');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("id=ctl0_body_ctl3", "");
- $this->verifyNotVisible('ctl0_body_ctl2');
- }
-}
-
+<?php + +class ImageButtonTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // a click button + $this->clickAndWait("//input[@type='image' and @alt='hello world']", ""); + $this->verifyTextPresent("You clicked at ",""); + + // a command button + $this->clickAndWait("ctl0\$body\$ctl1", ""); + $this->verifyTextPresent("Command name: test, Command parameter: value",""); + + // a button causing validation + $this->verifyNotVisible('ctl0_body_ctl2'); + $this->click("id=ctl0_body_ctl3", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl2'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("id=ctl0_body_ctl3", ""); + $this->verifyNotVisible('ctl0_body_ctl2'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php index c95b94d7..f203f6aa 100644 --- a/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php @@ -1,20 +1,20 @@ -<?php
-
-//New Test
-class ImageTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TImage.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='']");
- $this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='Hello World!']");
- $this->verifyTextPresent("Hello World! Hello World! Hello World!", "");
- //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @align='baseline']");
- //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and contains(@longdesc,'HelloWorld.html')]");
- }
-}
-
+<?php + +//New Test +class ImageTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TImage.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='']"); + $this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='Hello World!']"); + $this->verifyTextPresent("Hello World! Hello World! Hello World!", ""); + //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @align='baseline']"); + //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and contains(@longdesc,'HelloWorld.html')]"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php index 4dc4d5f4..a2a02ff5 100644 --- a/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php @@ -1,23 +1,23 @@ -<?php
-
-//New Test
-class LabelTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TLabel.Home&notheme=true&lang=en", "");
- $this->verifyTitle("PRADO QuickStart Sample", "");
- $this->verifyTextPresent("This is a label with customized color and font.", "");
- $this->verifyTextPresent("This is a form label associated with the TTextBox control below", "");
- $this->verifyTextPresent("This is a label with empty Text property and nonempty body", "");
- $this->verifyTextPresent("This is a disabled label", "");
-
- $this->verifyAttribute("ctl0_body_Label2@disabled","regexp:true|disabled");
-
- //$this->verifyAttribute("ctl0_body_Label1@for","ctl0_body_test");
-
- $this->type("ctl0\$body\$test", "test");
- }
-}
-
+<?php + +//New Test +class LabelTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TLabel.Home&notheme=true&lang=en", ""); + $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->verifyTextPresent("This is a label with customized color and font.", ""); + $this->verifyTextPresent("This is a form label associated with the TTextBox control below", ""); + $this->verifyTextPresent("This is a label with empty Text property and nonempty body", ""); + $this->verifyTextPresent("This is a disabled label", ""); + + $this->verifyAttribute("ctl0_body_Label2@disabled","regexp:true|disabled"); + + //$this->verifyAttribute("ctl0_body_Label1@for","ctl0_body_test"); + + $this->type("ctl0\$body\$test", "test"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php index 49fd1f9b..1f33ba07 100644 --- a/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php @@ -1,34 +1,34 @@ -<?php
-
-class LinkButtonTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TLinkButton.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // regular buttons
- $this->clickAndWait("link=link button", "");
- $this->clickAndWait("//a[contains(text(),'body content')]", "");
-
- // a click button
- $this->clickAndWait("link=click me", "");
- $this->clickAndWait("link=I'm clicked", "");
-
- // a command button
- $this->clickAndWait("link=click me", "");
- $this->clickAndWait("//a[contains(text(),'Name: test, Param: value')]", "");
-
- // a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl4');
- $this->click("link=submit", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl4');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("link=submit", "");
- $this->verifyNotVisible('ctl0_body_ctl4');
- }
-}
-
+<?php + +class LinkButtonTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TLinkButton.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // regular buttons + $this->clickAndWait("link=link button", ""); + $this->clickAndWait("//a[contains(text(),'body content')]", ""); + + // a click button + $this->clickAndWait("link=click me", ""); + $this->clickAndWait("link=I'm clicked", ""); + + // a command button + $this->clickAndWait("link=click me", ""); + $this->clickAndWait("//a[contains(text(),'Name: test, Param: value')]", ""); + + // a button causing validation + $this->verifyNotVisible('ctl0_body_ctl4'); + $this->click("link=submit", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl4'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("link=submit", ""); + $this->verifyNotVisible('ctl0_body_ctl4'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php index 182bbd25..dcd048b5 100644 --- a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php @@ -1,84 +1,84 @@ -<?php
-
-//New Test
-class ListBoxTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TListBox.Home&notheme=true&lang=en", "");
-
- // a default single selection listbox
- $this->verifyAttribute("ctl0\$body\$ctl0@size","4");
-
- // single selection list box with initial options
- $this->verifySelectOptions("ctl0\$body\$ctl1","item 1,item 2,item 3,item 4");
- $this->verifySelected("ctl0\$body\$ctl1","value=value 2");
-
- // a single selection list box with customized style
- $this->verifyAttribute("ctl0\$body\$ctl2@size","3");
- $this->verifySelectOptions("ctl0\$body\$ctl2","item 1,item 2,item 3,item 4");
- $this->verifySelected("ctl0\$body\$ctl2","value=value 2");
-
- // a disabled list box
- $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
-
- // an auto postback single selection list box
- $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
- $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
-
- // a single selection list box upon postback
- $this->select("ctl0\$body\$ListBox1", "label=item 4");
- $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
-
- // a multiple selection list box
- $this->verifyAttribute("ctl0\$body\$ctl6[]@size","4");
- $this->verifyAttribute("ctl0\$body\$ctl6[]@multiple","regexp:true|multiple");
-
- // a multiple selection list box with initial options
- $this->verifyAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple");
- $this->verifySelectOptions("ctl0\$body\$ctl7[]","item 1,item 2,item 3,item 4");
-
- // multiselection list box's behavior upon postback
- $this->addSelection("ctl0\$body\$ListBox2[]", "label=item 3");
- $this->clickAndWait("name=ctl0\$body\$ctl8", "");
- $this->verifyText("ctl0_body_MultiSelectionResult2","Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)");
-
- // Auto postback multiselection list box
- $this->addSelection("ctl0\$body\$ctl9[]", "label=item 1");
- $this->waitForPageToLoad(1000);
- $this->verifyText("ctl0_body_MultiSelectionResult","Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)");
-
- // Databind to an integer-indexed array
- $this->selectAndWait("ctl0\$body\$DBListBox1[]", "label=item 3");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", "");
-
- // Databind to an associative array
- $this->selectAndWait("ctl0\$body\$DBListBox2[]", "label=item 2");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
-
- // Databind with DataTextField and DataValueField specified
- $this->selectAndWait("ctl0\$body\$DBListBox3[]", "label=Cary");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
-
- // List box is being validated
- $this->verifyNotVisible('ctl0_body_ctl10');
- $this->click("id=ctl0_body_ctl11", "");
- $this->verifyVisible('ctl0_body_ctl10');
- $this->select("ctl0\$body\$VListBox1", "label=item 2");
- $this->clickAndWait("id=ctl0_body_ctl11", "");
- $this->verifyNotVisible('ctl0_body_ctl10');
-
- // List box causing validation
- $this->verifyNotVisible('ctl0_body_ctl12');
- $this->select("ctl0\$body\$VListBox2", "label=Agree");
- $this->verifyVisible('ctl0_body_ctl12');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->selectAndWait("ctl0\$body\$VListBox2", "label=Disagree");
- $this->verifyNotVisible('ctl0_body_ctl12');
- }
-}
-
+<?php + +//New Test +class ListBoxTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TListBox.Home&notheme=true&lang=en", ""); + + // a default single selection listbox + $this->verifyAttribute("ctl0\$body\$ctl0@size","4"); + + // single selection list box with initial options + $this->verifySelectOptions("ctl0\$body\$ctl1","item 1,item 2,item 3,item 4"); + $this->verifySelected("ctl0\$body\$ctl1","value=value 2"); + + // a single selection list box with customized style + $this->verifyAttribute("ctl0\$body\$ctl2@size","3"); + $this->verifySelectOptions("ctl0\$body\$ctl2","item 1,item 2,item 3,item 4"); + $this->verifySelected("ctl0\$body\$ctl2","value=value 2"); + + // a disabled list box + $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); + + // an auto postback single selection list box + $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3"); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + + // a single selection list box upon postback + $this->select("ctl0\$body\$ListBox1", "label=item 4"); + $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + + // a multiple selection list box + $this->verifyAttribute("ctl0\$body\$ctl6[]@size","4"); + $this->verifyAttribute("ctl0\$body\$ctl6[]@multiple","regexp:true|multiple"); + + // a multiple selection list box with initial options + $this->verifyAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple"); + $this->verifySelectOptions("ctl0\$body\$ctl7[]","item 1,item 2,item 3,item 4"); + + // multiselection list box's behavior upon postback + $this->addSelection("ctl0\$body\$ListBox2[]", "label=item 3"); + $this->clickAndWait("name=ctl0\$body\$ctl8", ""); + $this->verifyText("ctl0_body_MultiSelectionResult2","Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)"); + + // Auto postback multiselection list box + $this->addSelection("ctl0\$body\$ctl9[]", "label=item 1"); + $this->waitForPageToLoad(1000); + $this->verifyText("ctl0_body_MultiSelectionResult","Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)"); + + // Databind to an integer-indexed array + $this->selectAndWait("ctl0\$body\$DBListBox1[]", "label=item 3"); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); + + // Databind to an associative array + $this->selectAndWait("ctl0\$body\$DBListBox2[]", "label=item 2"); + $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + + // Databind with DataTextField and DataValueField specified + $this->selectAndWait("ctl0\$body\$DBListBox3[]", "label=Cary"); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + + // List box is being validated + $this->verifyNotVisible('ctl0_body_ctl10'); + $this->click("id=ctl0_body_ctl11", ""); + $this->verifyVisible('ctl0_body_ctl10'); + $this->select("ctl0\$body\$VListBox1", "label=item 2"); + $this->clickAndWait("id=ctl0_body_ctl11", ""); + $this->verifyNotVisible('ctl0_body_ctl10'); + + // List box causing validation + $this->verifyNotVisible('ctl0_body_ctl12'); + $this->select("ctl0\$body\$VListBox2", "label=Agree"); + $this->verifyVisible('ctl0_body_ctl12'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->selectAndWait("ctl0\$body\$VListBox2", "label=Disagree"); + $this->verifyNotVisible('ctl0_body_ctl12'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php index c6b22e00..080af26d 100644 --- a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php @@ -1,39 +1,39 @@ -<?php
-
-class MultiViewTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // view 1 : type in a string
- $this->verifyElementNotPresent('ctl0_body_Result1');
- $this->verifyElementNotPresent('ctl0_body_Result2');
- $this->type('ctl0_body_Memo','test');
- $this->clickAndWait('ctl0$body$ctl0'); // view 2 to select the dropdown
- $this->clickAndWait('ctl0$body$ctl4');
-
- // view 3 : check if the output is updated
- $this->verifyTextPresent('Your text input is: test');
- $this->verifyTextPresent('Your color choice is: Red');
- $this->clickAndWait('ctl0$body$ctl7');
-
- // view 2 : update dropdownlist
- $this->verifyElementNotPresent('ctl0_body_Result1');
- $this->verifyElementNotPresent('ctl0_body_Result2');
- $this->select('ctl0$body$DropDownList', "label=Blue");
- $this->clickAndWait('ctl0$body$ctl4');
-
- // view 3 : check if the output is updated
- $this->verifyTextPresent('Your text input is: test');
- $this->verifyTextPresent('Your color choice is: Blue');
- $this->clickAndWait('ctl0$body$ctl7');
-
- // view 2 : check if dropdownlist maintains state
- $this->verifySelected('ctl0$body$DropDownList', "label=Blue");
- }
-}
-
+<?php + +class MultiViewTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // view 1 : type in a string + $this->verifyElementNotPresent('ctl0_body_Result1'); + $this->verifyElementNotPresent('ctl0_body_Result2'); + $this->type('ctl0_body_Memo','test'); + $this->clickAndWait('ctl0$body$ctl0'); // view 2 to select the dropdown + $this->clickAndWait('ctl0$body$ctl4'); + + // view 3 : check if the output is updated + $this->verifyTextPresent('Your text input is: test'); + $this->verifyTextPresent('Your color choice is: Red'); + $this->clickAndWait('ctl0$body$ctl7'); + + // view 2 : update dropdownlist + $this->verifyElementNotPresent('ctl0_body_Result1'); + $this->verifyElementNotPresent('ctl0_body_Result2'); + $this->select('ctl0$body$DropDownList', "label=Blue"); + $this->clickAndWait('ctl0$body$ctl4'); + + // view 3 : check if the output is updated + $this->verifyTextPresent('Your text input is: test'); + $this->verifyTextPresent('Your color choice is: Blue'); + $this->clickAndWait('ctl0$body$ctl7'); + + // view 2 : check if dropdownlist maintains state + $this->verifySelected('ctl0$body$DropDownList', "label=Blue"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php index c1ff9209..fac4160f 100644 --- a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php @@ -1,58 +1,58 @@ -<?php
-
-class PagerTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&notheme=true&lang=en", "");
-
- // verify datalist content
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextNotPresent('ITN003','');
-
- // verify numeric paging
- $this->clickAndWait("ctl0_body_Pager_ctl1", ""); // 2nd page
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextNotPresent('ITN002','');
- $this->verifyTextNotPresent('ITN005','');
- $this->clickAndWait("ctl0_body_Pager_ctl3", ""); // 4rd page
- $this->verifyTextPresent('ITN007','');
- $this->verifyTextPresent('ITN008','');
- $this->verifyTextNotPresent('ITN006','');
- $this->verifyTextNotPresent('ITN009','');
- $this->clickAndWait("ctl0_body_Pager_ctl6", ""); // last page
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN018','');
- $this->verifyTextNotPresent('ITN001','');
-
- // verify next-prev paging
- $this->clickAndWait("ctl0_body_Pager2_ctl1", ""); // prev page
- $this->verifyTextPresent('ITN017','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextNotPresent('ITN019','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("ctl0_body_Pager2_ctl0", ""); // first page
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextNotPresent('ITN003','');
- $this->clickAndWait("ctl0_body_Pager2_ctl2", ""); // next page
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextNotPresent('ITN002','');
- $this->verifyTextNotPresent('ITN005','');
-
- $this->verifySelected("ctl0_body_Pager3_ctl0","label=2");
- $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=5");
- $this->verifyTextPresent('ITN009','');
- $this->verifyTextPresent('ITN010','');
- $this->verifyTextNotPresent('ITN008','');
- $this->verifyTextNotPresent('ITN011','');
- $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=10");
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN018','');
- }
-}
-
+<?php + +class PagerTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&notheme=true&lang=en", ""); + + // verify datalist content + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextNotPresent('ITN003',''); + + // verify numeric paging + $this->clickAndWait("ctl0_body_Pager_ctl1", ""); // 2nd page + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextNotPresent('ITN002',''); + $this->verifyTextNotPresent('ITN005',''); + $this->clickAndWait("ctl0_body_Pager_ctl3", ""); // 4rd page + $this->verifyTextPresent('ITN007',''); + $this->verifyTextPresent('ITN008',''); + $this->verifyTextNotPresent('ITN006',''); + $this->verifyTextNotPresent('ITN009',''); + $this->clickAndWait("ctl0_body_Pager_ctl6", ""); // last page + $this->verifyTextPresent('ITN019',''); + $this->verifyTextNotPresent('ITN018',''); + $this->verifyTextNotPresent('ITN001',''); + + // verify next-prev paging + $this->clickAndWait("ctl0_body_Pager2_ctl1", ""); // prev page + $this->verifyTextPresent('ITN017',''); + $this->verifyTextPresent('ITN018',''); + $this->verifyTextNotPresent('ITN019',''); + $this->verifyTextNotPresent('ITN016',''); + $this->clickAndWait("ctl0_body_Pager2_ctl0", ""); // first page + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextNotPresent('ITN003',''); + $this->clickAndWait("ctl0_body_Pager2_ctl2", ""); // next page + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextNotPresent('ITN002',''); + $this->verifyTextNotPresent('ITN005',''); + + $this->verifySelected("ctl0_body_Pager3_ctl0","label=2"); + $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=5"); + $this->verifyTextPresent('ITN009',''); + $this->verifyTextPresent('ITN010',''); + $this->verifyTextNotPresent('ITN008',''); + $this->verifyTextNotPresent('ITN011',''); + $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=10"); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextNotPresent('ITN018',''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php index 086fb4c1..8d1e28fb 100644 --- a/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php @@ -1,18 +1,18 @@ -<?php
-
-class PanelTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TPanel.Home&notheme=true&lang=en", "");
- $this->verifyTextPresent("This is panel content with", "");
- $this->verifyElementPresent("//span[text()='label']");
- $this->verifyTextPresent("grouping text", "");
- $this->click("//input[@name='ctl0\$body\$ctl17']", "");
- $this->verifyTextNotPresent("You have clicked on 'button2'.");
- $this->clickAndWait("//input[@type='submit' and @value='button2']", "");
- $this->verifyTextPresent("You have clicked on 'button2'.");
- }
-}
-
+<?php + +class PanelTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TPanel.Home&notheme=true&lang=en", ""); + $this->verifyTextPresent("This is panel content with", ""); + $this->verifyElementPresent("//span[text()='label']"); + $this->verifyTextPresent("grouping text", ""); + $this->click("//input[@name='ctl0\$body\$ctl17']", ""); + $this->verifyTextNotPresent("You have clicked on 'button2'."); + $this->clickAndWait("//input[@type='submit' and @value='button2']", ""); + $this->verifyTextPresent("You have clicked on 'button2'."); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php index 8e64cc3e..6c179a24 100644 --- a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php @@ -1,54 +1,54 @@ -<?php
-
-//New Test
-class RadioButtonListTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButtonList.Home&notheme=true&lang=en", "");
-
- // RadioButton list with default settings:
- $this->click("//input[@name='ctl0\$body\$ctl0' and @value='value 3']", "");
-
- // RadioButton list with customized cellpadding, cellspacing, color and text alignment:
- $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value 1']", "");
-
- // *** Currently unable to test the following cases:
- // RadioButton list with vertical (default) repeat direction
- // RadioButton list with horizontal repeat direction
- // RadioButton list with flow layout and vertical (default) repeat direction
- // RadioButton list with flow layout and horizontal repeat direction:
-
- // RadioButton list's behavior upon postback
- $this->click("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
-
- // Auto postback check box list
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl7' and @value='value 5']", "");
- $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", "");
-
- // Databind to an integer-indexed array
- $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']", "");
- $this->verifyTextPresent("Your selection is: (Index: 0, Value: 0, Text: item 1)", "");
-
- // Databind to an associative array:
- $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
-
- // Databind with DataTextField and DataValueField specified
- $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']", "");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
-
- // RadioButton list causing validation
- $this->verifyNotVisible('ctl0_body_ctl8');
- $this->click("//input[@name='ctl0\$body\$ctl9' and @value='Agree']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl8');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl9' and @value='Disagree']", "");
- $this->verifyNotVisible('ctl0_body_ctl8');
- }
-}
-
+<?php + +//New Test +class RadioButtonListTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButtonList.Home&notheme=true&lang=en", ""); + + // RadioButton list with default settings: + $this->click("//input[@name='ctl0\$body\$ctl0' and @value='value 3']", ""); + + // RadioButton list with customized cellpadding, cellspacing, color and text alignment: + $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value 1']", ""); + + // *** Currently unable to test the following cases: + // RadioButton list with vertical (default) repeat direction + // RadioButton list with horizontal repeat direction + // RadioButton list with flow layout and vertical (default) repeat direction + // RadioButton list with flow layout and horizontal repeat direction: + + // RadioButton list's behavior upon postback + $this->click("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + + // Auto postback check box list + $this->clickAndWait("//input[@name='ctl0\$body\$ctl7' and @value='value 5']", ""); + $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", ""); + + // Databind to an integer-indexed array + $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']", ""); + $this->verifyTextPresent("Your selection is: (Index: 0, Value: 0, Text: item 1)", ""); + + // Databind to an associative array: + $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']", ""); + $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + + // Databind with DataTextField and DataValueField specified + $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']", ""); + $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + + // RadioButton list causing validation + $this->verifyNotVisible('ctl0_body_ctl8'); + $this->click("//input[@name='ctl0\$body\$ctl9' and @value='Agree']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl8'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl9' and @value='Disagree']", ""); + $this->verifyNotVisible('ctl0_body_ctl8'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php index 09f0238d..644d1c29 100644 --- a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php @@ -1,58 +1,58 @@ -<?php
-
-class RadioButtonTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButton.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // a regular radiobutton
- $this->click("//input[@name='ctl0\$body\$ctl0' and @value='ctl0\$body\$ctl0']", "");
-
- // a radiobutton with customized value
- $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", "");
-
- // an auto postback radiobutton
- $this->verifyTextNotPresent("I'm clicked");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
- $this->click("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
-
- // a radiobutton causing validation on a textbox
- $this->verifyNotVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", "");
- $this->verifyNotVisible('ctl0_body_ctl3');
-
- // a radiobutton validated by a required field validator
- $this->verifyNotVisible('ctl0_body_ctl6');
- $this->click("//input[@type='submit' and @value='Submit']", "");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl6');
- $this->click("//input[@name='ctl0\$body\$RadioButton' and @value='ctl0\$body\$RadioButton']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl6');
-
- // a radiobutton group
- $this->clickAndWait("name=ctl0\$body\$ctl7", "");
- $this->verifyTextPresent("Your selection is empty");
- $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']", "");
- $this->clickAndWait("name=ctl0\$body\$ctl7", "");
- $this->verifyTextPresent("Your selection is 2");
- $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']", "");
- $this->click("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']", "");
- $this->clickAndWait("name=ctl0\$body\$ctl7", "");
- $this->verifyTextPresent("Your selection is 34");
- }
-}
-
+<?php + +class RadioButtonTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButton.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // a regular radiobutton + $this->click("//input[@name='ctl0\$body\$ctl0' and @value='ctl0\$body\$ctl0']", ""); + + // a radiobutton with customized value + $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", ""); + + // an auto postback radiobutton + $this->verifyTextNotPresent("I'm clicked"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", ""); + $this->verifyTextPresent("I'm clicked"); + $this->click("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", ""); + $this->verifyTextPresent("I'm clicked"); + + // a radiobutton causing validation on a textbox + $this->verifyNotVisible('ctl0_body_ctl3'); + $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl3'); + $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl3'); + $this->type("ctl0\$body\$TextBox", "test"); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", ""); + $this->verifyNotVisible('ctl0_body_ctl3'); + + // a radiobutton validated by a required field validator + $this->verifyNotVisible('ctl0_body_ctl6'); + $this->click("//input[@type='submit' and @value='Submit']", ""); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl6'); + $this->click("//input[@name='ctl0\$body\$RadioButton' and @value='ctl0\$body\$RadioButton']", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyNotVisible('ctl0_body_ctl6'); + + // a radiobutton group + $this->clickAndWait("name=ctl0\$body\$ctl7", ""); + $this->verifyTextPresent("Your selection is empty"); + $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']", ""); + $this->clickAndWait("name=ctl0\$body\$ctl7", ""); + $this->verifyTextPresent("Your selection is 2"); + $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']", ""); + $this->click("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']", ""); + $this->clickAndWait("name=ctl0\$body\$ctl7", ""); + $this->verifyTextPresent("Your selection is 34"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php index e0c8cede..b2d51118 100644 --- a/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php @@ -1,29 +1,29 @@ -<?php
-
-class Repeater1TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample1&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- $this->verifyTextPresent('ID','');
- $this->verifyTextPresent('Name','');
- $this->verifyTextPresent('Quantity','');
- $this->verifyTextPresent('Price','');
- $this->verifyTextPresent('Imported','');
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('Motherboard','');
- $this->verifyTextPresent('Yes','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextPresent('Speaker','');
- $this->verifyTextPresent('No','');
- $this->verifyTextPresent('Computer Parts Inventory','');
-
- // verify specific table tags
- $this->verifyElementPresent("//td[@colspan='5']");
- $this->verifyElementPresent("//table[@cellpadding='2']");
- }
-}
-
+<?php + +class Repeater1TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample1&notheme=true&lang=en", ""); + + // verify if all required texts are present + $this->verifyTextPresent('ID',''); + $this->verifyTextPresent('Name',''); + $this->verifyTextPresent('Quantity',''); + $this->verifyTextPresent('Price',''); + $this->verifyTextPresent('Imported',''); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('Motherboard',''); + $this->verifyTextPresent('Yes',''); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextPresent('Speaker',''); + $this->verifyTextPresent('No',''); + $this->verifyTextPresent('Computer Parts Inventory',''); + + // verify specific table tags + $this->verifyElementPresent("//td[@colspan='5']"); + $this->verifyElementPresent("//table[@cellpadding='2']"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php index 59cff7a0..b592a135 100644 --- a/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php @@ -1,37 +1,37 @@ -<?php
-
-class Repeater2TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&notheme=true&lang=en", "");
-
- // verify if all required texts are present
- $this->verifyTextPresent('North','');
- $this->verifyTextPresent('John','');
- $this->verifyTextPresent('Developer','');
- $this->verifyTextPresent('South','');
- $this->verifyTextPresent('Carter','');
- $this->verifyTextPresent('Program Manager','');
-
- // verify specific table tags
- $this->verifyElementPresent("//table[@cellspacing='1']");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']","");
- }
-}
-
+<?php + +class Repeater2TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&notheme=true&lang=en", ""); + + // verify if all required texts are present + $this->verifyTextPresent('North',''); + $this->verifyTextPresent('John',''); + $this->verifyTextPresent('Developer',''); + $this->verifyTextPresent('South',''); + $this->verifyTextPresent('Carter',''); + $this->verifyTextPresent('Program Manager',''); + + // verify specific table tags + $this->verifyElementPresent("//table[@cellspacing='1']"); + $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]",""); + $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']",""); + $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']",""); + $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']",""); + $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']",""); + $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']",""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php index 60d68d33..e1922ffd 100644 --- a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php @@ -1,37 +1,37 @@ -<?php
-
-class Repeater3TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&notheme=true&lang=en", "");
-
- // verify product name is required
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0');
- $this->type("ctl0_body_Repeater_ctl0_ProductName", "");
- $this->click("//input[@type='submit' and @value='Save']", "");
- $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl0');
-
- // verify product price is of proper format
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1');
- $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "abc");
- $this->click("//input[@type='submit' and @value='Save']", "");
- $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl1');
-
- // perform postback
- $this->click("ctl0_body_Repeater_ctl0_ProductImported",'');
- $this->type("ctl0_body_Repeater_ctl0_ProductName", "Mother Board");
- $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "99.01");
- $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "label=Accessories");
- $this->clickAndWait("//input[@type='submit' and @value='Save']", "");
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0');
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1');
-
- // verify postback results
- $this->verifyElementPresent("//td[text()='Mother Board']",'');
- $this->verifyElementNotPresent("//td[text()='Input Devices']",'');
- $this->verifyElementPresent("//td[text()='99.01']",'');
- }
-}
-
+<?php + +class Repeater3TestCase extends SeleniumTestCase +{ + function test() + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&notheme=true&lang=en", ""); + + // verify product name is required + $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0'); + $this->type("ctl0_body_Repeater_ctl0_ProductName", ""); + $this->click("//input[@type='submit' and @value='Save']", ""); + $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl0'); + + // verify product price is of proper format + $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1'); + $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "abc"); + $this->click("//input[@type='submit' and @value='Save']", ""); + $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl1'); + + // perform postback + $this->click("ctl0_body_Repeater_ctl0_ProductImported",''); + $this->type("ctl0_body_Repeater_ctl0_ProductName", "Mother Board"); + $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "99.01"); + $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "label=Accessories"); + $this->clickAndWait("//input[@type='submit' and @value='Save']", ""); + $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0'); + $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1'); + + // verify postback results + $this->verifyElementPresent("//td[text()='Mother Board']",''); + $this->verifyElementNotPresent("//td[text()='Input Devices']",''); + $this->verifyElementPresent("//td[text()='99.01']",''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php index 783b0b6c..b8f322d7 100644 --- a/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php @@ -1,15 +1,15 @@ -<?php
-
-class StatementsTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- $this->verifyTextPresent('UniqueID is \'ctl0$body$ctl0\'');
- }
-}
-
+<?php + +class StatementsTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + $this->verifyTextPresent('UniqueID is \'ctl0$body$ctl0\''); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php index b60a8047..66417eda 100644 --- a/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php @@ -1,49 +1,49 @@ -<?php
-
-class TabPanelTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTabPanel.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // verify initial visibility
- $this->verifyNotVisible('ctl0_body_View1'); // view 1
- $this->verifyVisible('ctl0_body_View2'); // view 2
- $this->verifyNotVisible('ctl0_body_ctl2'); // view 3
-
- // switching to the first view
- $this->click('ctl0_body_View1_0');
- $this->pause(500);
- $this->verifyVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyNotVisible('ctl0_body_ctl2'); // view 3
- $this->verifyNotVisible('ctl0_body_View11'); // view 11
- $this->verifyVisible('ctl0_body_View21'); // view 21
-
- // switching to View11
- $this->click('ctl0_body_View11_0');
- $this->pause(500);
- $this->verifyVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyNotVisible('ctl0_body_ctl2'); // view 3
- $this->verifyVisible('ctl0_body_View11'); // view 11
- $this->verifyNotVisible('ctl0_body_View21'); // view 21
-
- // switching to the third view
- $this->click('ctl0_body_ctl2_0');
- $this->pause(500);
- $this->verifyNotVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyVisible('ctl0_body_ctl2'); // view 3
-
- // submit: check if the visibility is kept
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyVisible('ctl0_body_ctl2'); // view 3
- }
-}
-
+<?php + +class TabPanelTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTabPanel.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // verify initial visibility + $this->verifyNotVisible('ctl0_body_View1'); // view 1 + $this->verifyVisible('ctl0_body_View2'); // view 2 + $this->verifyNotVisible('ctl0_body_ctl2'); // view 3 + + // switching to the first view + $this->click('ctl0_body_View1_0'); + $this->pause(500); + $this->verifyVisible('ctl0_body_View1'); // view 1 + $this->verifyNotVisible('ctl0_body_View2'); // view 2 + $this->verifyNotVisible('ctl0_body_ctl2'); // view 3 + $this->verifyNotVisible('ctl0_body_View11'); // view 11 + $this->verifyVisible('ctl0_body_View21'); // view 21 + + // switching to View11 + $this->click('ctl0_body_View11_0'); + $this->pause(500); + $this->verifyVisible('ctl0_body_View1'); // view 1 + $this->verifyNotVisible('ctl0_body_View2'); // view 2 + $this->verifyNotVisible('ctl0_body_ctl2'); // view 3 + $this->verifyVisible('ctl0_body_View11'); // view 11 + $this->verifyNotVisible('ctl0_body_View21'); // view 21 + + // switching to the third view + $this->click('ctl0_body_ctl2_0'); + $this->pause(500); + $this->verifyNotVisible('ctl0_body_View1'); // view 1 + $this->verifyNotVisible('ctl0_body_View2'); // view 2 + $this->verifyVisible('ctl0_body_ctl2'); // view 3 + + // submit: check if the visibility is kept + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyNotVisible('ctl0_body_View1'); // view 1 + $this->verifyNotVisible('ctl0_body_View2'); // view 2 + $this->verifyVisible('ctl0_body_ctl2'); // view 3 + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/TableTestCase.php b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php index 2dbc695c..7ea6fc39 100644 --- a/tests/FunctionalTests/quickstart/Controls/TableTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php @@ -1,20 +1,20 @@ -<?php
-
-class TableTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTable.Home&notheme=true&lang=en", "");
-
- $this->verifyElementPresent("//table[@rules='all' and @border='1']");
- $this->verifyElementPresent("//table/caption[@align='bottom' and text()='This is table caption']");
- $this->verifyElementPresent("//th[text()='header cell 2']");
- $this->verifyElementPresent("//tr[@align='right']/td[text()='text']");
- $this->verifyElementPresent("//td[@align='center' and contains(text(),'cell 5')]");
-
- $this->verifyElementPresent("//th[text()='Header 1']");
- $this->verifyElementPresent("//td[text()='Cell 1']");
- }
-}
-
+<?php + +class TableTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTable.Home&notheme=true&lang=en", ""); + + $this->verifyElementPresent("//table[@rules='all' and @border='1']"); + $this->verifyElementPresent("//table/caption[@align='bottom' and text()='This is table caption']"); + $this->verifyElementPresent("//th[text()='header cell 2']"); + $this->verifyElementPresent("//tr[@align='right']/td[text()='text']"); + $this->verifyElementPresent("//td[@align='center' and contains(text(),'cell 5')]"); + + $this->verifyElementPresent("//th[text()='Header 1']"); + $this->verifyElementPresent("//td[text()='Cell 1']"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php index c20bf871..7bf46351 100644 --- a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php @@ -1,93 +1,93 @@ -<?php
-
-class TextBoxTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // a normal textbox
- $this->type("ctl0\$body\$ctl0", "test");
-
- // textbox with maxlength set
- $this->verifyAttribute("ctl0\$body\$ctl1@size","4");
- $this->verifyAttribute("ctl0\$body\$ctl1@maxlength","6");
- $this->type("ctl0\$body\$ctl1", "textte");
-
- // vCard textboxes
- $this->verifyAttribute("ctl0\$body\$ctl2@vcard_name","vCard.FirstName");
- $this->type("ctl0\$body\$ctl2", "first");
- $this->verifyAttribute("ctl0\$body\$ctl3@vcard_name","vCard.LastName");
- $this->type("ctl0\$body\$ctl3", "last");
-
- // a disabled textbox
- $this->verifyAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled");
-
- // a read-only textbox
- $this->verifyAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly");
-
- // auto postback textbox, CausesValidation=false
- $this->verifyValue("ctl0\$body\$ctl6", "change me");
- $this->typeAndWait("ctl0\$body\$ctl6", "change mes");
- $this->verifyValue("ctl0\$body\$ctl6", "text changed");
-
- // auto postback textbox, CausesValidation=true
- $this->verifyNotVisible('ctl0_body_ctl7');
- $this->type("ctl0\$body\$TextBox3", "test");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl7');
- $this->typeAndWait("ctl0\$body\$TextBox3", "non test");
- $this->verifyNotVisible('ctl0_body_ctl7');
-
- // submitting textbox with a button
- $this->type("ctl0\$body\$TextBox1", "texttext");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyValue("ctl0\$body\$TextBox1", "You just entered 'texttext'.");
-
- // SafeText
- $this->verifyText("ctl0_body_Output","test");
- $this->typeAndWait("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>");
- $this->verifyText("ctl0_body_Output","malicious code");
-
- // password
- $this->verifyAttribute("ctl0\$body\$ctl9@type","password");
-
- // ------------------multiline textbox----------------------
-
- // regular textbox
- $this->type("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox.");
- $this->type("ctl0\$body\$ctl11", "This is a multiline text box.
-In HTML, it is displayed as a textarea.
-End of message
-");
-
- // a disabled multiline textbox
- $this->verifyAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled");
-
- // a read-only multiline textbox
- $this->verifyAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly");
- $this->verifyAttribute("ctl0\$body\$ctl13@wrap","off");
-
- // auto postback textbox
- $this->verifyValue("ctl0\$body\$ctl14", "change me");
- $this->typeAndWait("ctl0\$body\$ctl14", "change mes");
- $this->verifyValue("ctl0\$body\$ctl14", "text changed");
- $this->verifyValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox.");
- $this->verifyValue("ctl0\$body\$ctl11", "This is a multiline text box.
-In HTML, it is displayed as a textarea.
-End of message
-");
-
- // textbox associated with a validator
- $this->verifyNotVisible('ctl0_body_ctl15');
- $this->type("ctl0\$body\$MultiTextBox3", "demo");
-// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl15');
- $this->typeAndWait("ctl0\$body\$MultiTextBox3", "non demo");
- $this->verifyNotVisible('ctl0_body_ctl15');
- }
-}
-
+<?php + +class TextBoxTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // a normal textbox + $this->type("ctl0\$body\$ctl0", "test"); + + // textbox with maxlength set + $this->verifyAttribute("ctl0\$body\$ctl1@size","4"); + $this->verifyAttribute("ctl0\$body\$ctl1@maxlength","6"); + $this->type("ctl0\$body\$ctl1", "textte"); + + // vCard textboxes + $this->verifyAttribute("ctl0\$body\$ctl2@vcard_name","vCard.FirstName"); + $this->type("ctl0\$body\$ctl2", "first"); + $this->verifyAttribute("ctl0\$body\$ctl3@vcard_name","vCard.LastName"); + $this->type("ctl0\$body\$ctl3", "last"); + + // a disabled textbox + $this->verifyAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled"); + + // a read-only textbox + $this->verifyAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly"); + + // auto postback textbox, CausesValidation=false + $this->verifyValue("ctl0\$body\$ctl6", "change me"); + $this->typeAndWait("ctl0\$body\$ctl6", "change mes"); + $this->verifyValue("ctl0\$body\$ctl6", "text changed"); + + // auto postback textbox, CausesValidation=true + $this->verifyNotVisible('ctl0_body_ctl7'); + $this->type("ctl0\$body\$TextBox3", "test"); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl7'); + $this->typeAndWait("ctl0\$body\$TextBox3", "non test"); + $this->verifyNotVisible('ctl0_body_ctl7'); + + // submitting textbox with a button + $this->type("ctl0\$body\$TextBox1", "texttext"); + $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->verifyValue("ctl0\$body\$TextBox1", "You just entered 'texttext'."); + + // SafeText + $this->verifyText("ctl0_body_Output","test"); + $this->typeAndWait("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>"); + $this->verifyText("ctl0_body_Output","malicious code"); + + // password + $this->verifyAttribute("ctl0\$body\$ctl9@type","password"); + + // ------------------multiline textbox---------------------- + + // regular textbox + $this->type("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox."); + $this->type("ctl0\$body\$ctl11", "This is a multiline text box. +In HTML, it is displayed as a textarea. +End of message +"); + + // a disabled multiline textbox + $this->verifyAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled"); + + // a read-only multiline textbox + $this->verifyAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly"); + $this->verifyAttribute("ctl0\$body\$ctl13@wrap","off"); + + // auto postback textbox + $this->verifyValue("ctl0\$body\$ctl14", "change me"); + $this->typeAndWait("ctl0\$body\$ctl14", "change mes"); + $this->verifyValue("ctl0\$body\$ctl14", "text changed"); + $this->verifyValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox."); + $this->verifyValue("ctl0\$body\$ctl11", "This is a multiline text box. +In HTML, it is displayed as a textarea. +End of message +"); + + // textbox associated with a validator + $this->verifyNotVisible('ctl0_body_ctl15'); + $this->type("ctl0\$body\$MultiTextBox3", "demo"); +// $this->pause(1000); + $this->verifyVisible('ctl0_body_ctl15'); + $this->typeAndWait("ctl0\$body\$MultiTextBox3", "non demo"); + $this->verifyNotVisible('ctl0_body_ctl15'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php index 80e8bbe9..474529a6 100644 --- a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php @@ -1,26 +1,26 @@ -<?php
-
-class Wizard1TestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // step 1
- $this->verifyTextPresent('Wizard Step 1');
- $this->verifyTextNotPresent('Wizard Step 2');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
- $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
- $this->select('ctl0$body$Wizard1$DropDownList1', "label=Purple");
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
-
- // step 2
- $this->verifyTextPresent('Your favorite color is: Purple');
- $this->verifyTextNotPresent('Wizard Step 1');
- $this->verifyTextPresent('Wizard Step 2');
- }
-}
-
+<?php + +class Wizard1TestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // step 1 + $this->verifyTextPresent('Wizard Step 1'); + $this->verifyTextNotPresent('Wizard Step 2'); + $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled'); + $this->select('ctl0$body$Wizard1$DropDownList1', "label=Purple"); + $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1'); + + // step 2 + $this->verifyTextPresent('Your favorite color is: Purple'); + $this->verifyTextNotPresent('Wizard Step 1'); + $this->verifyTextPresent('Wizard Step 2'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php index ba5f66c3..3c49bfd8 100644 --- a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php @@ -1,26 +1,26 @@ -<?php
-
-class Wizard2TestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // step 1
- $this->verifyTextPresent('Please let us know your preference');
- $this->verifyTextNotPresent('Thank you for your answer');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
- $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
- $this->select('ctl0$body$Wizard1$DropDownList1', "label=Blue");
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
-
- // step 2
- $this->verifyTextPresent('Your favorite color is: Blue');
- $this->verifyTextNotPresent('Please let us know your preference');
- $this->verifyTextPresent('Thank you for your answer');
- }
-}
-
+<?php + +class Wizard2TestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // step 1 + $this->verifyTextPresent('Please let us know your preference'); + $this->verifyTextNotPresent('Thank you for your answer'); + $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled'); + $this->select('ctl0$body$Wizard1$DropDownList1', "label=Blue"); + $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1'); + + // step 2 + $this->verifyTextPresent('Your favorite color is: Blue'); + $this->verifyTextNotPresent('Please let us know your preference'); + $this->verifyTextPresent('Thank you for your answer'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php index 1172d31c..04224bb4 100644 --- a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php @@ -1,46 +1,46 @@ -<?php
-
-class Wizard3TestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // step 1
- $this->verifyTextPresent('A Mini Survey');
- $this->verifyTextPresent('PRADO QuickStart Sample');
- $this->click('ctl0_body_Wizard3_StudentCheckBox');
- $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0');
-
- // step 2
- $this->select('ctl0$body$Wizard3$DropDownList11', "label=Chemistry");
- $this->clickAndWait('ctl0$body$Wizard3$ctl5$ctl1');
-
- // step 3
- $this->select('ctl0$body$Wizard3$DropDownList22', "label=Tennis");
- $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1');
-
- // step 4
- $this->verifyTextPresent('You are a college student');
- $this->verifyTextPresent('You are in major: Chemistry');
- $this->verifyTextPresent('Your favorite sport is: Tennis');
-
- // run the example again. this time we skip the page asking about major
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true", "");
-
- // step 1
- $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0');
-
- // step 3
- $this->select('ctl0$body$Wizard3$DropDownList22', "label=Baseball");
- $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1');
-
- // step 4
- $this->verifyTextNotPresent('You are a college student');
- $this->verifyTextPresent('Your favorite sport is: Baseball');
- }
-}
-
+<?php + +class Wizard3TestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // step 1 + $this->verifyTextPresent('A Mini Survey'); + $this->verifyTextPresent('PRADO QuickStart Sample'); + $this->click('ctl0_body_Wizard3_StudentCheckBox'); + $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0'); + + // step 2 + $this->select('ctl0$body$Wizard3$DropDownList11', "label=Chemistry"); + $this->clickAndWait('ctl0$body$Wizard3$ctl5$ctl1'); + + // step 3 + $this->select('ctl0$body$Wizard3$DropDownList22', "label=Tennis"); + $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1'); + + // step 4 + $this->verifyTextPresent('You are a college student'); + $this->verifyTextPresent('You are in major: Chemistry'); + $this->verifyTextPresent('Your favorite sport is: Tennis'); + + // run the example again. this time we skip the page asking about major + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true", ""); + + // step 1 + $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0'); + + // step 3 + $this->select('ctl0$body$Wizard3$DropDownList22', "label=Baseball"); + $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1'); + + // step 4 + $this->verifyTextNotPresent('You are a college student'); + $this->verifyTextPresent('Your favorite sport is: Baseball'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php index d0cc8ac1..b2d757dc 100644 --- a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php @@ -1,44 +1,44 @@ -<?php
-
-class Wizard4TestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // step 1
- $this->verifyTextPresent('Step 1 of 3');
- $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan");
- $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton');
-
- // step 3
- $this->verifyTextPresent('Step 3 of 3');
- $this->verifyTextPresent('Thank you for completing this survey.');
- $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
-
- // step 1
- $this->verifySelected('ctl0_body_Wizard1_DropDownList1', "label=Cyan");
- $this->select('ctl0_body_Wizard1_DropDownList1', "label=Black");
- $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0');
-
- // step 2
- $this->verifyTextPresent('Step 2 of 3');
- $this->verifyTextPresent('Your favorite color is: Black');
- $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl0');
-
- // step 1
- $this->verifyTextPresent('Step 1 of 3');
- $this->verifySelected('ctl0_body_Wizard1_DropDownList1', "label=Black");
- $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0');
-
- // step 2
- $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl1');
-
- // step 3
- $this->verifyTextPresent('Step 3 of 3');
- }
-}
-
+<?php + +class Wizard4TestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // step 1 + $this->verifyTextPresent('Step 1 of 3'); + $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan"); + $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton'); + + // step 3 + $this->verifyTextPresent('Step 3 of 3'); + $this->verifyTextPresent('Thank you for completing this survey.'); + $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + + // step 1 + $this->verifySelected('ctl0_body_Wizard1_DropDownList1', "label=Cyan"); + $this->select('ctl0_body_Wizard1_DropDownList1', "label=Black"); + $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0'); + + // step 2 + $this->verifyTextPresent('Step 2 of 3'); + $this->verifyTextPresent('Your favorite color is: Black'); + $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl0'); + + // step 1 + $this->verifyTextPresent('Step 1 of 3'); + $this->verifySelected('ctl0_body_Wizard1_DropDownList1', "label=Black"); + $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0'); + + // step 2 + $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl1'); + + // step 3 + $this->verifyTextPresent('Step 3 of 3'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php index d892cd3b..631167b9 100644 --- a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php @@ -1,37 +1,37 @@ -<?php
-
-class Wizard5TestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&notheme=true&lang=en", "");
-
- $this->verifyTitle("PRADO QuickStart Sample", "");
-
- // step 1
- $this->verifyTextPresent('Please let us know your preference');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton');
- $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled');
- $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan");
- $this->clickAndWait('ctl0$body$Wizard1$ctl4$ctl0');
-
- // step 2
- $this->select('ctl0_body_Wizard1_Step2_DropDownList2','label=Football');
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl0');
-
- // step 1
- $this->verifySelected('ctl0_body_Wizard1_DropDownList1','label=Cyan');
- $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton');
-
- // step 2
- $this->verifySelected('ctl0_body_Wizard1_Step2_DropDownList2','label=Football');
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
-
- // step 3
- $this->verifyTextPresent('Your favorite color is: Cyan');
- $this->verifyTextPresent('Your favorite sport is: Football');
- }
-}
-
+<?php + +class Wizard5TestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&notheme=true&lang=en", ""); + + $this->verifyTitle("PRADO QuickStart Sample", ""); + + // step 1 + $this->verifyTextPresent('Please let us know your preference'); + $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton'); + $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled'); + $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan"); + $this->clickAndWait('ctl0$body$Wizard1$ctl4$ctl0'); + + // step 2 + $this->select('ctl0_body_Wizard1_Step2_DropDownList2','label=Football'); + $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl0'); + + // step 1 + $this->verifySelected('ctl0_body_Wizard1_DropDownList1','label=Cyan'); + $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton'); + + // step 2 + $this->verifySelected('ctl0_body_Wizard1_Step2_DropDownList2','label=Football'); + $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1'); + + // step 3 + $this->verifyTextPresent('Your favorite color is: Cyan'); + $this->verifyTextPresent('Your favorite sport is: Football'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php index fd685412..8803e352 100644 --- a/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php +++ b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php @@ -1,34 +1,34 @@ -<?php
-
-class HangmanTestCase extends SeleniumTestCase
-{
- function test ()
- {
- $this->open("../../demos/quickstart/index.php?page=Fundamentals.Samples.Hangman.Home&notheme=true&lang=en", "");
- $this->verifyTitle("Hangman Game", "");
- $this->verifyTextPresent("Medium game; you are allowed 5 misses.", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("You must choose a difficulty level", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='3']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("Please make a guess", "");
- $this->verifyTextPresent("maximum of 3", "");
- $this->clickAndWait("link=B", "");
- $this->clickAndWait("link=F", "");
- $this->clickAndWait("link=Give up?", "");
- $this->verifyTextPresent("You Lose", "");
- $this->clickAndWait("link=Start Again", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("Please make a guess", "");
- $this->verifyTextPresent("maximum of 3", "");
- $this->clickAndWait("link=Give up?", "");
- $this->verifyTextPresent("You Lose", "");
- $this->clickAndWait("link=Start Again", "");
- $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='5']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("maximum of 5", "");
- }
-}
-
+<?php + +class HangmanTestCase extends SeleniumTestCase +{ + function test () + { + $this->open("../../demos/quickstart/index.php?page=Fundamentals.Samples.Hangman.Home&notheme=true&lang=en", ""); + $this->verifyTitle("Hangman Game", ""); + $this->verifyTextPresent("Medium game; you are allowed 5 misses.", ""); + $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); + $this->verifyTextPresent("You must choose a difficulty level", ""); + $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); + $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='3']", ""); + $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); + $this->verifyTextPresent("Please make a guess", ""); + $this->verifyTextPresent("maximum of 3", ""); + $this->clickAndWait("link=B", ""); + $this->clickAndWait("link=F", ""); + $this->clickAndWait("link=Give up?", ""); + $this->verifyTextPresent("You Lose", ""); + $this->clickAndWait("link=Start Again", ""); + $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); + $this->verifyTextPresent("Please make a guess", ""); + $this->verifyTextPresent("maximum of 3", ""); + $this->clickAndWait("link=Give up?", ""); + $this->verifyTextPresent("You Lose", ""); + $this->clickAndWait("link=Start Again", ""); + $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='5']", ""); + $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); + $this->verifyTextPresent("maximum of 5", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php b/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php index 81fdfea7..532b17b0 100644 --- a/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php +++ b/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php @@ -1,34 +1,34 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class DActiveDropDownList2 extends TActiveDropDownList
-{
- public function setOpcoes($val)
- {
- $this->setViewState('Opcoes', $val);
- }
-
- public function loadOptions()
- {
- $opcao = $this->getViewState('Opcoes');
-
- switch ($opcao) {
- case "turnos":
- $this->DataTextField="descricao";
- $this->DataValueField="id_turno";
- $opts = array(
- array('id_turno' => 'M', 'descricao' => 'Manhã'),
- array('id_turno' => 'T', 'descricao' => 'Tarde'),
- array('id_turno' => 'N', 'descricao' => 'Noite')
- );
- break;
-
- default:
- throw new TConfigurationException('Falta argumento OPCOES no DActiveDropDownList');
- break;
- }
- $this->setDataSource($opts);
- $this->dataBind();
- }
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class DActiveDropDownList2 extends TActiveDropDownList +{ + public function setOpcoes($val) + { + $this->setViewState('Opcoes', $val); + } + + public function loadOptions() + { + $opcao = $this->getViewState('Opcoes'); + + switch ($opcao) { + case "turnos": + $this->DataTextField="descricao"; + $this->DataValueField="id_turno"; + $opts = array( + array('id_turno' => 'M', 'descricao' => 'Manhã'), + array('id_turno' => 'T', 'descricao' => 'Tarde'), + array('id_turno' => 'N', 'descricao' => 'Noite') + ); + break; + + default: + throw new TConfigurationException('Falta argumento OPCOES no DActiveDropDownList'); + break; + } + $this->setDataSource($opts); + $this->dataBind(); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Issue120.php b/tests/FunctionalTests/tickets/protected/pages/Issue120.php index c04ae93d..ad6431a0 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Issue120.php +++ b/tests/FunctionalTests/tickets/protected/pages/Issue120.php @@ -1,22 +1,22 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Issue120 extends TPage
-{
- public function buttonClickCallback($sender, $param)
- {
-
- $this -> ddl1 -> setDataSource(
- array(
- 'callback value 1' => 'callback item 1',
- 'callback value 2' => 'callback item 2',
- 'callback value 3' => 'callback item 3',
- 'callback value 4' => 'callback item 4'
- )
- );
- $this -> ddl1 -> dataBind();
-
- }
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); + +class Issue120 extends TPage +{ + public function buttonClickCallback($sender, $param) + { + + $this -> ddl1 -> setDataSource( + array( + 'callback value 1' => 'callback item 1', + 'callback value 2' => 'callback item 2', + 'callback value 3' => 'callback item 3', + 'callback value 4' => 'callback item 4' + ) + ); + $this -> ddl1 -> dataBind(); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Issue216.php b/tests/FunctionalTests/tickets/protected/pages/Issue216.php index 15491e2e..41eac5e9 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Issue216.php +++ b/tests/FunctionalTests/tickets/protected/pages/Issue216.php @@ -1,14 +1,14 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Issue216 extends TPage
-{
- public function buttonClickCallback($sender, $param)
- {
-
- $this->result->setText('Tab ActiveIndex is : '.$this->tabpanel->ActiveViewIndex);
-
- }
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); + +class Issue216 extends TPage +{ + public function buttonClickCallback($sender, $param) + { + + $this->result->setText('Tab ActiveIndex is : '.$this->tabpanel->ActiveViewIndex); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Layout.php index 6d455371..da23db77 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Layout.php +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.php @@ -1,23 +1,23 @@ -<?php
-
-class Layout extends TTemplateControl
-{
- public function onLoad($param)
- {
- $num = str_replace(array('Ticket', 'Issue'), '', $this->getPage()->getPagePath());
- $type = str_replace($num, '', $this->getPage()->getPagePath());
-
- $this->getPage()->setTitle("Verifying $type $num");
- $this->ticketlink->setText("Verifying $type $num");
-
- if(strToLower($type) === 'issue') {
- $this->ticketlink->setNavigateUrl("http://code.google.com/p/prado3/issues/detail?id={$num}");
- }
- else {
- $this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/prado/ticket/{$num}");
- }
-
- }
-}
-
+<?php + +class Layout extends TTemplateControl +{ + public function onLoad($param) + { + $num = str_replace(array('Ticket', 'Issue'), '', $this->getPage()->getPagePath()); + $type = str_replace($num, '', $this->getPage()->getPagePath()); + + $this->getPage()->setTitle("Verifying $type $num"); + $this->ticketlink->setText("Verifying $type $num"); + + if(strToLower($type) === 'issue') { + $this->ticketlink->setNavigateUrl("http://code.google.com/p/prado3/issues/detail?id={$num}"); + } + else { + $this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/prado/ticket/{$num}"); + } + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket121.php b/tests/FunctionalTests/tickets/protected/pages/Ticket121.php index 1a625d83..d913805c 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket121.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket121.php @@ -1,11 +1,11 @@ -<?php
-
-class Ticket121 extends TPage
-{
- public function buttonClicked($sender,$param)
- {
- $this->Result->Text="clicked at ({$param->X},{$param->Y})";
- }
-}
-
+<?php + +class Ticket121 extends TPage +{ + public function buttonClicked($sender,$param) + { + $this->Result->Text="clicked at ({$param->X},{$param->Y})"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.php b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php index 61c2a253..1b111bed 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket191.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php @@ -1,22 +1,22 @@ -<?php
-
-class Ticket191 extends TPage
-{
- public function buttonClicked($sender,$param)
- {
- if($this->IsValid)
- $this->Application->clearGlobalState('ticket190');
- }
-
- public function customValidation($sender,$param)
- {
- $param->IsValid=$this->Application->getGlobalState('ticket190')===$this->TextBox->Text;
- }
-
- public function updateGlobal($sender,$param)
- {
- $this->Application->setGlobalState('ticket190',$this->TextBox2->Text);
- }
-}
-
+<?php + +class Ticket191 extends TPage +{ + public function buttonClicked($sender,$param) + { + if($this->IsValid) + $this->Application->clearGlobalState('ticket190'); + } + + public function customValidation($sender,$param) + { + $param->IsValid=$this->Application->getGlobalState('ticket190')===$this->TextBox->Text; + } + + public function updateGlobal($sender,$param) + { + $this->Application->setGlobalState('ticket190',$this->TextBox2->Text); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket21.php b/tests/FunctionalTests/tickets/protected/pages/Ticket21.php index 041ba4b7..6a06a0f4 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket21.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket21.php @@ -1,22 +1,22 @@ -<?php
-
-class Ticket21 extends TPage
-{
- public function onLoad($param)
- {
- parent::onLoad($param);
-
- if(!$this->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);
- }
-}
-
+<?php + +class Ticket21 extends TPage +{ + public function onLoad($param) + { + parent::onLoad($param); + + if(!$this->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/Ticket239.php b/tests/FunctionalTests/tickets/protected/pages/Ticket239.php index a40c94b5..bbf908b1 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket239.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket239.php @@ -1,16 +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. ";
- }
-}
-
+<?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/protected/pages/Ticket278.php b/tests/FunctionalTests/tickets/protected/pages/Ticket278.php index 1aadee77..2e18fd54 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket278.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket278.php @@ -1,23 +1,23 @@ -<?php
-
-class Ticket278 extends TPage
-{
- function validator2_onValidate($sender, $param)
- {
- $sender->Enabled = $this->check1->Checked;
- }
-
- function validate2_onPostValidate($sender, $param)
- {
- $sender->Enabled = true;
- }
-
- function onPreRender($param)
- {
- parent::onPreRender($param);
- $this->panel1->Style =
- $this->check1->Checked ? "display:block" : "display:none";
- }
-}
-
+<?php + +class Ticket278 extends TPage +{ + function validator2_onValidate($sender, $param) + { + $sender->Enabled = $this->check1->Checked; + } + + function validate2_onPostValidate($sender, $param) + { + $sender->Enabled = true; + } + + function onPreRender($param) + { + parent::onPreRender($param); + $this->panel1->Style = + $this->check1->Checked ? "display:block" : "display:none"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket283.php b/tests/FunctionalTests/tickets/protected/pages/Ticket283.php index 8426eae4..302ad2da 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket283.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket283.php @@ -1,11 +1,11 @@ -<?php
-
-class Ticket283 extends TPage
-{
- function button_clicked($sender, $param)
- {
- $this->label1->Text = $sender->Text.' Clicked!';
- }
-}
-
+<?php + +class Ticket283 extends TPage +{ + function button_clicked($sender, $param) + { + $this->label1->Text = $sender->Text.' Clicked!'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket284.php b/tests/FunctionalTests/tickets/protected/pages/Ticket284.php index 332789ff..f9380b12 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket284.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket284.php @@ -1,11 +1,11 @@ -<?php
-
-class Ticket284 extends TPage
-{
- function checkUserAvailability()
- {
-
- }
-}
-
+<?php + +class Ticket284 extends TPage +{ + function checkUserAvailability() + { + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php b/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php index da6ad153..4405ca44 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php @@ -1,103 +1,103 @@ -<?php
-
-class Ticket284Component extends TTemplateControl implements IValidatable
-{
- private $_isValid;
- public function onPreRender($param)
- {
- if (!$this->ShowHours && $this->ShowMinutes)
- {
- throw new TConfigurationException(
- 'Invalid OPSDatePicker Config: You cannot specify ShowMinutes="true" while ShowHours="false"'
- );
- }
- }
-
- public function getDatePicker()
- {
- $this->ensureChildControls();
- return $this->getRegisteredObject('datePicker');
- }
-
- public function getHourPicker()
- {
- $this->ensureChildControls();
- return $this->getRegisteredObject('hourPicker');
- }
-
- public function getMinutePicker()
- {
- $this->ensureChildControls();
- return $this->getRegisteredObject('minutePicker');
- }
-
- public function getShowHours()
- {
- return $this->HourPicker->Visible;
- }
-
- public function setShowHours($value)
- {
- $this->HourPicker->Visible = TPropertyValue::ensureBoolean($value);
- }
-
- public function getShowMinutes()
- {
- return $this->MinutePicker->Visible;
- }
-
- public function setShowMinutes($value)
- {
- $this->MinutePicker->Visible = TPropertyValue::ensureBoolean($value);
- }
-
- public function getTimeStamp()
- {
- return strtotime($this->Date);
- }
-
- public function setTimeStamp($value)
- {
- $ts = TPropertyValue::ensureInteger($value);
- $this->DatePicker->TimeStamp = $ts;
- $this->HourPicker->SelectedValue = date('H', $ts);
- $this->MinutePicker->SelectedValue = date('i', $ts);
- }
-
- public function getDate()
- {
- $dateStr = $this->DatePicker->Date;
- if ($this->ShowHours){
- $dateStr .= ' '.$this->HourPicker->SelectedValue;
- }
- if ($this->ShowMinutes){
- $dateStr .= ':'.$this->MinutePicker->SelectedValue;
- }
- return $dateStr;
- }
-
- public function setDate($value)
- {
- $dateStr = TPropertyValue::ensureString($value);
- $this->TimeStamp = strtotime($dateStr);
- }
-
- public function getValidationPropertyValue()
- {
- if ($this->DatePicker->Date === ''){
- return '';
- }
- else{
- return $this->TimeStamp;
- }
- }
- public function getIsValid()
- {
- return $this->_isValid;
- }
- public function setIsValid($value)
- {
- $this->_isValid=TPropertyValue::ensureBoolean($value);
- }
-}
-?>
+<?php + +class Ticket284Component extends TTemplateControl implements IValidatable +{ + private $_isValid; + public function onPreRender($param) + { + if (!$this->ShowHours && $this->ShowMinutes) + { + throw new TConfigurationException( + 'Invalid OPSDatePicker Config: You cannot specify ShowMinutes="true" while ShowHours="false"' + ); + } + } + + public function getDatePicker() + { + $this->ensureChildControls(); + return $this->getRegisteredObject('datePicker'); + } + + public function getHourPicker() + { + $this->ensureChildControls(); + return $this->getRegisteredObject('hourPicker'); + } + + public function getMinutePicker() + { + $this->ensureChildControls(); + return $this->getRegisteredObject('minutePicker'); + } + + public function getShowHours() + { + return $this->HourPicker->Visible; + } + + public function setShowHours($value) + { + $this->HourPicker->Visible = TPropertyValue::ensureBoolean($value); + } + + public function getShowMinutes() + { + return $this->MinutePicker->Visible; + } + + public function setShowMinutes($value) + { + $this->MinutePicker->Visible = TPropertyValue::ensureBoolean($value); + } + + public function getTimeStamp() + { + return strtotime($this->Date); + } + + public function setTimeStamp($value) + { + $ts = TPropertyValue::ensureInteger($value); + $this->DatePicker->TimeStamp = $ts; + $this->HourPicker->SelectedValue = date('H', $ts); + $this->MinutePicker->SelectedValue = date('i', $ts); + } + + public function getDate() + { + $dateStr = $this->DatePicker->Date; + if ($this->ShowHours){ + $dateStr .= ' '.$this->HourPicker->SelectedValue; + } + if ($this->ShowMinutes){ + $dateStr .= ':'.$this->MinutePicker->SelectedValue; + } + return $dateStr; + } + + public function setDate($value) + { + $dateStr = TPropertyValue::ensureString($value); + $this->TimeStamp = strtotime($dateStr); + } + + public function getValidationPropertyValue() + { + if ($this->DatePicker->Date === ''){ + return ''; + } + else{ + return $this->TimeStamp; + } + } + public function getIsValid() + { + return $this->_isValid; + } + public function setIsValid($value) + { + $this->_isValid=TPropertyValue::ensureBoolean($value); + } +} +?> diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket359.php b/tests/FunctionalTests/tickets/protected/pages/Ticket359.php index 1e544e9b..6b15f699 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket359.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket359.php @@ -1,13 +1,13 @@ <?php -
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket359 extends TPage
-{
- function validate_text1($sender, $param)
- {
- $param->IsValid = $param->Value == 'Prado';
- }
-}
+ +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket359 extends TPage +{ + function validate_text1($sender, $param) + { + $param->IsValid = $param->Value == 'Prado'; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket384.php b/tests/FunctionalTests/tickets/protected/pages/Ticket384.php index e928632d..b485ef2b 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket384.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket384.php @@ -1,46 +1,46 @@ <?php -
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket384 extends TPage
-{
- public function initRecursive($namingContainer=null)
- {
- parent::initRecursive($namingContainer);
- $this->AutoCompleteRepeater->setDataSource(array(1, 2));
- $this->AutoCompleteRepeater->dataBind();
- }
-
- public function submitCallback($sender, $param)
- {
- $this->AutoCompleteRepeater->setDataSource(array(1,2,3,4));
- $this->AutoCompleteRepeater->dataBind();
- $this->AutoCompletePanel->render($this->getResponse()->createHtmlWriter());
- }
-
- public function suggestCountries($sender, $param)
- {
- $sender->setDataSource($this->matchCountries($param->getCallbackParameter()));
- $sender->dataBind();
- }
-
- protected function matchCountries($token)
- {
- $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en');
- $list = array();
- $count = 0;
- $token = strtolower($token);
- foreach($info->getCountries() as $country)
- {
- if(strpos(strtolower($country), $token) === 0)
- {
- $list[] = $country;
- $count++;
- if($count > 10) break;
- }
- }
- return $list;
- }
-}
+ +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket384 extends TPage +{ + public function initRecursive($namingContainer=null) + { + parent::initRecursive($namingContainer); + $this->AutoCompleteRepeater->setDataSource(array(1, 2)); + $this->AutoCompleteRepeater->dataBind(); + } + + public function submitCallback($sender, $param) + { + $this->AutoCompleteRepeater->setDataSource(array(1,2,3,4)); + $this->AutoCompleteRepeater->dataBind(); + $this->AutoCompletePanel->render($this->getResponse()->createHtmlWriter()); + } + + public function suggestCountries($sender, $param) + { + $sender->setDataSource($this->matchCountries($param->getCallbackParameter())); + $sender->dataBind(); + } + + protected function matchCountries($token) + { + $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); + $list = array(); + $count = 0; + $token = strtolower($token); + foreach($info->getCountries() as $country) + { + if(strpos(strtolower($country), $token) === 0) + { + $list[] = $country; + $count++; + if($count > 10) break; + } + } + return $list; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket413.php b/tests/FunctionalTests/tickets/protected/pages/Ticket413.php index 1da32b52..c7a7081a 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket413.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket413.php @@ -1,31 +1,31 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket413 extends TPage
-{
- private $_data = array(
- array('id'=>'ITN001','name'=>'Motherboard','quantity'=>1,'price'=>100.00,'imported'=>true),
- array('id'=>'ITN002','name'=>'CPU','quantity'=>1,'price'=>150.00,'imported'=>true),
- array('id'=>'ITN003','name'=>'Harddrive','quantity'=>2,'price'=>80.00,'imported'=>true),
- array('id'=>'ITN004','name'=>'Sound card','quantity'=>1,'price'=>40.00,'imported'=>false));
- public function onLoad($param)
- {
- parent::onLoad($param);
-
- if (!$this->IsPostBack)
- {
- $this->locations_datagrid->setDataSource($this->_data);
- $this->locations_datagrid->dataBind();
- }
-
- }
-
- public function bla($sender, $param)
- {
- $sender->Text = 'a';
- }
-
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket413 extends TPage +{ + private $_data = array( + array('id'=>'ITN001','name'=>'Motherboard','quantity'=>1,'price'=>100.00,'imported'=>true), + array('id'=>'ITN002','name'=>'CPU','quantity'=>1,'price'=>150.00,'imported'=>true), + array('id'=>'ITN003','name'=>'Harddrive','quantity'=>2,'price'=>80.00,'imported'=>true), + array('id'=>'ITN004','name'=>'Sound card','quantity'=>1,'price'=>40.00,'imported'=>false)); + public function onLoad($param) + { + parent::onLoad($param); + + if (!$this->IsPostBack) + { + $this->locations_datagrid->setDataSource($this->_data); + $this->locations_datagrid->dataBind(); + } + + } + + public function bla($sender, $param) + { + $sender->Text = 'a'; + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket422.php b/tests/FunctionalTests/tickets/protected/pages/Ticket422.php index 9a46ff75..85647ae2 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket422.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket422.php @@ -1,108 +1,108 @@ <?php -
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket422 extends TPage
-{
- private $_listItemsA;
- private $_listItemsB;
-
- public function onInit($param)
- {
- parent::onInit($param);
- $this->_listItemsA[] = array("title" => "Please select", "id" => -1,"category" => -1);
- $this->_listItemsA[] = array("title" => "Item A", "id" => 1,"category" => 1);
- $this->_listItemsA[] = array("title" => "Item B", "id" => 2,"category" => 1);
- $this->_listItemsA[] = array("title" => "Item C", "id" => 3,"category" => 1);
- $this->_listItemsA[] = array("title" => "Item D", "id" => 4,"category" => 1);
- $this->_listItemsA[] = array("title" => "Item E", "id" => 5,"category" => 1);
-
- $this->_listItemsB[] = array("title" => "List 2 Item A", "id" => 1,"category" => 1);
- $this->_listItemsB[] = array("title" => "List 2 Item B", "id" => 2,"category" => 1);
- $this->_listItemsB[] = array("title" => "List 2 Item C", "id" => 3,"category" => 1);
- $this->_listItemsB[] = array("title" => "List 2 Item D", "id" => 4,"category" => 2);
- $this->_listItemsB[] = array("title" => "List 2 Item E", "id" => 5,"category" => 2);
- $this->_listItemsB[] = array("title" => "List 2 Item F", "id" => 6,"category" => 2);
- $this->_listItemsB[] = array("title" => "List 2 Item G", "id" => 7,"category" => 3);
- $this->_listItemsB[] = array("title" => "List 2 Item H", "id" => 8,"category" => 3);
- $this->_listItemsB[] = array("title" => "List 2 Item I", "id" => 9,"category" => 3);
- $this->_listItemsB[] = array("title" => "List 2 Item J", "id" => 10,"category" => 4);
- $this->_listItemsB[] = array("title" => "List 2 Item K", "id" => 11,"category" => 4);
- $this->_listItemsB[] = array("title" => "List 2 Item L", "id" => 12,"category" => 4);
-
- $this->list1->DataValueField ='id';
- $this->list1->DataTextField = 'title';
- }
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- if(!$this->IsPostBack)
- {
- $this->list1->DataSource = $this->_listItemsA;
- $this->list1->dataBind();
- }
- }
-
- function list1_changed($sender)
- {
- if ($sender->getSelectedValue() == -1)
- {
- $this->label1->setText("Please select a category");
- $this->list2->setEnabled(false);
- return;
- }
-
- $this->addOptionsToListProblem($sender->getSelectedValue());
- }
-
- function addOptionsToListProblem($parent)
- {
- $foo = array();
- $bar = 0;
- $sel = array("title" => "Please select", "id" => -1,"category" => -1);
- $foo[] = $sel;
- foreach ($this->_listItemsB as $p)
- {
- if ($p["category"] == $parent)
- {
- $foo[] = $p;
- }
- }
-
- $this->list2->DataValueField = 'id';
- $this->list2->DataTextField = 'title';
- $this->list2->DataSource = $foo;
- $this->list2->dataBind();
- $this->list2->setEnabled(true);
- }
-
- function list2_changed($sender)
- {
- $this->label1->setText("Selection 2: ".$sender->getSelectedValue());
- }
-
- function select_index_3()
- {
- $this->list1->setSelectedIndex(3);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_2()
- {
- $this->list1->setSelectedValue("value 2");
- }
-
- function select_index_3_plus()
- {
- $this->list1->setSelectedValue("value 3");
- $this->list1_changed($this->list1);
- $this->list2->setSelectedValue("value 3 - item 3");
- }
-}
+ +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket422 extends TPage +{ + private $_listItemsA; + private $_listItemsB; + + public function onInit($param) + { + parent::onInit($param); + $this->_listItemsA[] = array("title" => "Please select", "id" => -1,"category" => -1); + $this->_listItemsA[] = array("title" => "Item A", "id" => 1,"category" => 1); + $this->_listItemsA[] = array("title" => "Item B", "id" => 2,"category" => 1); + $this->_listItemsA[] = array("title" => "Item C", "id" => 3,"category" => 1); + $this->_listItemsA[] = array("title" => "Item D", "id" => 4,"category" => 1); + $this->_listItemsA[] = array("title" => "Item E", "id" => 5,"category" => 1); + + $this->_listItemsB[] = array("title" => "List 2 Item A", "id" => 1,"category" => 1); + $this->_listItemsB[] = array("title" => "List 2 Item B", "id" => 2,"category" => 1); + $this->_listItemsB[] = array("title" => "List 2 Item C", "id" => 3,"category" => 1); + $this->_listItemsB[] = array("title" => "List 2 Item D", "id" => 4,"category" => 2); + $this->_listItemsB[] = array("title" => "List 2 Item E", "id" => 5,"category" => 2); + $this->_listItemsB[] = array("title" => "List 2 Item F", "id" => 6,"category" => 2); + $this->_listItemsB[] = array("title" => "List 2 Item G", "id" => 7,"category" => 3); + $this->_listItemsB[] = array("title" => "List 2 Item H", "id" => 8,"category" => 3); + $this->_listItemsB[] = array("title" => "List 2 Item I", "id" => 9,"category" => 3); + $this->_listItemsB[] = array("title" => "List 2 Item J", "id" => 10,"category" => 4); + $this->_listItemsB[] = array("title" => "List 2 Item K", "id" => 11,"category" => 4); + $this->_listItemsB[] = array("title" => "List 2 Item L", "id" => 12,"category" => 4); + + $this->list1->DataValueField ='id'; + $this->list1->DataTextField = 'title'; + } + + public function onLoad($param) + { + parent::onLoad($param); + if(!$this->IsPostBack) + { + $this->list1->DataSource = $this->_listItemsA; + $this->list1->dataBind(); + } + } + + function list1_changed($sender) + { + if ($sender->getSelectedValue() == -1) + { + $this->label1->setText("Please select a category"); + $this->list2->setEnabled(false); + return; + } + + $this->addOptionsToListProblem($sender->getSelectedValue()); + } + + function addOptionsToListProblem($parent) + { + $foo = array(); + $bar = 0; + $sel = array("title" => "Please select", "id" => -1,"category" => -1); + $foo[] = $sel; + foreach ($this->_listItemsB as $p) + { + if ($p["category"] == $parent) + { + $foo[] = $p; + } + } + + $this->list2->DataValueField = 'id'; + $this->list2->DataTextField = 'title'; + $this->list2->DataSource = $foo; + $this->list2->dataBind(); + $this->list2->setEnabled(true); + } + + function list2_changed($sender) + { + $this->label1->setText("Selection 2: ".$sender->getSelectedValue()); + } + + function select_index_3() + { + $this->list1->setSelectedIndex(3); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_2() + { + $this->list1->setSelectedValue("value 2"); + } + + function select_index_3_plus() + { + $this->list1->setSelectedValue("value 3"); + $this->list1_changed($this->list1); + $this->list2->setSelectedValue("value 3 - item 3"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket433.php b/tests/FunctionalTests/tickets/protected/pages/Ticket433.php index 2e5c1ff7..a87f8f82 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket433.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket433.php @@ -1,24 +1,24 @@ <?php -
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket433 extends TPage
-{
- public function onLoad($param)
- {
- if(!$this->IsPostBack)
- $this->VoteClick->Text = "BEFORE click";
- }
-
- public function onUpdateVoteClick($sender, $param)
- {
- $sender->Text = 'AFTER click';
- }
-
- public function onUpdateVoteCallback($sender, $param)
- {
- $sender->Text .= ' CALLBACK DONE';
- }
-}
+ +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket433 extends TPage +{ + public function onLoad($param) + { + if(!$this->IsPostBack) + $this->VoteClick->Text = "BEFORE click"; + } + + public function onUpdateVoteClick($sender, $param) + { + $sender->Text = 'AFTER click'; + } + + public function onUpdateVoteCallback($sender, $param) + { + $sender->Text .= ' CALLBACK DONE'; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket439.php b/tests/FunctionalTests/tickets/protected/pages/Ticket439.php index eaebc250..dcb46412 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket439.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket439.php @@ -1,15 +1,15 @@ <?php -
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket439 extends TPage
-{
-
- function button_clicked($sender, $param)
- {
- $page = $this->Service->constructUrl('Home');
- $this->Response->redirect($page);
- }
-}
+ +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket439 extends TPage +{ + + function button_clicked($sender, $param) + { + $page = $this->Service->constructUrl('Home'); + $this->Response->redirect($page); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket470.php b/tests/FunctionalTests/tickets/protected/pages/Ticket470.php index 45741176..2e023242 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket470.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket470.php @@ -1,24 +1,24 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket470 extends TPage
-{
- /**
- * Increase the reload counter and render the activepanel content
- */
- public function Reload($sender, $param){
- $this->Results->Text = "";
- $this->counter->Text = $this->counter->Text +1;
- $this->activePanelTest->renderControl($param->getNewWriter());
- }
-
- /**
- *function to call when the form is valid (and the linkbutton fired his callback event)
- */
- public function Valid($sender, $param){
- $this->Results->Text = "OK!!!";
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket470 extends TPage +{ + /** + * Increase the reload counter and render the activepanel content + */ + public function Reload($sender, $param){ + $this->Results->Text = ""; + $this->counter->Text = $this->counter->Text +1; + $this->activePanelTest->renderControl($param->getNewWriter()); + } + + /** + *function to call when the form is valid (and the linkbutton fired his callback event) + */ + public function Valid($sender, $param){ + $this->Results->Text = "OK!!!"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket477.php b/tests/FunctionalTests/tickets/protected/pages/Ticket477.php index 49c72b9e..a6309958 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket477.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket477.php @@ -1,16 +1,16 @@ <?php -
-class Ticket477 extends TPage
-{
- function do_validate_1($sender, $param)
- {
- $param->IsValid=false;
- }
-
- function do_validate_2($sender, $param)
- {
- $param->IsValid=false;
- }
-}
+ +class Ticket477 extends TPage +{ + function do_validate_1($sender, $param) + { + $param->IsValid=false; + } + + function do_validate_2($sender, $param) + { + $param->IsValid=false; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket484.php b/tests/FunctionalTests/tickets/protected/pages/Ticket484.php index 813ccc23..89dac261 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket484.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket484.php @@ -1,30 +1,30 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket484 extends TPage
-{
-
- function onLoad($param)
- {
- new TActiveButton;
- for ($i = 0; $i<1500; $i++)
- {
- $ctl = Prado::createComponent("TLabel");
- $ctl->Text = "Label ".$i;
- $this->Controls[] = $ctl;
- }
- }
-
- function button2_onclick($sender, $param)
- {
- $this->label1->Text = "Button 1 was clicked ";
- }
-
- function button2_oncallback($sender, $param)
- {
- $this->label1->Text .= "using callback!";
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket484 extends TPage +{ + + function onLoad($param) + { + new TActiveButton; + for ($i = 0; $i<1500; $i++) + { + $ctl = Prado::createComponent("TLabel"); + $ctl->Text = "Label ".$i; + $this->Controls[] = $ctl; + } + } + + function button2_onclick($sender, $param) + { + $this->label1->Text = "Button 1 was clicked "; + } + + function button2_oncallback($sender, $param) + { + $this->label1->Text .= "using callback!"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket488.php b/tests/FunctionalTests/tickets/protected/pages/Ticket488.php index e9610d1d..97334f21 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket488.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket488.php @@ -1,13 +1,13 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket488 extends TPage
-{
- function login($sender,$param)
- {
- //$param->IsValid = $this->Password == 'Prado';
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket488 extends TPage +{ + function login($sender,$param) + { + //$param->IsValid = $this->Password == 'Prado'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket500.php b/tests/FunctionalTests/tickets/protected/pages/Ticket500.php index fc7af222..a0b96ed5 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket500.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket500.php @@ -1,13 +1,13 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket500 extends TPage
-{
- function set_url()
- {
- $url=$this->Service->constructUrl('Cats.Buy.Browse',array('filter' => 'basket'));
- $this->link1->NavigateUrl = $url;
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket500 extends TPage +{ + function set_url() + { + $url=$this->Service->constructUrl('Cats.Buy.Browse',array('filter' => 'basket')); + $this->link1->NavigateUrl = $url; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket504.php b/tests/FunctionalTests/tickets/protected/pages/Ticket504.php index 7ad8e989..3d1bdfb6 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket504.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket504.php @@ -1,25 +1,25 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket504 extends TPage
-{
- private $panels = array('panelA', 'panelB', 'panelC','panelD',);
- private function showPanel($id, $param) {
- foreach($this->panels as $panel) {
- if($id == $panel) {
- $this->$panel->setVisible(true);
- } else {
- $this->$panel->setVisible(false);
- }
- }
- }
- public function changePanel($sender,$param){
- $this->showPanel($param->CallbackParameter, $param);
- }
- public function loadData_Callback($sender, $param){
- die("parameter is ".$param->CallbackParameter);
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket504 extends TPage +{ + private $panels = array('panelA', 'panelB', 'panelC','panelD',); + private function showPanel($id, $param) { + foreach($this->panels as $panel) { + if($id == $panel) { + $this->$panel->setVisible(true); + } else { + $this->$panel->setVisible(false); + } + } + } + public function changePanel($sender,$param){ + $this->showPanel($param->CallbackParameter, $param); + } + public function loadData_Callback($sender, $param){ + die("parameter is ".$param->CallbackParameter); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket507.php b/tests/FunctionalTests/tickets/protected/pages/Ticket507.php index 94cd8aed..ea358e65 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket507.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket507.php @@ -1,25 +1,25 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket507 extends TPage
-{
-
- public function onLoad($s)
- {
- //the following fixed the static declaration on the above
- $this->list1->SelectionMode="Multiple";
- }
-
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function enable_list()
- {
- $this->list1->enabled = true;
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket507 extends TPage +{ + + public function onLoad($s) + { + //the following fixed the static declaration on the above + $this->list1->SelectionMode="Multiple"; + } + + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function enable_list() + { + $this->list1->enabled = true; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket521.php b/tests/FunctionalTests/tickets/protected/pages/Ticket521.php index d28a777a..e7e65b86 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket521.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket521.php @@ -1,16 +1,16 @@ -<?php
-
-class Ticket521 extends TPage
-{
-
- public function doOnClick($s, $p){
- $this->label1->Text = "Button 1 was clicked ";
- }
- public function doSave($s, $p){
- $this->label1->Text .= " on callback ";
-
- }
-
-
-}
+<?php + +class Ticket521 extends TPage +{ + + public function doOnClick($s, $p){ + $this->label1->Text = "Button 1 was clicked "; + } + public function doSave($s, $p){ + $this->label1->Text .= " on callback "; + + } + + +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket526.php b/tests/FunctionalTests/tickets/protected/pages/Ticket526.php index 9afaf28f..1500ad73 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket526.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket526.php @@ -1,15 +1,15 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket526 extends TPage
-{
- public function callback($s, $p)
- {
- $this->dp->Mode="Button";
- $this->textbox->Text = 'callback';
- $this->activePanel->Enabled="false";
- $this->activePanel->render($p->NewWriter);
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket526 extends TPage +{ + public function callback($s, $p) + { + $this->dp->Mode="Button"; + $this->textbox->Text = 'callback'; + $this->activePanel->Enabled="false"; + $this->activePanel->render($p->NewWriter); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket528.php b/tests/FunctionalTests/tickets/protected/pages/Ticket528.php index c2d1fcbe..2e05dbfd 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket528.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket528.php @@ -1,35 +1,35 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket528 extends TPage
-{
- public static $turnos = array(
- 'M' => array('id_turno' => 'M', 'descricao' => 'Manhã'),
- 'T' => array('id_turno' => 'T', 'descricao' => 'Tarde'),
- 'N' => array('id_turno' => 'N', 'descricao' => 'Noite')
- );
-
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- if (!$this->IsPostBack) {
- $this->DDropTurno->loadOptions();
- $this->loadDadosTurno($this->DDropTurno->getSelectedValue());
- }
- }
-
-
- protected function loadDadosTurno($id)
- {
- $this->Codigo->setText(self::$turnos[$id]['id_turno']);
- $this->Descricao->setText(self::$turnos[$id]['descricao']);
- }
-
-
- public function trocaTurno($sender,$param)
- {
- $this->loadDadosTurno($sender->getSelectedValue());
- }
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket528 extends TPage +{ + public static $turnos = array( + 'M' => array('id_turno' => 'M', 'descricao' => 'Manhã'), + 'T' => array('id_turno' => 'T', 'descricao' => 'Tarde'), + 'N' => array('id_turno' => 'N', 'descricao' => 'Noite') + ); + + + public function onLoad($param) + { + parent::onLoad($param); + if (!$this->IsPostBack) { + $this->DDropTurno->loadOptions(); + $this->loadDadosTurno($this->DDropTurno->getSelectedValue()); + } + } + + + protected function loadDadosTurno($id) + { + $this->Codigo->setText(self::$turnos[$id]['id_turno']); + $this->Descricao->setText(self::$turnos[$id]['descricao']); + } + + + public function trocaTurno($sender,$param) + { + $this->loadDadosTurno($sender->getSelectedValue()); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket535.php b/tests/FunctionalTests/tickets/protected/pages/Ticket535.php index 4f9b2f51..705a5474 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket535.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket535.php @@ -1,16 +1,16 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket535 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()."} ";
- }
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket535 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()."} "; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket538.php b/tests/FunctionalTests/tickets/protected/pages/Ticket538.php index 2ad9fd43..2ba0d841 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket538.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket538.php @@ -1,102 +1,102 @@ -<?php
-// $Id: Home.php 1405 2006-09-10 01:03:56Z wei $
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket538 extends TPage
-{
- public function checkboxClicked($sender,$param)
- {
- $sender->Text= $sender->ClientID . " clicked";
- }
-
- public function checkboxCallback($sender, $param)
- {
- $sender->Text .= ' using callback';
- }
-
- public function readData()
- {
- $data=array(
- array('id'=>'001','name'=>'John','age'=>31),
- array('id'=>'002','name'=>'Mary','age'=>30),
- array('id'=>'003','name'=>'Cary','age'=>20),
- array('id'=>'004','name'=>'Kevin','age'=>65),
- array('id'=>'005','name'=>'Steven','age'=>10),
- array('id'=>'006','name'=>'Josh','age'=>23),
- array('id'=>'007','name'=>'Lary','age'=>54));
- return $data;
- }
-
- //--------------------------------------------------------------------
- // TListBox
- //--------------------------------------------------------------------
-
- public function dataSelector2_Clicked($sender, $param)
- {
- $this->DataViewer2->DataTextField='name';
- $this->DataViewer2->Items->clear();
- foreach ($this->readData() as $index=>$person)
- {
- $item = new TListItem('G1: '.$person['name'].'=>'.$person['age'],$index);
- $item->Attributes->Group = 'test1';
- $this->DataViewer2->Items->add($item);
- }
- foreach ($this->readData() as $index=>$person)
- {
- $item2 = new TListItem('G2: '.$person['name'].'=>'.$person['age'],$index+100);
- $item2->Attributes->Group = 'test2';
- $this->DataViewer2->Items->add($item2);
- }
- $this->DataViewer2->dataBind();
- }
-
- public function selectBtn2_Clicked()
- {
- $text = '';
- foreach ($this->DataViewer2->SelectedIndices as $index)
- {
- $text .= '"'.$this->DataViewer2->Items[$index]->Attributes->Group.'", ';
- }
- $this->ALLog->setText($text);
- }
-
- //--------------------------------------------------------------------
- // TActiveListBox
- //--------------------------------------------------------------------
-
-
- public function dataSelector_Clicked($sender, $param)
- {
- $this->DataViewer->DataTextField='name';
- $this->DataViewer->Items->clear();
- foreach ($this->readData() as $index=>$person)
- {
- $item = new TListItem('G1: '.$person['name'].'=>'.$person['age'],$index);
- $item->Attributes->Group = 'test1';
- $this->DataViewer->Items->add($item);
- }
-
- foreach ($this->readData() as $index=>$person)
- {
- $item2 = new TListItem('G2: '.$person['name'].'=>'.$person['age'],$index+100);
- $item2->Attributes->Group = 'test2';
- $this->DataViewer->Items->add($item2);
- }
- $this->DataViewer->dataBind();
- }
-
- public function selectBtn_Clicked()
- {
- $text = '';
- foreach ($this->DataViewer->SelectedIndices as $index)
- {
- if($this->DataViewer->Items[$index]->Attributes['Group'])
- $text .= $index .'- "'.$this->DataViewer->Items[$index]->Attributes->Group.'", ';
- else
- $text .= $index.',';
- }
- $this->ALLog->setText($text);
- }
-
-}
-
+<?php +// $Id: Home.php 1405 2006-09-10 01:03:56Z wei $ +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket538 extends TPage +{ + public function checkboxClicked($sender,$param) + { + $sender->Text= $sender->ClientID . " clicked"; + } + + public function checkboxCallback($sender, $param) + { + $sender->Text .= ' using callback'; + } + + public function readData() + { + $data=array( + array('id'=>'001','name'=>'John','age'=>31), + array('id'=>'002','name'=>'Mary','age'=>30), + array('id'=>'003','name'=>'Cary','age'=>20), + array('id'=>'004','name'=>'Kevin','age'=>65), + array('id'=>'005','name'=>'Steven','age'=>10), + array('id'=>'006','name'=>'Josh','age'=>23), + array('id'=>'007','name'=>'Lary','age'=>54)); + return $data; + } + + //-------------------------------------------------------------------- + // TListBox + //-------------------------------------------------------------------- + + public function dataSelector2_Clicked($sender, $param) + { + $this->DataViewer2->DataTextField='name'; + $this->DataViewer2->Items->clear(); + foreach ($this->readData() as $index=>$person) + { + $item = new TListItem('G1: '.$person['name'].'=>'.$person['age'],$index); + $item->Attributes->Group = 'test1'; + $this->DataViewer2->Items->add($item); + } + foreach ($this->readData() as $index=>$person) + { + $item2 = new TListItem('G2: '.$person['name'].'=>'.$person['age'],$index+100); + $item2->Attributes->Group = 'test2'; + $this->DataViewer2->Items->add($item2); + } + $this->DataViewer2->dataBind(); + } + + public function selectBtn2_Clicked() + { + $text = ''; + foreach ($this->DataViewer2->SelectedIndices as $index) + { + $text .= '"'.$this->DataViewer2->Items[$index]->Attributes->Group.'", '; + } + $this->ALLog->setText($text); + } + + //-------------------------------------------------------------------- + // TActiveListBox + //-------------------------------------------------------------------- + + + public function dataSelector_Clicked($sender, $param) + { + $this->DataViewer->DataTextField='name'; + $this->DataViewer->Items->clear(); + foreach ($this->readData() as $index=>$person) + { + $item = new TListItem('G1: '.$person['name'].'=>'.$person['age'],$index); + $item->Attributes->Group = 'test1'; + $this->DataViewer->Items->add($item); + } + + foreach ($this->readData() as $index=>$person) + { + $item2 = new TListItem('G2: '.$person['name'].'=>'.$person['age'],$index+100); + $item2->Attributes->Group = 'test2'; + $this->DataViewer->Items->add($item2); + } + $this->DataViewer->dataBind(); + } + + public function selectBtn_Clicked() + { + $text = ''; + foreach ($this->DataViewer->SelectedIndices as $index) + { + if($this->DataViewer->Items[$index]->Attributes['Group']) + $text .= $index .'- "'.$this->DataViewer->Items[$index]->Attributes->Group.'", '; + else + $text .= $index.','; + } + $this->ALLog->setText($text); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket542.php b/tests/FunctionalTests/tickets/protected/pages/Ticket542.php index bcd32a04..59169d64 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket542.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket542.php @@ -1,23 +1,23 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket542 extends TPage {
-
- public function slideUp($sender, $param) {
- $this->CallbackClient->slideUp($this->TheBox);
- }
-
- public function blindUp($sender, $param) {
- $this->CallbackClient->blindUp($this->TheBox);
- }
-
- public function slideDown($sender, $param) {
- $this->CallbackClient->slideDown($this->TheBox);
- }
-
- public function blindDown($sender, $param) {
- $this->CallbackClient->blindDown($this->TheBox);
- }
-
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket542 extends TPage { + + public function slideUp($sender, $param) { + $this->CallbackClient->slideUp($this->TheBox); + } + + public function blindUp($sender, $param) { + $this->CallbackClient->blindUp($this->TheBox); + } + + public function slideDown($sender, $param) { + $this->CallbackClient->slideDown($this->TheBox); + } + + public function blindDown($sender, $param) { + $this->CallbackClient->blindDown($this->TheBox); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php b/tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php index 817e7c45..917f45cf 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php @@ -1,7 +1,7 @@ -<?php
-
-class Ticket54Master extends TTemplateControl
-{
-}
-
+<?php + +class Ticket54Master extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket578.php b/tests/FunctionalTests/tickets/protected/pages/Ticket578.php index 7d7dbaac..7b7463a2 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket578.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket578.php @@ -1,13 +1,13 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket578 extends TPage
-{
-
- function button2_onclick($sender, $param)
- {
- $this->label1->Text = "Button 1 was clicked : " . htmlspecialchars($this->text1->Text);
- }
-
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket578 extends TPage +{ + + function button2_onclick($sender, $param) + { + $this->label1->Text = "Button 1 was clicked : " . htmlspecialchars($this->text1->Text); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket585.php b/tests/FunctionalTests/tickets/protected/pages/Ticket585.php index 5932146d..1cda7900 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket585.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket585.php @@ -1,18 +1,18 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket585 extends TPage
-{
-
- public function ChkDate ($sender, $param)
- {
- if ($param->Value == "15-03-2007")
- {
- $param->IsValid=false;
- }
- else
- $param->IsValid=true;
- }
-
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket585 extends TPage +{ + + public function ChkDate ($sender, $param) + { + if ($param->Value == "15-03-2007") + { + $param->IsValid=false; + } + else + $param->IsValid=true; + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket586.php b/tests/FunctionalTests/tickets/protected/pages/Ticket586.php index d6fafd0d..574d6f72 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket586.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket586.php @@ -1,11 +1,11 @@ -<?php
-
-class Ticket586 extends TPage
-{
- function button_clicked($sender, $param)
- {
- $this->label1->Text = $sender->Text . ' Clicked!';
- }
-}
-
+<?php + +class Ticket586 extends TPage +{ + function button_clicked($sender, $param) + { + $this->label1->Text = $sender->Text . ' Clicked!'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket587.php b/tests/FunctionalTests/tickets/protected/pages/Ticket587.php index a84a876c..21ce7a64 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket587.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket587.php @@ -1,12 +1,12 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket587 extends TPage
-{
- public function onTriggerCallback( $sender, $param )
- {
- $count = (int) $this->count->getText();
- $this->count->setText( ++$count );
- }
-}
-
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket587 extends TPage +{ + public function onTriggerCallback( $sender, $param ) + { + $count = (int) $this->count->getText(); + $this->count->setText( ++$count ); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php b/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php index 7d24e5f6..fea88274 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket587_reopened.php @@ -1,62 +1,62 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket587_reopened extends TPage
-{
- function list1_changed($sender)
- {
- $this->label1->setText("Selection 1: ".$sender->getSelectedValue());
- $this->addOptionsToList2($sender->getSelectedValue(),$sender->getSelectedIndex());
- }
-
- function suggest($sender, $param)
- {
- $this->list2->Items->clear();
- for($i = 0; $i < 2; $i++)
- $this->list2->Items[$i] = 'asd 3 - item '.($i+1);
- }
-
- function addOptionsToList2($parent,$index)
- {
- $this->list2->Items->clear();
- for($i = 0; $i < 2+$index; $i++)
- $this->list2->Items[$i] = $parent.' - item '.($i+1);
- $this->list2->setEnabled(true);
- }
-
- function list2_changed($sender)
- {
- $this->label1->setText("Selection 2: ".$sender->getSelectedValue());
- }
-
- function select_index_3()
- {
- $this->list1->setSelectedIndex(3);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_2()
- {
- $this->list1->setSelectedValue("value 2");
- }
-
- function select_index_3_plus()
- {
- $this->list1->setSelectedValue("value 3");
- $this->list1_changed($this->list1);
- $this->list2->setSelectedValue("value 3 - item 3");
- }
-
- function do_postback()
- {
- $value = 'List 1: '.$this->list1->selectedValue. ', List 2: '. $this->list2->selectedValue;
- $this->label1->Text = $value;
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket587_reopened extends TPage +{ + function list1_changed($sender) + { + $this->label1->setText("Selection 1: ".$sender->getSelectedValue()); + $this->addOptionsToList2($sender->getSelectedValue(),$sender->getSelectedIndex()); + } + + function suggest($sender, $param) + { + $this->list2->Items->clear(); + for($i = 0; $i < 2; $i++) + $this->list2->Items[$i] = 'asd 3 - item '.($i+1); + } + + function addOptionsToList2($parent,$index) + { + $this->list2->Items->clear(); + for($i = 0; $i < 2+$index; $i++) + $this->list2->Items[$i] = $parent.' - item '.($i+1); + $this->list2->setEnabled(true); + } + + function list2_changed($sender) + { + $this->label1->setText("Selection 2: ".$sender->getSelectedValue()); + } + + function select_index_3() + { + $this->list1->setSelectedIndex(3); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_2() + { + $this->list1->setSelectedValue("value 2"); + } + + function select_index_3_plus() + { + $this->list1->setSelectedValue("value 3"); + $this->list1_changed($this->list1); + $this->list2->setSelectedValue("value 3 - item 3"); + } + + function do_postback() + { + $value = 'List 1: '.$this->list1->selectedValue. ', List 2: '. $this->list2->selectedValue; + $this->label1->Text = $value; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket591.php b/tests/FunctionalTests/tickets/protected/pages/Ticket591.php index 9e49e835..8616ac02 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket591.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket591.php @@ -1,9 +1,9 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket591 extends TPage
-{
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket591 extends TPage +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket598.php b/tests/FunctionalTests/tickets/protected/pages/Ticket598.php index 0456725f..a8c4c397 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket598.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket598.php @@ -1,19 +1,19 @@ -<?php
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket598 extends TPage
-{
-public function onLoad ($param) {
- parent::onLoad($param);
- if (!$this->isPostBack and !$this->isCallBack) {
- $this->Lbl->setText(date("h:m:s"));
- }
- }
- public function startBigTask ($sender, $param) {
- sleep(10); // Simulate task
- }
-
- public function updateLbl($sender, $param) {
- $this->Lbl->SetText(date("h:m:s"));
- }
-}
+<?php +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket598 extends TPage +{ +public function onLoad ($param) { + parent::onLoad($param); + if (!$this->isPostBack and !$this->isCallBack) { + $this->Lbl->setText(date("h:m:s")); + } + } + public function startBigTask ($sender, $param) { + sleep(10); // Simulate task + } + + public function updateLbl($sender, $param) { + $this->Lbl->SetText(date("h:m:s")); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket603.php b/tests/FunctionalTests/tickets/protected/pages/Ticket603.php index 6af0cf6d..138ffbd4 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket603.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket603.php @@ -1,30 +1,30 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Ticket603 extends TPage
-{
- protected $_isHtml;
-
- public function onLoad($param) {
- parent::onLoad($param);
- $this->_isHtml = true;
- }
-
- public function switchContentTypeClicked( $sender, $param ) {
- $this->_isHtml = !$this->_isHtml;
- if ( $this->_isHtml ) {
- $this->EditHtmlTextBox->EnableVisualEdit = true;
- $this->EditHtmlTextBox->Text = '<b>somehtml</b>';
- } else {
- $this->EditHtmlTextBox->EnableVisualEdit = false;
- $this->EditHtmlTextBox->Text = 'plai bla bla';
- }
- }
-
- public function switchContentTypeCallback( $sender, $param ) {
- $this->ContentPanel->render( $param->NewWriter );
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket603 extends TPage +{ + protected $_isHtml; + + public function onLoad($param) { + parent::onLoad($param); + $this->_isHtml = true; + } + + public function switchContentTypeClicked( $sender, $param ) { + $this->_isHtml = !$this->_isHtml; + if ( $this->_isHtml ) { + $this->EditHtmlTextBox->EnableVisualEdit = true; + $this->EditHtmlTextBox->Text = '<b>somehtml</b>'; + } else { + $this->EditHtmlTextBox->EnableVisualEdit = false; + $this->EditHtmlTextBox->Text = 'plai bla bla'; + } + } + + public function switchContentTypeCallback( $sender, $param ) { + $this->ContentPanel->render( $param->NewWriter ); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket660.php b/tests/FunctionalTests/tickets/protected/pages/Ticket660.php index 2785a816..457e3ed8 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket660.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket660.php @@ -12,15 +12,15 @@ class Ticket660 extends TPage { $this->A->setText($this->T->getText() . $iso_text); } - public function suggest($sender, $param)
- {
+ public function suggest($sender, $param) + { $token=$param->getCallbackParameter(); $sender->setDataSource(array( 1 => 'ABC Token:'.$token, 2 => iconv('UTF-8', 'ISO-8859-1//IGNORE', 'ÄÖÜ').' Token:'.$token )); - $sender->dataBind();
- }
-
+ $sender->dataBind(); + } + } ?> diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php index 1b5b638a..eb446077 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php @@ -1,31 +1,31 @@ -<?php
-
-class Ticket703 extends TPage {
- public function onLoad ($param)
- {
- parent::onLoad($param);
- if (!$this->isPostBack && !$this->isCallback)
- {
- $this->refreshLog();
- }
- }
-
- public function refreshLog ()
- {
- $this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'));
- }
-
- public function clearLog ($sender, $param)
- {
- $file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt');
- $f=fopen($file,"w");
- fclose($f);
- $this->refreshLog();
- }
-
- public function addLog($sender,$param)
- {
- prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets");
- }
-}
+<?php + +class Ticket703 extends TPage { + public function onLoad ($param) + { + parent::onLoad($param); + if (!$this->isPostBack && !$this->isCallback) + { + $this->refreshLog(); + } + } + + public function refreshLog () + { + $this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt')); + } + + public function clearLog ($sender, $param) + { + $file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'); + $f=fopen($file,"w"); + fclose($f); + $this->refreshLog(); + } + + public function addLog($sender,$param) + { + prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket708.php b/tests/FunctionalTests/tickets/protected/pages/Ticket708.php index b57aa444..2eca39d9 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket708.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket708.php @@ -1,30 +1,30 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-class Ticket708 extends TPage
-{
- public function onLoad ($param)
- {
- if (!$this->getIsCallback() && !$this->getIsPostBack())
- {
- $this->grid->dataSource=$this->getData();
- $this->grid->dataBind();
- }
- }
-
- protected function getData()
- {
- return array (
- array ('RadioValue' => 1, 'Text' => 'Radio 1'),
- array ('RadioValue' => 2, 'Text' => 'Radio 2'),
- array ('RadioValue' => 3, 'Text' => 'Radio 3'),
- array ('RadioValue' => 4, 'Text' => 'Radio 4'),
- );
- }
-
- public function ChangeRadio ($sender, $param)
- {
- $this->Result->setText("You have selected Radio Button #".$sender->getValue());
- }
-}
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); +class Ticket708 extends TPage +{ + public function onLoad ($param) + { + if (!$this->getIsCallback() && !$this->getIsPostBack()) + { + $this->grid->dataSource=$this->getData(); + $this->grid->dataBind(); + } + } + + protected function getData() + { + return array ( + array ('RadioValue' => 1, 'Text' => 'Radio 1'), + array ('RadioValue' => 2, 'Text' => 'Radio 2'), + array ('RadioValue' => 3, 'Text' => 'Radio 3'), + array ('RadioValue' => 4, 'Text' => 'Radio 4'), + ); + } + + public function ChangeRadio ($sender, $param) + { + $this->Result->setText("You have selected Radio Button #".$sender->getValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket72.php b/tests/FunctionalTests/tickets/protected/pages/Ticket72.php index 02432886..14a8a112 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket72.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket72.php @@ -1,13 +1,13 @@ -<?php
-
-class Ticket72 extends TPage
-{
- public function ButtonClick($sender,$param)
- {
- $a1 = $this->K1->SafeText;
- $a2 = $this->K2->SafeText;
- $this->ResultLabel->Text = $a2;
- }
-}
-
+<?php + +class Ticket72 extends TPage +{ + public function ButtonClick($sender,$param) + { + $a1 = $this->K1->SafeText; + $a2 = $this->K2->SafeText; + $this->ResultLabel->Text = $a2; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket93.php b/tests/FunctionalTests/tickets/protected/pages/Ticket93.php index dbdf2cab..dbee4556 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket93.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket93.php @@ -1,14 +1,14 @@ -<?php
-/*
- * Created on 13/04/2006
- */
-
-class Ticket93 extends TPage
-{
- public function buttonClicked($sender,$param)
- {
- echo 'postback triggered with value '.$param->PostBackValue;
- }
-}
-
-?>
+<?php +/* + * Created on 13/04/2006 + */ + +class Ticket93 extends TPage +{ + public function buttonClicked($sender,$param) + { + echo 'postback triggered with value '.$param->PostBackValue; + } +} + +?> diff --git a/tests/FunctionalTests/tickets/protected700/common/BasePage.php b/tests/FunctionalTests/tickets/protected700/common/BasePage.php index 1e40f754..bbb93650 100644 --- a/tests/FunctionalTests/tickets/protected700/common/BasePage.php +++ b/tests/FunctionalTests/tickets/protected700/common/BasePage.php @@ -1,68 +1,68 @@ -<?php
-
-class BasePage extends TPage
-{
- private $_param1='default 1';
- private $_param2='default 2';
- private $_param3='default 3';
- private $_param4='default 4';
- private $_param5='default 5';
-
- public function onInit($param)
- {
- parent::onInit($param);
- $this->Title=$this->PagePath;
- }
-
- public function getParam1()
- {
- return $this->_param1;
- }
-
- public function setParam1($value)
- {
- $this->_param1=$value;
- }
-
- public function getParam2()
- {
- return $this->_param2;
- }
-
- public function setParam2($value)
- {
- $this->_param2=$value;
- }
-
- public function getParam3()
- {
- return $this->_param3;
- }
-
- public function setParam3($value)
- {
- $this->_param3=$value;
- }
-
- public function getParam4()
- {
- return $this->_param4;
- }
-
- public function setParam4($value)
- {
- $this->_param4=$value;
- }
-
- public function getParam5()
- {
- return $this->_param5;
- }
-
- public function setParam5($value)
- {
- $this->_param5=$value;
- }
-}
-
+<?php + +class BasePage extends TPage +{ + private $_param1='default 1'; + private $_param2='default 2'; + private $_param3='default 3'; + private $_param4='default 4'; + private $_param5='default 5'; + + public function onInit($param) + { + parent::onInit($param); + $this->Title=$this->PagePath; + } + + public function getParam1() + { + return $this->_param1; + } + + public function setParam1($value) + { + $this->_param1=$value; + } + + public function getParam2() + { + return $this->_param2; + } + + public function setParam2($value) + { + $this->_param2=$value; + } + + public function getParam3() + { + return $this->_param3; + } + + public function setParam3($value) + { + $this->_param3=$value; + } + + public function getParam4() + { + return $this->_param4; + } + + public function setParam4($value) + { + $this->_param4=$value; + } + + public function getParam5() + { + return $this->_param5; + } + + public function setParam5($value) + { + $this->_param5=$value; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/layout/MainLayout.php b/tests/FunctionalTests/tickets/protected700/layout/MainLayout.php index 3e0a3d19..6f385ce8 100644 --- a/tests/FunctionalTests/tickets/protected700/layout/MainLayout.php +++ b/tests/FunctionalTests/tickets/protected700/layout/MainLayout.php @@ -1,12 +1,12 @@ -<?php
-
-class MainLayout extends TTemplateControl
-{
- public function logout($sender,$param)
- {
- $this->Application->getModule('auth')->logout();
- $this->Response->reload();
- }
-}
-
+<?php + +class MainLayout extends TTemplateControl +{ + public function logout($sender,$param) + { + $this->Application->getModule('auth')->logout(); + $this->Response->reload(); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php b/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php index 37258879..8071fb29 100644 --- a/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php +++ b/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php @@ -1,13 +1,13 @@ -<?php
-
-class UserLogin extends BasePage
-{
- public function loginButtonClicked($sender,$param)
- {
- $authManager=$this->Application->getModule('auth');
- $authManager->login($this->Username->Text,$this->Password->Text);
- $this->Response->redirect($this->Service->constructUrl('Home'));
- }
-}
-
+<?php + +class UserLogin extends BasePage +{ + public function loginButtonClicked($sender,$param) + { + $authManager=$this->Application->getModule('auth'); + $authManager->login($this->Username->Text,$this->Password->Text); + $this->Response->redirect($this->Service->constructUrl('Home')); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php index a2823c9d..07afd06c 100644 --- a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php @@ -1,21 +1,21 @@ -<?php
-
-class Issue120TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Issue120');
- $this->assertTextPresent('TActiveDropDownList PromptValue Test');
-
- $this->assertSelectedIndex("ctl0_Content_ddl1", 0);
- $this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue');
-
- $this->click("ctl0_Content_btn1");
- $this->pause(800);
-
- $this->assertSelectedIndex("ctl0_Content_ddl1", 0);
- $this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue');
- }
-}
-
+<?php + +class Issue120TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Issue120'); + $this->assertTextPresent('TActiveDropDownList PromptValue Test'); + + $this->assertSelectedIndex("ctl0_Content_ddl1", 0); + $this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue'); + + $this->click("ctl0_Content_btn1"); + $this->pause(800); + + $this->assertSelectedIndex("ctl0_Content_ddl1", 0); + $this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php index 1cfdf0cd..0c351f33 100644 --- a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php @@ -1,28 +1,28 @@ -<?php
-
-class Issue216TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Issue216');
- $this->assertTextPresent('TTabPanel doesn\'t preserve active tab on callback request');
-
- $this->assertVisible('ctl0_Content_tab1');
-
- $this->click("ctl0_Content_btn1");
- $this->pause(800);
-
- $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 0");
-
- $this->click("ctl0_Content_tab2_0");
- $this->pause(800);
-
- $this->assertVisible('ctl0_Content_tab2');
-
- $this->click("ctl0_Content_btn1");
- $this->pause(800);
- $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 1");
- }
-}
-
+<?php + +class Issue216TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Issue216'); + $this->assertTextPresent('TTabPanel doesn\'t preserve active tab on callback request'); + + $this->assertVisible('ctl0_Content_tab1'); + + $this->click("ctl0_Content_btn1"); + $this->pause(800); + + $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 0"); + + $this->click("ctl0_Content_tab2_0"); + $this->pause(800); + + $this->assertVisible('ctl0_Content_tab2'); + + $this->click("ctl0_Content_btn1"); + $this->pause(800); + $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 1"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php index 7453aeef..3cad6c77 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php @@ -1,19 +1,19 @@ -<?php
-
-class Ticket121TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket121');
- $this->type("ctl0\$Content\$FooTextBox", "");
- $this->verifyNotVisible('ctl0_Content_ctl1');
- $this->click("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
- $this->verifyVisible('ctl0_Content_ctl1');
- $this->type("ctl0\$Content\$FooTextBox", "content");
- $this->clickAndWait("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
- $this->verifyNotVisible('ctl0_Content_ctl1');
- $this->verifyTextPresent("clicked at", "");
- }
-}
-
+<?php + +class Ticket121TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket121'); + $this->type("ctl0\$Content\$FooTextBox", ""); + $this->verifyNotVisible('ctl0_Content_ctl1'); + $this->click("//input[@type='image' and @id='ctl0_Content_ctl0']", ""); + $this->verifyVisible('ctl0_Content_ctl1'); + $this->type("ctl0\$Content\$FooTextBox", "content"); + $this->clickAndWait("//input[@type='image' and @id='ctl0_Content_ctl0']", ""); + $this->verifyNotVisible('ctl0_Content_ctl1'); + $this->verifyTextPresent("clicked at", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php index d899aab5..616a578a 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php @@ -1,16 +1,16 @@ -<?php
-
-class Ticket191TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket191');
- $this->type("ctl0\$Content\$TextBox2", "test");
- $this->clickAndWait("name=ctl0\$Content\$ctl0");
- $this->type("ctl0\$Content\$TextBox", "test");
- $this->clickAndWait("name=ctl0\$Content\$ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl2');
- }
-}
-
+<?php + +class Ticket191TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket191'); + $this->type("ctl0\$Content\$TextBox2", "test"); + $this->clickAndWait("name=ctl0\$Content\$ctl0"); + $this->type("ctl0\$Content\$TextBox", "test"); + $this->clickAndWait("name=ctl0\$Content\$ctl1"); + $this->verifyNotVisible('ctl0_Content_ctl2'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php index 394f8c95..24c5e346 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php @@ -1,19 +1,19 @@ -<?php
-
-class Ticket21TestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $this->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", "");
- }
-}
-
+<?php + +class Ticket21TestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $this->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/Ticket239TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php index 9d895cb4..2fe84397 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php @@ -1,55 +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','');
- }
-}
-
+<?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 diff --git a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php index 8b74e565..b7ba1251 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php @@ -1,24 +1,24 @@ -<?php
-
-class Ticket274TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket274');
- $this->assertTitle('Verifying Ticket 274');
- $this->assertNotVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
-
- $this->clickAndWait($base.'button1');
- $this->assertVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
-
- $this->type($base.'MyDate', 'asd');
- $this->clickAndWait($base.'button1');
- $this->assertNotVisible($base.'validator1');
- $this->assertVisible($base.'validator2');
- }
-}
-
+<?php + +class Ticket274TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket274'); + $this->assertTitle('Verifying Ticket 274'); + $this->assertNotVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + + $this->clickAndWait($base.'button1'); + $this->assertVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + + $this->type($base.'MyDate', 'asd'); + $this->clickAndWait($base.'button1'); + $this->assertNotVisible($base.'validator1'); + $this->assertVisible($base.'validator2'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php index 6e3666b9..a559ca14 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php @@ -1,57 +1,57 @@ -<?php
-
-class Ticket278TestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket278');
- $this->assertTitle('Verifying Ticket 278');
- $this->assertNotVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
- $this->assertNotVisible($base.'panel1');
-
- $this->click($base.'button1');
- $this->assertVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
-
- $this->type($base.'text1', 'asd');
- $this->clickAndWait($base.'button1');
- $this->assertNotVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
- $this->assertNotVisible($base.'panel1');
-
- $this->click($base.'check1');
- $this->click($base.'button1');
- $this->assertNotVisible($base.'validator1');
- $this->assertVisible($base.'validator2');
- $this->assertVisible($base.'panel1');
-
-
- $this->type($base.'text1', '');
- $this->type($base.'text2', 'asd');
- $this->click($base.'button1');
- $this->assertVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
- $this->assertVisible($base.'panel1');
-
-
- $this->type($base.'text1', 'asd');
- $this->clickAndWait($base.'button1');
- $this->assertNotVisible($base.'validator1');
- $this->assertNotVisible($base.'validator2');
- $this->assertVisible($base.'panel1');
-
- $this->type($base.'text1', '');
- $this->type($base.'text2', '');
- $this->click($base.'button1');
- $this->assertVisible($base.'validator1');
- $this->assertVisible($base.'validator2');
- $this->assertVisible($base.'panel1');
- }
-}
-
+<?php + +class Ticket278TestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket278'); + $this->assertTitle('Verifying Ticket 278'); + $this->assertNotVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + $this->assertNotVisible($base.'panel1'); + + $this->click($base.'button1'); + $this->assertVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + + $this->type($base.'text1', 'asd'); + $this->clickAndWait($base.'button1'); + $this->assertNotVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + $this->assertNotVisible($base.'panel1'); + + $this->click($base.'check1'); + $this->click($base.'button1'); + $this->assertNotVisible($base.'validator1'); + $this->assertVisible($base.'validator2'); + $this->assertVisible($base.'panel1'); + + + $this->type($base.'text1', ''); + $this->type($base.'text2', 'asd'); + $this->click($base.'button1'); + $this->assertVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + $this->assertVisible($base.'panel1'); + + + $this->type($base.'text1', 'asd'); + $this->clickAndWait($base.'button1'); + $this->assertNotVisible($base.'validator1'); + $this->assertNotVisible($base.'validator2'); + $this->assertVisible($base.'panel1'); + + $this->type($base.'text1', ''); + $this->type($base.'text2', ''); + $this->click($base.'button1'); + $this->assertVisible($base.'validator1'); + $this->assertVisible($base.'validator2'); + $this->assertVisible($base.'panel1'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php index 6a5ccdb9..dac852e2 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php @@ -1,18 +1,18 @@ -<?php
-
-class Ticket27TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->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", "");
- }
-}
-
+<?php + +class Ticket27TestCase extends SeleniumTestCase +{ + function test() + { + $this->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 diff --git a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php index 9a6fa7c3..15194f60 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php @@ -1,14 +1,14 @@ -<?php
-
-class Ticket284TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket284');
- $this->assertTextPresent('Verifying Ticket 284');
- $this->click('ctl0_Content_ctl1');
-
- }
-}
-
+<?php + +class Ticket284TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket284'); + $this->assertTextPresent('Verifying Ticket 284'); + $this->click('ctl0_Content_ctl1'); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php index cd681c58..6f4a2a8e 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php @@ -1,12 +1,12 @@ -<?php
-
-class Ticket285TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket285');
- $this->assertTextPresent('350.00');
- $this->assertTextPresent('349.99');
- }
-}
+<?php + +class Ticket285TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket285'); + $this->assertTextPresent('350.00'); + $this->assertTextPresent('349.99'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php index 1bbfb7ec..b855edc8 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php @@ -1,18 +1,18 @@ <?php -
-class Ticket433TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket433');
- $this->assertTitle("Verifying Ticket 433");
- $this->assertText("{$base}VoteClick", "BEFORE click");
-
- $this->click("{$base}VoteClick");
- $this->pause(800);
- $this->assertText("{$base}VoteClick", "AFTER click CALLBACK DONE");
- }
-}
+ +class Ticket433TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket433'); + $this->assertTitle("Verifying Ticket 433"); + $this->assertText("{$base}VoteClick", "BEFORE click"); + + $this->click("{$base}VoteClick"); + $this->pause(800); + $this->assertText("{$base}VoteClick", "AFTER click CALLBACK DONE"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php index 651e322c..e097a9ce 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php @@ -1,16 +1,16 @@ -<?php
-
-class Ticket439TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket439');
- $this->assertTitle("Verifying Ticket 439");
- $this->click("{$base}button1");
- $this->waitForPageToLoad(3000);
- $this->pause(800);
- $this->assertTitle("Verifying Home");
- }
-}
+<?php + +class Ticket439TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket439'); + $this->assertTitle("Verifying Ticket 439"); + $this->click("{$base}button1"); + $this->waitForPageToLoad(3000); + $this->pause(800); + $this->assertTitle("Verifying Home"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php index 51b27b87..9da3be34 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php @@ -1,13 +1,13 @@ -<?php
-
-class Ticket463TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket463');
- $this->verifyTitle("Verifying Ticket 463", "");
- $this->assertTextPresent('May 1, 2005 12:00:00 AM');
- }
-}
-
+<?php + +class Ticket463TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket463'); + $this->verifyTitle("Verifying Ticket 463", ""); + $this->assertTextPresent('May 1, 2005 12:00:00 AM'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php index 05ad6fb6..a2c4826e 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php @@ -1,51 +1,51 @@ -<?php
-
-class Ticket470TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket470');
- $this->verifyTitle("Verifying Ticket 470");
- $this->assertText("{$base}counter", "0");
- $this->assertText("{$base}Results", "");
- $this->assertNotVisible("{$base}validator1");
-
- $this->click("{$base}button1");
- $this->pause(800);
- $this->assertText("{$base}counter", "0");
- $this->assertText("{$base}Results", "");
- $this->assertVisible("{$base}validator1");
-
- $this->type("{$base}TextBox", "hello");
- $this->click("{$base}button1");
- $this->pause(800);
- $this->assertText("{$base}counter", "0");
- $this->assertText("{$base}Results", "OK!!!");
- $this->assertNotVisible("{$base}validator1");
-
- //reload
- $this->click("{$base}reloadButton");
- $this->pause(800);
- $this->assertValue("{$base}TextBox", "hello");
- $this->assertText("{$base}counter", "1");
- $this->assertText("{$base}Results", "");
- $this->assertNotVisible("{$base}validator1");
-
- $this->type("{$base}TextBox", "");
- $this->click("{$base}button1");
- $this->pause(800);
- $this->assertText("{$base}counter", "1");
- $this->assertText("{$base}Results", "");
- $this->assertVisible("{$base}validator1");
-
- $this->type("{$base}TextBox", "test");
- $this->click("{$base}button1");
- $this->pause(800);
- $this->assertText("{$base}counter", "1");
- $this->assertText("{$base}Results", "OK!!!");
- $this->assertNotVisible("{$base}validator1");
- }
-}
-
+<?php + +class Ticket470TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket470'); + $this->verifyTitle("Verifying Ticket 470"); + $this->assertText("{$base}counter", "0"); + $this->assertText("{$base}Results", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "0"); + $this->assertText("{$base}Results", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}TextBox", "hello"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "0"); + $this->assertText("{$base}Results", "OK!!!"); + $this->assertNotVisible("{$base}validator1"); + + //reload + $this->click("{$base}reloadButton"); + $this->pause(800); + $this->assertValue("{$base}TextBox", "hello"); + $this->assertText("{$base}counter", "1"); + $this->assertText("{$base}Results", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->type("{$base}TextBox", ""); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "1"); + $this->assertText("{$base}Results", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}TextBox", "test"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "1"); + $this->assertText("{$base}Results", "OK!!!"); + $this->assertNotVisible("{$base}validator1"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php index ea32ff5f..10c36e7d 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php @@ -1,24 +1,24 @@ <?php -
-class Ticket477TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket477');
- $this->assertTitle("Verifying Ticket 477");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
-
- $this->clickAndWait("{$base}list1_c1");
- $this->assertVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
-
-
- $this->clickAndWait("{$base}list2_c1");
- $this->assertNotVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- }
-}
+ +class Ticket477TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket477'); + $this->assertTitle("Verifying Ticket 477"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + $this->clickAndWait("{$base}list1_c1"); + $this->assertVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + + $this->clickAndWait("{$base}list2_c1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php index 2a83fac9..d96b92f1 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php @@ -1,42 +1,42 @@ -<?php
-
-class Ticket488TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=CustomValidatorByPass');
- $this->assertTextPresent('Custom Login');
- $this->assertNotVisible('loginBox');
- $this->click("showLogin");
- $this->assertVisible("loginBox");
- $this->assertNotVisible("validator1");
- $this->assertNotVisible("validator2");
-
- $this->click("checkLogin");
- $this->pause(800);
- $this->assertVisible("validator1");
- $this->assertNotVisible("validator2");
-
- $this->type('Username', 'tea');
- $this->type('Password', 'mmama');
-
- $this->click("checkLogin");
- $this->pause(800);
- $this->assertNotVisible("validator1");
- $this->assertVisible("validator2");
-
- $this->type('Password', 'test');
- $this->click("checkLogin");
- $this->pause(800);
- $this->assertNotVisible("validator1");
- $this->assertNotVisible("validator2");
- }
-
- function test_more()
- {
- $this->open('tickets/index.php?page=Ticket488');
- //add test assertions here.
- }
-}
-
+<?php + +class Ticket488TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=CustomValidatorByPass'); + $this->assertTextPresent('Custom Login'); + $this->assertNotVisible('loginBox'); + $this->click("showLogin"); + $this->assertVisible("loginBox"); + $this->assertNotVisible("validator1"); + $this->assertNotVisible("validator2"); + + $this->click("checkLogin"); + $this->pause(800); + $this->assertVisible("validator1"); + $this->assertNotVisible("validator2"); + + $this->type('Username', 'tea'); + $this->type('Password', 'mmama'); + + $this->click("checkLogin"); + $this->pause(800); + $this->assertNotVisible("validator1"); + $this->assertVisible("validator2"); + + $this->type('Password', 'test'); + $this->click("checkLogin"); + $this->pause(800); + $this->assertNotVisible("validator1"); + $this->assertNotVisible("validator2"); + } + + function test_more() + { + $this->open('tickets/index.php?page=Ticket488'); + //add test assertions here. + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php index 7c74a1d1..5629e5f3 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php @@ -1,53 +1,53 @@ -<?php
-
-class Ticket504TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket504');
- $this->verifyTitle("Verifying Ticket 504", "");
-
- $this->assertText("status", "");
-
- $this->assertVisible("{$base}panelA");
- $this->assertVisible("{$base}panelB");
- $this->assertVisible("{$base}panelC");
- $this->assertVisible("{$base}panelD");
-
- $this->click("{$base}linka");
- $this->pause(800);
- $this->assertVisible("{$base}panelA");
- $this->assertNotVisible("{$base}panelB");
- $this->assertNotVisible("{$base}panelC");
- $this->assertNotVisible("{$base}panelD");
- $this->assertText("status", "panelA updated");
-
- $this->click("{$base}linkb");
- $this->pause(800);
- $this->assertNotVisible("{$base}panelA");
- $this->assertVisible("{$base}panelB");
- $this->assertNotVisible("{$base}panelC");
- $this->assertNotVisible("{$base}panelD");
- $this->assertText("status", "panelB updated");
-
- $this->click("{$base}linkc");
- $this->pause(800);
- $this->assertNotVisible("{$base}panelA");
- $this->assertNotVisible("{$base}panelB");
- $this->assertVisible("{$base}panelC");
- $this->assertNotVisible("{$base}panelD");
- $this->assertText("status", "panelC updated");
-
- $this->click("{$base}linkd");
- $this->pause(800);
- $this->assertNotVisible("{$base}panelA");
- $this->assertNotVisible("{$base}panelB");
- $this->assertNotVisible("{$base}panelC");
- $this->assertVisible("{$base}panelD");
- $this->assertText("status", "panelD updated");
-
- }
-}
-
+<?php + +class Ticket504TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket504'); + $this->verifyTitle("Verifying Ticket 504", ""); + + $this->assertText("status", ""); + + $this->assertVisible("{$base}panelA"); + $this->assertVisible("{$base}panelB"); + $this->assertVisible("{$base}panelC"); + $this->assertVisible("{$base}panelD"); + + $this->click("{$base}linka"); + $this->pause(800); + $this->assertVisible("{$base}panelA"); + $this->assertNotVisible("{$base}panelB"); + $this->assertNotVisible("{$base}panelC"); + $this->assertNotVisible("{$base}panelD"); + $this->assertText("status", "panelA updated"); + + $this->click("{$base}linkb"); + $this->pause(800); + $this->assertNotVisible("{$base}panelA"); + $this->assertVisible("{$base}panelB"); + $this->assertNotVisible("{$base}panelC"); + $this->assertNotVisible("{$base}panelD"); + $this->assertText("status", "panelB updated"); + + $this->click("{$base}linkc"); + $this->pause(800); + $this->assertNotVisible("{$base}panelA"); + $this->assertNotVisible("{$base}panelB"); + $this->assertVisible("{$base}panelC"); + $this->assertNotVisible("{$base}panelD"); + $this->assertText("status", "panelC updated"); + + $this->click("{$base}linkd"); + $this->pause(800); + $this->assertNotVisible("{$base}panelA"); + $this->assertNotVisible("{$base}panelB"); + $this->assertNotVisible("{$base}panelC"); + $this->assertVisible("{$base}panelD"); + $this->assertText("status", "panelD updated"); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php index e8ddbfce..a430fb4e 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php @@ -1,27 +1,27 @@ -<?php
-
-class Ticket507TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base='ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket507');
- $this->verifyTitle("Verifying Ticket 507", "");
-
- $this->assertText("{$base}label1", "Label 1");
-
- $this->click("{$base}button1");
- $this->pause(800);
-
- $this->select("{$base}list1", "item 1");
- $this->pause(800);
- $this->assertText("{$base}label1", "Selection: value 1");
-
- $this->addSelection("{$base}list1", "item 3");
-
- $this->pause(800);
- $this->assertText("{$base}label1", "Selection: value 1, value 3");
- }
-}
-
+<?php + +class Ticket507TestCase extends SeleniumTestCase +{ + function test() + { + $base='ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket507'); + $this->verifyTitle("Verifying Ticket 507", ""); + + $this->assertText("{$base}label1", "Label 1"); + + $this->click("{$base}button1"); + $this->pause(800); + + $this->select("{$base}list1", "item 1"); + $this->pause(800); + $this->assertText("{$base}label1", "Selection: value 1"); + + $this->addSelection("{$base}list1", "item 3"); + + $this->pause(800); + $this->assertText("{$base}label1", "Selection: value 1, value 3"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php index ea9feae8..b0cdd8af 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php @@ -1,20 +1,20 @@ -<?php
-
-class Ticket521TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open("tickets/index.php?page=Ticket521");
- $this->assertTitle("Verifying Ticket 521");
- $this->assertText("{$base}label1", "Label 1");
-
- $this->click("{$base}button1");
- $this->pause(1200);
-
- $this->assertText("{$base}label1", "Button 1 was clicked on callback");
- }
-
-}
-
+<?php + +class Ticket521TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open("tickets/index.php?page=Ticket521"); + $this->assertTitle("Verifying Ticket 521"); + $this->assertText("{$base}label1", "Label 1"); + + $this->click("{$base}button1"); + $this->pause(1200); + + $this->assertText("{$base}label1", "Button 1 was clicked on callback"); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php index abba3a96..c8894082 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php @@ -1,18 +1,18 @@ -<?php
-
-class Ticket526TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket526');
- $this->verifyTitle("Verifying Ticket 526", "");
-
- $this->assertElementNotPresent("{$base}dpbutton");
-
- $this->click("{$base}btn");
- $this->pause(800);
- $this->assertElementPresent("{$base}dpbutton");
- }
-}
+<?php + +class Ticket526TestCase extends SeleniumTestCase +{ + function test() + { + $base="ctl0_Content_"; + $this->open('tickets/index.php?page=Ticket526'); + $this->verifyTitle("Verifying Ticket 526", ""); + + $this->assertElementNotPresent("{$base}dpbutton"); + + $this->click("{$base}btn"); + $this->pause(800); + $this->assertElementPresent("{$base}dpbutton"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php index 86b28378..79791444 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php @@ -1,32 +1,32 @@ -<?php
-
-class Ticket528TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket528');
- $this->assertTitle("Verifying Ticket 528");
-
- $this->select("{$base}DDropTurno", "Tarde");
- $this->pause(800);
-
- $this->assertValue("{$base}Codigo", "T");
- $this->assertValue("{$base}Descricao", "Tarde");
-
- $this->select("{$base}DDropTurno", "Manhã");
- $this->pause(800);
-
- $this->assertValue("{$base}Codigo", "M");
- $this->assertValue("{$base}Descricao", "Manhã");
-
- $this->select("{$base}DDropTurno", "Noite");
- $this->pause(800);
-
- $this->assertValue("{$base}Codigo", "N");
- $this->assertValue("{$base}Descricao", "Noite");
-
- }
-}
-
+<?php + +class Ticket528TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket528'); + $this->assertTitle("Verifying Ticket 528"); + + $this->select("{$base}DDropTurno", "Tarde"); + $this->pause(800); + + $this->assertValue("{$base}Codigo", "T"); + $this->assertValue("{$base}Descricao", "Tarde"); + + $this->select("{$base}DDropTurno", "Manhã"); + $this->pause(800); + + $this->assertValue("{$base}Codigo", "M"); + $this->assertValue("{$base}Descricao", "Manhã"); + + $this->select("{$base}DDropTurno", "Noite"); + $this->pause(800); + + $this->assertValue("{$base}Codigo", "N"); + $this->assertValue("{$base}Descricao", "Noite"); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php index 26f70803..222f4b7b 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php @@ -1,36 +1,36 @@ -<?php
-
-class Ticket535TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket535');
- $this->assertTitle("Verifying Ticket 535");
-
- $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}');
- }
-
-}
-
+<?php + +class Ticket535TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket535'); + $this->assertTitle("Verifying Ticket 535"); + + $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}'); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php index 712ff24b..20730b25 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php @@ -1,30 +1,30 @@ -<?php
-
-class Ticket538TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket538');
- $this->verifyTitle("Verifying Ticket 538", "");
-
- $this->assertText("{$base}ALLog", 'waiting for response...');
-
- $this->select("{$base}DataViewer", "empty :(");
- $this->click("{$base}selectBtn");
- $this->pause(800);
-
- $this->assertText("{$base}ALLog", '0,');
-
- $this->select("{$base}DataSelector", "select data set 2");
- $this->pause(800);
- $this->select("{$base}DataViewer", "G1: Steven=>10");
- $this->addSelection("{$base}DataViewer", "G2: Kevin=>65");
-
- $this->click("{$base}selectBtn");
- $this->pause(800);
- $this->assertText("{$base}ALLog", '4- "test1", 10- "test2",');
- }
-}
-
+<?php + +class Ticket538TestCase extends SeleniumTestCase +{ + function test() + { + $base="ctl0_Content_"; + $this->open('tickets/index.php?page=Ticket538'); + $this->verifyTitle("Verifying Ticket 538", ""); + + $this->assertText("{$base}ALLog", 'waiting for response...'); + + $this->select("{$base}DataViewer", "empty :("); + $this->click("{$base}selectBtn"); + $this->pause(800); + + $this->assertText("{$base}ALLog", '0,'); + + $this->select("{$base}DataSelector", "select data set 2"); + $this->pause(800); + $this->select("{$base}DataViewer", "G1: Steven=>10"); + $this->addSelection("{$base}DataViewer", "G2: Kevin=>65"); + + $this->click("{$base}selectBtn"); + $this->pause(800); + $this->assertText("{$base}ALLog", '4- "test1", 10- "test2",'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php index 1698f1cb..62d2599d 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php @@ -1,12 +1,12 @@ -<?php
-
-class Ticket54TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket54');
- $this->verifyTextPresent("|A|a|B|b|C|", "");
- }
-}
-
+<?php + +class Ticket54TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket54'); + $this->verifyTextPresent("|A|a|B|b|C|", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php index 60a8d453..755d5dd6 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php @@ -1,14 +1,14 @@ -<?php
-
-class Ticket573TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket573');
- $this->verifyTitle("Verifying Ticket 573", "");
-
- $this->assertText('test1', '10.00');
- }
-}
-
+<?php + +class Ticket573TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket573'); + $this->verifyTitle("Verifying Ticket 573", ""); + + $this->assertText('test1', '10.00'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php index f95af91b..5f3bd4d6 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php @@ -1,29 +1,29 @@ -<?php
-
-class Ticket578TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket578');
- $this->verifyTitle("Verifying Ticket 578", "");
-
- $this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1", "");
- $this->pause(800);
- $this->assertText("{$base}label1", "Button 1 was clicked : ");
-
- $this->store($this->setTinymceHtml("{$base}text1", "helloworld"),"t2");
- $this->click("{$base}button1", "");
- $this->pause(800);
- $this->assertText("{$base}label1", "Button 1 was clicked : helloworld");
- }
-
- function setTinymceHtml($id, $text)
- {
- $tinymce = "this.browserbot.getCurrentWindow().tinyMCE.getInstanceById('{$id}')";
- return 'javascript{'."{$tinymce}.setHTML('{$text}') ? 0 : 1".'}';
- }
-}
-
+<?php + +class Ticket578TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket578'); + $this->verifyTitle("Verifying Ticket 578", ""); + + $this->assertText("{$base}label1", "Label 1"); + $this->click("{$base}button1", ""); + $this->pause(800); + $this->assertText("{$base}label1", "Button 1 was clicked : "); + + $this->store($this->setTinymceHtml("{$base}text1", "helloworld"),"t2"); + $this->click("{$base}button1", ""); + $this->pause(800); + $this->assertText("{$base}label1", "Button 1 was clicked : helloworld"); + } + + function setTinymceHtml($id, $text) + { + $tinymce = "this.browserbot.getCurrentWindow().tinyMCE.getInstanceById('{$id}')"; + return 'javascript{'."{$tinymce}.setHTML('{$text}') ? 0 : 1".'}'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php index cbcb7bb2..2b3f671b 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php @@ -1,27 +1,27 @@ -<?php
-
-class Ticket585TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket585');
- $this->verifyTitle("Verifying Ticket 585", "");
-
- $this->assertText("error", "");
- $this->assertNotVisible("{$base}validator1");
-
- $this->click("{$base}button1");
- $this->pause(800);
- $this->assertText("error", "Success");
- $this->assertNotVisible("{$base}validator1");
-
- $this->type("{$base}test", "15-03-2007");
- $this->click("{$base}button1");
- $this->pause(800);
- $this->assertText("error", "Error");
- $this->assertVisible("{$base}validator1");
- }
-}
-
+<?php + +class Ticket585TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket585'); + $this->verifyTitle("Verifying Ticket 585", ""); + + $this->assertText("error", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("error", "Success"); + $this->assertNotVisible("{$base}validator1"); + + $this->type("{$base}test", "15-03-2007"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("error", "Error"); + $this->assertVisible("{$base}validator1"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php index 4b5619cd..037b9223 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php @@ -1,21 +1,21 @@ -<?php
-
-class Ticket586TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket586');
- $this->verifyTitle("Verifying Ticket 586", "");
-
- $this->assertText("{$base}label1", "Status");
- $this->clickAndWait("{$base}button1");
- $this->assertText("{$base}label1", "Button 1 Clicked!");
-
- $this->type("{$base}text1", "testing");
- $this->keyDownAndWait("{$base}text1", '\13');
- $this->assertText("{$base}label1", "Button 2 (default) Clicked!");
- }
-}
-
+<?php + +class Ticket586TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket586'); + $this->verifyTitle("Verifying Ticket 586", ""); + + $this->assertText("{$base}label1", "Status"); + $this->clickAndWait("{$base}button1"); + $this->assertText("{$base}label1", "Button 1 Clicked!"); + + $this->type("{$base}text1", "testing"); + $this->keyDownAndWait("{$base}text1", '\13'); + $this->assertText("{$base}label1", "Button 2 (default) Clicked!"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php index 6624b5ba..f8255a2f 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php @@ -1,47 +1,47 @@ -<?php
-
-class Ticket587TestCase extends SeleniumTestCase
-{
- function testKeyPress()
- {
- $this->skipBrowsers(self::INTERNET_EXPLORER);
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket587_reopened');
- $this->assertTitle("Verifying Ticket 587_reopened");
-
- $this->assertText($base."label1", "Label 1");
- $this->select($base."list1", "item 3");
- $this->pause(800);
- $this->select($base."list2", "value 3 - item 4");
- $this->pause(800);
- $this->assertText($base."label1", "Selection 2: value 3 - item 4");
-
- $this->keyPress($base.'text1', 't');
- $this->pause(800);
- $this->select($base."list2", "asd 3 - item 2");
- $this->pause(800);
- $this->assertText($base."label1", "Selection 2: asd 3 - item 2");
- }
-
- function testButtonClick()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket587_reopened');
- $this->assertTitle("Verifying Ticket 587_reopened");
-
- $this->assertText($base."label1", "Label 1");
- $this->select($base."list1", "item 3");
- $this->pause(800);
- $this->select($base."list2", "value 3 - item 4");
- $this->pause(800);
- $this->assertText($base."label1", "Selection 2: value 3 - item 4");
-
- $this->click($base.'button6');
- $this->pause(800);
- $this->select($base."list2", "asd 3 - item 2");
- $this->pause(800);
- $this->assertText($base."label1", "Selection 2: asd 3 - item 2");
- }
-}
-
+<?php + +class Ticket587TestCase extends SeleniumTestCase +{ + function testKeyPress() + { + $this->skipBrowsers(self::INTERNET_EXPLORER); + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket587_reopened'); + $this->assertTitle("Verifying Ticket 587_reopened"); + + $this->assertText($base."label1", "Label 1"); + $this->select($base."list1", "item 3"); + $this->pause(800); + $this->select($base."list2", "value 3 - item 4"); + $this->pause(800); + $this->assertText($base."label1", "Selection 2: value 3 - item 4"); + + $this->keyPress($base.'text1', 't'); + $this->pause(800); + $this->select($base."list2", "asd 3 - item 2"); + $this->pause(800); + $this->assertText($base."label1", "Selection 2: asd 3 - item 2"); + } + + function testButtonClick() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket587_reopened'); + $this->assertTitle("Verifying Ticket 587_reopened"); + + $this->assertText($base."label1", "Label 1"); + $this->select($base."list1", "item 3"); + $this->pause(800); + $this->select($base."list2", "value 3 - item 4"); + $this->pause(800); + $this->assertText($base."label1", "Selection 2: value 3 - item 4"); + + $this->click($base.'button6'); + $this->pause(800); + $this->select($base."list2", "asd 3 - item 2"); + $this->pause(800); + $this->assertText($base."label1", "Selection 2: asd 3 - item 2"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php index c25eb25f..d4a05fd8 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php @@ -1,15 +1,15 @@ -<?php
-
-class Ticket653TestCase extends SeleniumTestCase
-{
- function test()
- {
- // Open with 'Friendly URL'
- $this->open('tickets/index.php/ticket653');
- $this->verifyTitle("Verifying Ticket 653", "");
-
- $this->assertText('textspan', 'This is the page for Ticket653');
- }
-}
-
+<?php + +class Ticket653TestCase extends SeleniumTestCase +{ + function test() + { + // Open with 'Friendly URL' + $this->open('tickets/index.php/ticket653'); + $this->verifyTitle("Verifying Ticket 653", ""); + + $this->assertText('textspan', 'This is the page for Ticket653'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php index 70c52f35..8d705772 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php @@ -1,23 +1,23 @@ -<?php
-
-class Ticket659TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- // Normal component (working)
- $this->open('tickets/index.php?page=ToggleTest');
- $this->assertText("${base}lbl", "Down");
- $this->click("${base}btn", "");
- $this->pause(800);
- $this->assertText("${base}lbl", "Up");
- // Extended component (not working)
- $this->open('tickets/index.php?page=Ticket659');
- $this->assertText("${base}lbl", "Down");
- $this->click("${base}btn", "");
- $this->pause(800);
- $this->assertText("${base}lbl", "Up");
- }
-}
-
+<?php + +class Ticket659TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + // Normal component (working) + $this->open('tickets/index.php?page=ToggleTest'); + $this->assertText("${base}lbl", "Down"); + $this->click("${base}btn", ""); + $this->pause(800); + $this->assertText("${base}lbl", "Up"); + // Extended component (not working) + $this->open('tickets/index.php?page=Ticket659'); + $this->assertText("${base}lbl", "Down"); + $this->click("${base}btn", ""); + $this->pause(800); + $this->assertText("${base}lbl", "Up"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php index e7ff30b3..c8929693 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php @@ -1,72 +1,72 @@ -<?php
-class Ticket700TestCase extends SeleniumTestCase
-{
- function test()
- {
- // page: Home
- $this->open('tickets/index700.php');
- $this->clickAndWait('ctl0_Logout');
- $this->clickAndWait('pageHome');
- $this->assertTitle("Home");
- $this->assertTextPresent('|Param1: Set at app config|');
- $this->assertTextPresent('|Param2: Set at root|');
- $this->assertTextPresent('|Param3: default 3|');
- $this->assertTextPresent('|Param4: default 4|');
- $this->assertTextPresent('|Param5: Set at root|');
-
- // page: admin.Home
- $this->clickAndWait('pageAdminHome');
- $this->assertTitle('UserLogin');
- $this->type('ctl0_Main_Username','AdminUser');
- $this->type('ctl0_Main_Password','demo');
- $this->clickAndWait('ctl0_Main_LoginButton');
- $this->clickAndWait('pageAdminHome');
- $this->assertTitle('admin.Home');
- $this->assertTextPresent('|Param1: Set at app config|');
- $this->assertTextPresent('|Param2: Set at admin|');
- $this->assertTextPresent('|Param3: Set at admin|');
- $this->assertTextPresent('|Param4: Set at app config|');
- $this->assertTextPresent('|Param5: Set at app config|');
-
- // page: admin.Home2
- $this->clickAndWait('pageAdminHome2');
- $this->assertTitle('admin.Home2');
- $this->clickAndWait('ctl0_Logout');
- $this->clickAndWait('pageAdminHome2');
- $this->assertTitle('admin.Home2');
-
- // page: admin.users.Home
- $this->clickAndWait('pageAdminUsersHome');
- $this->assertTitle('UserLogin');
- $this->type('ctl0_Main_Username','NormalUser');
- $this->type('ctl0_Main_Password','demo');
- $this->clickAndWait('ctl0_Main_LoginButton');
- $this->clickAndWait('pageAdminUsersHome');
- $this->assertTitle('UserLogin');
- $this->type('ctl0_Main_Username','AdminUser');
- $this->type('ctl0_Main_Password','demo');
- $this->clickAndWait('ctl0_Main_LoginButton');
- $this->clickAndWait('pageAdminUsersHome');
- $this->assertTitle('admin.users.Home');
- $this->assertTextPresent('|Param1: Set at admin|');
- $this->assertTextPresent('|Param2: Set at admin.users|');
- $this->assertTextPresent('|Param3: default 3|');
- $this->assertTextPresent('|Param4: Set at admin|');
- $this->assertTextPresent('|Param5: Set at app config|');
-
- // page: admin.users.Home2
- $this->clickAndWait('pageAdminUsersHome2');
- $this->assertTitle('admin.users.Home2');
-
- // page: content.Home
- $this->clickAndWait('pageContentHome');
- $this->assertTitle('content.Home');
- $this->assertTextPresent('|Param1: Set at app config|');
- $this->assertTextPresent('|Param2: Set at root|');
- $this->assertTextPresent('|Param3: default 3|');
- $this->assertTextPresent('|Param4: default 4|');
- $this->assertTextPresent('|Param5: Set at app config|');
- $this->clickAndWait('ctl0_Logout');
- }
-}
+<?php +class Ticket700TestCase extends SeleniumTestCase +{ + function test() + { + // page: Home + $this->open('tickets/index700.php'); + $this->clickAndWait('ctl0_Logout'); + $this->clickAndWait('pageHome'); + $this->assertTitle("Home"); + $this->assertTextPresent('|Param1: Set at app config|'); + $this->assertTextPresent('|Param2: Set at root|'); + $this->assertTextPresent('|Param3: default 3|'); + $this->assertTextPresent('|Param4: default 4|'); + $this->assertTextPresent('|Param5: Set at root|'); + + // page: admin.Home + $this->clickAndWait('pageAdminHome'); + $this->assertTitle('UserLogin'); + $this->type('ctl0_Main_Username','AdminUser'); + $this->type('ctl0_Main_Password','demo'); + $this->clickAndWait('ctl0_Main_LoginButton'); + $this->clickAndWait('pageAdminHome'); + $this->assertTitle('admin.Home'); + $this->assertTextPresent('|Param1: Set at app config|'); + $this->assertTextPresent('|Param2: Set at admin|'); + $this->assertTextPresent('|Param3: Set at admin|'); + $this->assertTextPresent('|Param4: Set at app config|'); + $this->assertTextPresent('|Param5: Set at app config|'); + + // page: admin.Home2 + $this->clickAndWait('pageAdminHome2'); + $this->assertTitle('admin.Home2'); + $this->clickAndWait('ctl0_Logout'); + $this->clickAndWait('pageAdminHome2'); + $this->assertTitle('admin.Home2'); + + // page: admin.users.Home + $this->clickAndWait('pageAdminUsersHome'); + $this->assertTitle('UserLogin'); + $this->type('ctl0_Main_Username','NormalUser'); + $this->type('ctl0_Main_Password','demo'); + $this->clickAndWait('ctl0_Main_LoginButton'); + $this->clickAndWait('pageAdminUsersHome'); + $this->assertTitle('UserLogin'); + $this->type('ctl0_Main_Username','AdminUser'); + $this->type('ctl0_Main_Password','demo'); + $this->clickAndWait('ctl0_Main_LoginButton'); + $this->clickAndWait('pageAdminUsersHome'); + $this->assertTitle('admin.users.Home'); + $this->assertTextPresent('|Param1: Set at admin|'); + $this->assertTextPresent('|Param2: Set at admin.users|'); + $this->assertTextPresent('|Param3: default 3|'); + $this->assertTextPresent('|Param4: Set at admin|'); + $this->assertTextPresent('|Param5: Set at app config|'); + + // page: admin.users.Home2 + $this->clickAndWait('pageAdminUsersHome2'); + $this->assertTitle('admin.users.Home2'); + + // page: content.Home + $this->clickAndWait('pageContentHome'); + $this->assertTitle('content.Home'); + $this->assertTextPresent('|Param1: Set at app config|'); + $this->assertTextPresent('|Param2: Set at root|'); + $this->assertTextPresent('|Param3: default 3|'); + $this->assertTextPresent('|Param4: default 4|'); + $this->assertTextPresent('|Param5: Set at app config|'); + $this->clickAndWait('ctl0_Logout'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php index d497bb34..b001aa28 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php @@ -1,21 +1,21 @@ -<?php
-class Ticket703TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket703.Ticket703');
- $this->assertTitle("Verifying Ticket703.Ticket703 703.703");
- // Start with an empty log
- $this->click($base.'ctl2');
- // Wait for callback to be lanched
- $this->pause(2000);
- $this->assertText($base.'logBox', "");
- $this->type($base.'logMessage', "Test of prado logging system");
- $this->click($base.'ctl0');
- $this->pause(800);
- $this->click($base.'ctl1');
- $this->assertTextPresent($base.'logBox', "Test of prado logging system");
- }
-}
+<?php +class Ticket703TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket703.Ticket703'); + $this->assertTitle("Verifying Ticket703.Ticket703 703.703"); + // Start with an empty log + $this->click($base.'ctl2'); + // Wait for callback to be lanched + $this->pause(2000); + $this->assertText($base.'logBox', ""); + $this->type($base.'logMessage', "Test of prado logging system"); + $this->click($base.'ctl0'); + $this->pause(800); + $this->click($base.'ctl1'); + $this->assertTextPresent($base.'logBox', "Test of prado logging system"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php index 77978141..7c9f706b 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php @@ -1,28 +1,28 @@ -<?php
-class Ticket708TestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket708');
- $this->assertTitle("Verifying Ticket 708");
-
- $this->click($base."grid_ctl1_RadioButton");
- $this->pause(800);
- $this->assertText($base."Result", "You have selected Radio Button #1");
-
- $this->click($base."grid_ctl2_RadioButton");
- $this->pause(800);
- $this->assertText($base."Result", "You have selected Radio Button #2");
-
- $this->click($base."grid_ctl3_RadioButton");
- $this->pause(800);
- $this->assertText($base."Result", "You have selected Radio Button #3");
-
- $this->click($base."grid_ctl4_RadioButton");
- $this->pause(800);
- $this->assertText($base."Result", "You have selected Radio Button #4");
- }
-
-}
+<?php +class Ticket708TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket708'); + $this->assertTitle("Verifying Ticket 708"); + + $this->click($base."grid_ctl1_RadioButton"); + $this->pause(800); + $this->assertText($base."Result", "You have selected Radio Button #1"); + + $this->click($base."grid_ctl2_RadioButton"); + $this->pause(800); + $this->assertText($base."Result", "You have selected Radio Button #2"); + + $this->click($base."grid_ctl3_RadioButton"); + $this->pause(800); + $this->assertText($base."Result", "You have selected Radio Button #3"); + + $this->click($base."grid_ctl4_RadioButton"); + $this->pause(800); + $this->assertText($base."Result", "You have selected Radio Button #4"); + } + +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php index 6d864899..346b08e3 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php @@ -1,16 +1,16 @@ -<?php
-
-class Ticket72TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket72');
- $this->type("ctl0\$Content\$K1", "abc");
- $this->type("ctl0\$Content\$K2", "efg");
- $this->clickAndWait("//input[@type='submit' and @value='Send']", "");
- $this->verifyTextPresent("efg", "");
- $this->verifyTextNotPresent("abcefg", "");
- }
-}
-
+<?php + +class Ticket72TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket72'); + $this->type("ctl0\$Content\$K1", "abc"); + $this->type("ctl0\$Content\$K2", "efg"); + $this->clickAndWait("//input[@type='submit' and @value='Send']", ""); + $this->verifyTextPresent("efg", ""); + $this->verifyTextNotPresent("abcefg", ""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php index 6a286ffe..8d11f98b 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php @@ -1,16 +1,16 @@ -<?php
-/*
- * Created on 13/04/2006
- *
- */
-
-class Ticket93TestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('tickets/index.php?page=Ticket93');
- $this->verifyTextPresent("ValidationGroups without any inputs with grouping");
- }
-
-}
-?>
+<?php +/* + * Created on 13/04/2006 + * + */ + +class Ticket93TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket93'); + $this->verifyTextPresent("ValidationGroups without any inputs with grouping"); + } + +} +?> diff --git a/tests/FunctionalTests/validators/protected/pages/Button.php b/tests/FunctionalTests/validators/protected/pages/Button.php index 3dbbc7d6..94aaf6c8 100644 --- a/tests/FunctionalTests/validators/protected/pages/Button.php +++ b/tests/FunctionalTests/validators/protected/pages/Button.php @@ -1,27 +1,27 @@ -<?php
-
-class Button extends TPage
-{
- public function button1Clicked($sender,$param)
- {
- $this->Result1->Text="Button1 is clicked";
- if($this->IsValid)
- $this->Result1->Text.=' and valid';
- }
-
- public function button2Clicked($sender,$param)
- {
- $this->Result2->Text="Button2 is clicked";
- if($this->IsValid)
- $this->Result2->Text.=' and valid';
- }
-
- public function button3Clicked($sender,$param)
- {
- $this->Result3->Text="Button3 is clicked";
- if($this->IsValid)
- $this->Result3->Text.=' and valid';
- }
-}
-
+<?php + +class Button extends TPage +{ + public function button1Clicked($sender,$param) + { + $this->Result1->Text="Button1 is clicked"; + if($this->IsValid) + $this->Result1->Text.=' and valid'; + } + + public function button2Clicked($sender,$param) + { + $this->Result2->Text="Button2 is clicked"; + if($this->IsValid) + $this->Result2->Text.=' and valid'; + } + + public function button3Clicked($sender,$param) + { + $this->Result3->Text="Button3 is clicked"; + if($this->IsValid) + $this->Result3->Text.=' and valid'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/CheckBox.php b/tests/FunctionalTests/validators/protected/pages/CheckBox.php index 700ac171..f29792e0 100644 --- a/tests/FunctionalTests/validators/protected/pages/CheckBox.php +++ b/tests/FunctionalTests/validators/protected/pages/CheckBox.php @@ -1,27 +1,27 @@ -<?php
-
-class CheckBox extends TPage
-{
- public function button1Clicked($sender,$param)
- {
- $this->Result1->Text="Button1 is clicked";
- if($this->IsValid)
- $this->Result1->Text.=' and valid';
- }
-
- public function button2Clicked($sender,$param)
- {
- $this->Result2->Text="Button2 is clicked";
- if($this->IsValid)
- $this->Result2->Text.=' and valid';
- }
-
- public function button3Clicked($sender,$param)
- {
- $this->Result3->Text="Button3 is clicked";
- if($this->IsValid)
- $this->Result3->Text.=' and valid';
- }
-}
-
+<?php + +class CheckBox extends TPage +{ + public function button1Clicked($sender,$param) + { + $this->Result1->Text="Button1 is clicked"; + if($this->IsValid) + $this->Result1->Text.=' and valid'; + } + + public function button2Clicked($sender,$param) + { + $this->Result2->Text="Button2 is clicked"; + if($this->IsValid) + $this->Result2->Text.=' and valid'; + } + + public function button3Clicked($sender,$param) + { + $this->Result3->Text="Button3 is clicked"; + if($this->IsValid) + $this->Result3->Text.=' and valid'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.php b/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.php index 7756566c..83546617 100644 --- a/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.php +++ b/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.php @@ -1,20 +1,20 @@ -<?php
-/*
- * Created on 27/03/2007
- */
-
-class ConditionalValidation extends TPage
-{
- function check_validate($sender, $params)
- {
- $sender->enabled = $this->check1->checked;
- }
-
- function onPreRender($param)
- {
- //always re-enable the validator2 so as to display the client-side validator
- $this->validator2->enabled=true;
- }
-}
-
-?>
+<?php +/* + * Created on 27/03/2007 + */ + +class ConditionalValidation extends TPage +{ + function check_validate($sender, $params) + { + $sender->enabled = $this->check1->checked; + } + + function onPreRender($param) + { + //always re-enable the validator2 so as to display the client-side validator + $this->validator2->enabled=true; + } +} + +?> diff --git a/tests/FunctionalTests/validators/protected/pages/CustomValidator.php b/tests/FunctionalTests/validators/protected/pages/CustomValidator.php index ed1f9433..b56a9d8b 100644 --- a/tests/FunctionalTests/validators/protected/pages/CustomValidator.php +++ b/tests/FunctionalTests/validators/protected/pages/CustomValidator.php @@ -1,14 +1,14 @@ -<?php
-/*
- * Created on 16/04/2006
- */
-
-class CustomValidator extends TPage
-{
- function CustomValidation($sender, $params)
- {
- $params->isValid = $this->text1->Text == "Prado";
- }
-}
-
-?>
+<?php +/* + * Created on 16/04/2006 + */ + +class CustomValidator extends TPage +{ + function CustomValidation($sender, $params) + { + $params->isValid = $this->text1->Text == "Prado"; + } +} + +?> diff --git a/tests/FunctionalTests/validators/protected/pages/ImageButton.php b/tests/FunctionalTests/validators/protected/pages/ImageButton.php index ecedd5bf..65392b75 100644 --- a/tests/FunctionalTests/validators/protected/pages/ImageButton.php +++ b/tests/FunctionalTests/validators/protected/pages/ImageButton.php @@ -1,27 +1,27 @@ -<?php
-
-class ImageButton extends TPage
-{
- public function button1Clicked($sender,$param)
- {
- $this->Result1->Text="Button1 is clicked";
- if($this->IsValid)
- $this->Result1->Text.=' and valid';
- }
-
- public function button2Clicked($sender,$param)
- {
- $this->Result2->Text="Button2 is clicked";
- if($this->IsValid)
- $this->Result2->Text.=' and valid';
- }
-
- public function button3Clicked($sender,$param)
- {
- $this->Result3->Text="Button3 is clicked";
- if($this->IsValid)
- $this->Result3->Text.=' and valid';
- }
-}
-
+<?php + +class ImageButton extends TPage +{ + public function button1Clicked($sender,$param) + { + $this->Result1->Text="Button1 is clicked"; + if($this->IsValid) + $this->Result1->Text.=' and valid'; + } + + public function button2Clicked($sender,$param) + { + $this->Result2->Text="Button2 is clicked"; + if($this->IsValid) + $this->Result2->Text.=' and valid'; + } + + public function button3Clicked($sender,$param) + { + $this->Result3->Text="Button3 is clicked"; + if($this->IsValid) + $this->Result3->Text.=' and valid'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/Layout.php b/tests/FunctionalTests/validators/protected/pages/Layout.php index ba96038b..7f5e5802 100644 --- a/tests/FunctionalTests/validators/protected/pages/Layout.php +++ b/tests/FunctionalTests/validators/protected/pages/Layout.php @@ -1,7 +1,7 @@ -<?php
-
-class Layout extends TTemplateControl
-{
-}
-
+<?php + +class Layout extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/LinkButton.php b/tests/FunctionalTests/validators/protected/pages/LinkButton.php index 5130dd01..2b5a3c23 100644 --- a/tests/FunctionalTests/validators/protected/pages/LinkButton.php +++ b/tests/FunctionalTests/validators/protected/pages/LinkButton.php @@ -1,27 +1,27 @@ -<?php
-
-class LinkButton extends TPage
-{
- public function button1Clicked($sender,$param)
- {
- $this->Result1->Text="Button1 is clicked";
- if($this->IsValid)
- $this->Result1->Text.=' and valid';
- }
-
- public function button2Clicked($sender,$param)
- {
- $this->Result2->Text="Button2 is clicked";
- if($this->IsValid)
- $this->Result2->Text.=' and valid';
- }
-
- public function button3Clicked($sender,$param)
- {
- $this->Result3->Text="Button3 is clicked";
- if($this->IsValid)
- $this->Result3->Text.=' and valid';
- }
-}
-
+<?php + +class LinkButton extends TPage +{ + public function button1Clicked($sender,$param) + { + $this->Result1->Text="Button1 is clicked"; + if($this->IsValid) + $this->Result1->Text.=' and valid'; + } + + public function button2Clicked($sender,$param) + { + $this->Result2->Text="Button2 is clicked"; + if($this->IsValid) + $this->Result2->Text.=' and valid'; + } + + public function button3Clicked($sender,$param) + { + $this->Result3->Text="Button3 is clicked"; + if($this->IsValid) + $this->Result3->Text.=' and valid'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/ButtonTestCase.php b/tests/FunctionalTests/validators/tests/ButtonTestCase.php index 46e037dc..99ebf4a4 100644 --- a/tests/FunctionalTests/validators/tests/ButtonTestCase.php +++ b/tests/FunctionalTests/validators/tests/ButtonTestCase.php @@ -1,65 +1,65 @@ -<?php
-
-class ButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('validators/index.php?page=Button');
-
-
- // verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
- $this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
-
- // verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the second validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
- $this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
-
- // verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
-
- // verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
- $this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
- }
-}
-
+<?php + +class ButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('validators/index.php?page=Button'); + + + // verify all error messages are invisible + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validator shows the error + $this->click("ctl0_Content_ctl1"); + $this->verifyVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button1 is clicked'); + $this->type("ctl0_Content_TextBox1", "test"); + $this->clickAndWait("ctl0_Content_ctl1"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button1 is clicked and valid'); + + // verify the second validator shows the error + $this->click("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the second validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button2 is clicked'); + $this->type("ctl0_Content_TextBox2", "test"); + $this->clickAndWait("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button2 is clicked and valid'); + + // verify the third validator shows the error + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyVisible('ctl0_Content_ctl4'); + + // verify the third validation is passed + $this->verifyTextPresent('Button3 is clicked'); + $this->verifyTextNotPresent('Button3 is clicked and valid'); + $this->type("ctl0_Content_TextBox3", "test"); + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button3 is clicked and valid'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php b/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php index 41c588ee..957a7cbf 100644 --- a/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php +++ b/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php @@ -1,70 +1,70 @@ -<?php
-
-class CheckBoxTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $this->open('validators/index.php?page=CheckBox');
-
-
- // verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
- $this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
-
- // verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the second validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
- $this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
-
- // verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
-
- // verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
- $this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
- }
-}
-
+<?php + +class CheckBoxTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $this->open('validators/index.php?page=CheckBox'); + + + // verify all error messages are invisible + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validator shows the error + $this->click("ctl0_Content_ctl1"); + $this->verifyVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button1 is clicked'); + $this->type("ctl0_Content_TextBox1", "test"); + $this->clickAndWait("ctl0_Content_ctl1"); + $this->clickAndWait("ctl0_Content_ctl1"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button1 is clicked and valid'); + + // verify the second validator shows the error + $this->click("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the second validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button2 is clicked'); + $this->type("ctl0_Content_TextBox2", "test"); + $this->clickAndWait("ctl0_Content_ctl3"); + $this->clickAndWait("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button2 is clicked and valid'); + + // verify the third validator shows the error + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyVisible('ctl0_Content_ctl4'); + + // verify the third validation is passed + $this->verifyTextPresent('Button3 is clicked'); + $this->verifyTextNotPresent('Button3 is clicked and valid'); + $this->type("ctl0_Content_TextBox3", "test"); + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button3 is clicked and valid'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php index b0f7c407..5a7dbc80 100644 --- a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php @@ -1,46 +1,46 @@ -<?php
-
-//New Test
-class CompareValidatorTestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = "ctl0_Content_";
-
- $this->open("validators/index.php?page=CompareValidator", "");
- $this->verifyTextPresent("Prado CompareValidator Tests", "");
-
- $this->type("{$base}text1", "qwe");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
-
- $this->click("//input[@type='submit' and @value='Test']", "");
-
- $this->type("{$base}text2", "1234");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1");
-
- $this->type("{$base}text2", "qwe");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
-
-
- $this->type("{$base}text3", "12312");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2");
-
- $this->type("{$base}text3", "13/1/2005");
- $this->assertVisible("{$base}validator2");
-
-
- $this->type("{$base}text3", "12/1/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
-
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
-
- }
-}
-
+<?php + +//New Test +class CompareValidatorTestCase extends SeleniumTestCase +{ + function test() + { + $base = "ctl0_Content_"; + + $this->open("validators/index.php?page=CompareValidator", ""); + $this->verifyTextPresent("Prado CompareValidator Tests", ""); + + $this->type("{$base}text1", "qwe"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + $this->click("//input[@type='submit' and @value='Test']", ""); + + $this->type("{$base}text2", "1234"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}text2", "qwe"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + + $this->type("{$base}text3", "12312"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2"); + + $this->type("{$base}text3", "13/1/2005"); + $this->assertVisible("{$base}validator2"); + + + $this->type("{$base}text3", "12/1/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php index 7191ff9f..0c0ffc51 100644 --- a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php +++ b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php @@ -1,55 +1,55 @@ -<?php
-
-class ConditionalValidationTestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=ConditionalValidation", "");
- $this->verifyTextPresent("Conditional Validation (clientside + server side)", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
-
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- $this->type("{$base}text1", "testing");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- $this->type("{$base}text1" ,"");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
-
- $this->type("{$base}text1", "test");
- $this->type("{$base}text2", "123");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- $this->click("{$base}check1");
- $this->type("{$base}text1", "");
- $this->type("{$base}text2", "");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- }
-
-}
-
-?>
+<?php + +class ConditionalValidationTestCase extends SeleniumTestCase +{ + function test() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=ConditionalValidation", ""); + $this->verifyTextPresent("Conditional Validation (clientside + server side)", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + $this->click("{$base}check1"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + + $this->click("{$base}check1"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + $this->type("{$base}text1", "testing"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + $this->type("{$base}text1" ,""); + $this->click("{$base}check1"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + + $this->type("{$base}text1", "test"); + $this->type("{$base}text2", "123"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + $this->click("{$base}check1"); + $this->type("{$base}text1", ""); + $this->type("{$base}text2", ""); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + } + +} + +?> diff --git a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php index 3a5daa6a..c5cbae8e 100644 --- a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php @@ -1,31 +1,31 @@ -<?php
-
-//New Test
-class CustomValidatorTestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=CustomValidator", "");
- $this->assertTextPresent("Prado CustomValidator Tests", "");
- $this->assertNotVisible("{$base}validator1");
-
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1");
-
- $this->type("{$base}text1", "Prado");
- $this->pause(250);
- $this->assertNotVisible("{$base}validator1");
- $this->type("{$base}text1", "Testing");
- $this->pause(250);
- $this->assertVisible("{$base}validator1");
- $this->type("{$base}text1", "Prado");
- $this->pause(250);
- $this->assertNotVisible("{$base}validator1");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1");
-
- }
-}
-
+<?php + +//New Test +class CustomValidatorTestCase extends SeleniumTestCase +{ + function test() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=CustomValidator", ""); + $this->assertTextPresent("Prado CustomValidator Tests", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}text1", "Prado"); + $this->pause(250); + $this->assertNotVisible("{$base}validator1"); + $this->type("{$base}text1", "Testing"); + $this->pause(250); + $this->assertVisible("{$base}validator1"); + $this->type("{$base}text1", "Prado"); + $this->pause(250); + $this->assertNotVisible("{$base}validator1"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1"); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php index 153be373..c7c4bdb6 100644 --- a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php @@ -1,49 +1,49 @@ -<?php
-/*
- * Created on 25/04/2006
- */
-
-class DataTypeValidatorTestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=DataTypeValidator", "");
- $this->verifyTextPresent("Data Type Validator Tests", "");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
-
- $this->type("{$base}textbox1", "a");
- $this->type("{$base}textbox2", "b");
- $this->type("{$base}textbox3", "c");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
- $this->assertVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- $this->assertVisible("{$base}validator3");
-
- $this->type("{$base}textbox1", "12");
- $this->type("{$base}textbox2", "12.5");
- $this->type("{$base}textbox3", "2/10/2005");
- $this->clickAndWait("//input[@type='submit' and @value='submit!']", "");
-
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
-
- $this->type("{$base}textbox1", "12.2");
- $this->type("{$base}textbox2", "-12.5");
- $this->type("{$base}textbox3", "2/13/2005");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
- $this->assertVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertVisible("{$base}validator3");
- }
-
-}
-
-?>
+<?php +/* + * Created on 25/04/2006 + */ + +class DataTypeValidatorTestCase extends SeleniumTestCase +{ + function test() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=DataTypeValidator", ""); + $this->verifyTextPresent("Data Type Validator Tests", ""); + $this->click("//input[@type='submit' and @value='submit!']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + + $this->type("{$base}textbox1", "a"); + $this->type("{$base}textbox2", "b"); + $this->type("{$base}textbox3", "c"); + $this->click("//input[@type='submit' and @value='submit!']", ""); + + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + + $this->type("{$base}textbox1", "12"); + $this->type("{$base}textbox2", "12.5"); + $this->type("{$base}textbox3", "2/10/2005"); + $this->clickAndWait("//input[@type='submit' and @value='submit!']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + + $this->type("{$base}textbox1", "12.2"); + $this->type("{$base}textbox2", "-12.5"); + $this->type("{$base}textbox3", "2/13/2005"); + $this->click("//input[@type='submit' and @value='submit!']", ""); + + $this->assertVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + } + +} + +?> diff --git a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php index cdab46ab..12368448 100644 --- a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php +++ b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php @@ -1,72 +1,72 @@ -<?php
-
-class DatePickerTestCase extends SeleniumTestCase
-{
- function test()
- {
- $year=2012;
- $year2=2013;
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=DatePicker", "");
- $this->verifyTextPresent("Date Picker validation Test", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertNotVisible("{$base}validator8", "");
-
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- //the range validator is visible because the date is a drop down list
- //thus has default value != ""
- $this->assertVisible("{$base}validator4", "");
- $this->assertVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertVisible("{$base}validator8", "");
-
- $this->click("{$base}submit1");
- $this->pause(250);
- $this->type("{$base}picker1", "13/4/$year");
- $this->select("{$base}picker2_month", "label=9");
- $this->select("{$base}picker2_day", "label=10");
- $this->select("{$base}picker2_year", "label=$year");
- $this->pause(250);
- $this->type("{$base}picker3", "14/4/$year");
- $this->pause(250);
- $this->type("{$base}picker4", "7/4/$year");
- $this->select("{$base}picker5_day", "label=6");
- $this->select("{$base}picker5_month", "label=3");
- $this->select("{$base}picker5_year", "label=$year2");
- $this->select("{$base}picker6_month", "label=3");
- $this->select("{$base}picker6_year", "label=$year2");
- $this->select("{$base}picker6_day", "label=5");
-
- $this->click("{$base}submit1");
-
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertVisible("{$base}validator6", "");
- $this->assertVisible("{$base}validator8", "");
-
- $this->type("{$base}picker1", "20/4/$year2");
- $this->type("{$base}picker4", "29/4/$year");
- $this->select("{$base}picker6_day", "label=10");
-
- $this->clickAndWait("{$base}submit1");
-
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertNotVisible("{$base}validator8", "");
- }
-
-}
-
-?>
+<?php + +class DatePickerTestCase extends SeleniumTestCase +{ + function test() + { + $year=2012; + $year2=2013; + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=DatePicker", ""); + $this->verifyTextPresent("Date Picker validation Test", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + $this->assertNotVisible("{$base}validator4", ""); + $this->assertNotVisible("{$base}validator5", ""); + $this->assertNotVisible("{$base}validator6", ""); + $this->assertNotVisible("{$base}validator8", ""); + + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + //the range validator is visible because the date is a drop down list + //thus has default value != "" + $this->assertVisible("{$base}validator4", ""); + $this->assertVisible("{$base}validator5", ""); + $this->assertNotVisible("{$base}validator6", ""); + $this->assertVisible("{$base}validator8", ""); + + $this->click("{$base}submit1"); + $this->pause(250); + $this->type("{$base}picker1", "13/4/$year"); + $this->select("{$base}picker2_month", "label=9"); + $this->select("{$base}picker2_day", "label=10"); + $this->select("{$base}picker2_year", "label=$year"); + $this->pause(250); + $this->type("{$base}picker3", "14/4/$year"); + $this->pause(250); + $this->type("{$base}picker4", "7/4/$year"); + $this->select("{$base}picker5_day", "label=6"); + $this->select("{$base}picker5_month", "label=3"); + $this->select("{$base}picker5_year", "label=$year2"); + $this->select("{$base}picker6_month", "label=3"); + $this->select("{$base}picker6_year", "label=$year2"); + $this->select("{$base}picker6_day", "label=5"); + + $this->click("{$base}submit1"); + + $this->assertNotVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + $this->assertNotVisible("{$base}validator4", ""); + $this->assertNotVisible("{$base}validator5", ""); + $this->assertVisible("{$base}validator6", ""); + $this->assertVisible("{$base}validator8", ""); + + $this->type("{$base}picker1", "20/4/$year2"); + $this->type("{$base}picker4", "29/4/$year"); + $this->select("{$base}picker6_day", "label=10"); + + $this->clickAndWait("{$base}submit1"); + + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + $this->assertNotVisible("{$base}validator4", ""); + $this->assertNotVisible("{$base}validator5", ""); + $this->assertNotVisible("{$base}validator6", ""); + $this->assertNotVisible("{$base}validator8", ""); + } + +} + +?> diff --git a/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php b/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php index 1a4d88c1..a83c4f89 100644 --- a/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php +++ b/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php @@ -1,65 +1,65 @@ -<?php
-
-class ImageButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('validators/index.php?page=ImageButton');
-
-
- // verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
- $this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
-
- // verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the second validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
- $this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
-
- // verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
-
- // verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
- $this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
- }
-}
-
+<?php + +class ImageButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('validators/index.php?page=ImageButton'); + + + // verify all error messages are invisible + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validator shows the error + $this->click("ctl0_Content_ctl1"); + $this->verifyVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button1 is clicked'); + $this->type("ctl0_Content_TextBox1", "test"); + $this->clickAndWait("ctl0_Content_ctl1"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button1 is clicked and valid'); + + // verify the second validator shows the error + $this->click("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the second validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button2 is clicked'); + $this->type("ctl0_Content_TextBox2", "test"); + $this->clickAndWait("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button2 is clicked and valid'); + + // verify the third validator shows the error + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyVisible('ctl0_Content_ctl4'); + + // verify the third validation is passed + $this->verifyTextPresent('Button3 is clicked'); + $this->verifyTextNotPresent('Button3 is clicked and valid'); + $this->type("ctl0_Content_TextBox3", "test"); + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button3 is clicked and valid'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php b/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php index 47122442..fa9508fb 100644 --- a/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php +++ b/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php @@ -1,64 +1,64 @@ -<?php
-
-class LinkButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('validators/index.php?page=LinkButton');
-
- // verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the first validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
- $this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
-
- // verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
-
- // verify the second validation is passed
- $this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
- $this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
-
- // verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
-
- // verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
- $this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
- }
-}
-
+<?php + +class LinkButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('validators/index.php?page=LinkButton'); + + // verify all error messages are invisible + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validator shows the error + $this->click("ctl0_Content_ctl1"); + $this->verifyVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the first validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button1 is clicked'); + $this->type("ctl0_Content_TextBox1", "test"); + $this->clickAndWait("ctl0_Content_ctl1"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button1 is clicked and valid'); + + // verify the second validator shows the error + $this->click("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + + // verify the second validation is passed + $this->pause(500); + $this->verifyTextNotPresent('Button2 is clicked'); + $this->type("ctl0_Content_TextBox2", "test"); + $this->clickAndWait("ctl0_Content_ctl3"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button2 is clicked and valid'); + + // verify the third validator shows the error + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyVisible('ctl0_Content_ctl4'); + + // verify the third validation is passed + $this->verifyTextPresent('Button3 is clicked'); + $this->verifyTextNotPresent('Button3 is clicked and valid'); + $this->type("ctl0_Content_TextBox3", "test"); + $this->clickAndWait("ctl0_Content_ctl5"); + $this->verifyNotVisible('ctl0_Content_ctl0'); + $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->verifyNotVisible('ctl0_Content_ctl4'); + $this->verifyTextPresent('Button3 is clicked and valid'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/ListControlTestCase.php b/tests/FunctionalTests/validators/tests/ListControlTestCase.php index 37f35d1b..e4281794 100644 --- a/tests/FunctionalTests/validators/tests/ListControlTestCase.php +++ b/tests/FunctionalTests/validators/tests/ListControlTestCase.php @@ -1,51 +1,51 @@ -<?php
-/*
- * Created on 24/04/2006
- */
-
-class ListControlTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=ListControl", "");
- $this->verifyTextPresent("List Control Required Field Validation Test", "");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
-
- $this->assertVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- $this->assertVisible("{$base}validator3");
- $this->assertVisible("{$base}validator4");
-
- $this->click("//input[@id='{$base}list1_c1' and @value='Red']", "");
- $this->select("{$base}list2", "label=Red");
- $this->select("{$base}list3", "label=Blue");
- $this->click("{$base}list4_c3", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit!']", "");
-
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
- $this->assertNotVisible("{$base}validator4");
-
- $this->select("{$base}list3", "label=Don't select this one");
- $this->click("{$base}list4_c0");
- $this->select("{$base}list2", "label=--- Select a color ---");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
- $this->click("//input[@id='{$base}list1_c1' and @value='Red']", "");
- $this->click("//input[@id='{$base}list1_c0' and @value='Select a color below']", "");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
-
- $this->assertVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- $this->assertVisible("{$base}validator3");
- $this->assertVisible("{$base}validator4");
-
- }
-
-}
-
-?>
+<?php +/* + * Created on 24/04/2006 + */ + +class ListControlTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=ListControl", ""); + $this->verifyTextPresent("List Control Required Field Validation Test", ""); + $this->click("//input[@type='submit' and @value='Submit!']", ""); + + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + $this->assertVisible("{$base}validator4"); + + $this->click("//input[@id='{$base}list1_c1' and @value='Red']", ""); + $this->select("{$base}list2", "label=Red"); + $this->select("{$base}list3", "label=Blue"); + $this->click("{$base}list4_c3", ""); + $this->clickAndWait("//input[@type='submit' and @value='Submit!']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->assertNotVisible("{$base}validator4"); + + $this->select("{$base}list3", "label=Don't select this one"); + $this->click("{$base}list4_c0"); + $this->select("{$base}list2", "label=--- Select a color ---"); + $this->click("//input[@type='submit' and @value='Submit!']", ""); + $this->click("//input[@id='{$base}list1_c1' and @value='Red']", ""); + $this->click("//input[@id='{$base}list1_c0' and @value='Select a color below']", ""); + $this->click("//input[@type='submit' and @value='Submit!']", ""); + + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + $this->assertVisible("{$base}validator4"); + + } + +} + +?> diff --git a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php index c22ecf8b..31ad6c23 100644 --- a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php @@ -1,167 +1,167 @@ -<?php
-
-//New Test
-class RangeValidatorTestCase extends SeleniumTestCase
-{
- function testIntegerRange()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorInteger", "");
- $this->verifyTextPresent("Prado RangeValidator Tests Integer", "");
-
- //between 1 and 4
- $this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "12");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "2");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
- // >= 2
- $this->assertNotVisible("{$base}validator2", "");
- $this->type("{$base}text2", "1");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
- $this->type("{$base}text2", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- // <= 20
- $this->assertNotVisible("{$base}validator3", "");
- $this->type("{$base}text3", "100");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
- $this->type("{$base}text3", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
-
- }
-
- function testFloatRange()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorFloat", "");
- $this->verifyTextPresent("Prado RangeValidator Tests Float", "");
-
- //between 1 and 4
- $this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "12");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "2");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
- // >= 2
- $this->assertNotVisible("{$base}validator2", "");
- $this->type("{$base}text2", "1");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
- $this->type("{$base}text2", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- // <= 20
- $this->assertNotVisible("{$base}validator3", "");
- $this->type("{$base}text3", "100");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
- $this->type("{$base}text3", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
- }
-
- function testDateRange()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorDate", "");
- $this->verifyTextPresent("Prado RangeValidator Tests Date", "");
-
- //between 22/1/2005 and 3/2/2005
- $this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "27/2/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "1/2/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
- // >= 22/1/2005
- $this->assertNotVisible("{$base}validator2", "");
- $this->type("{$base}text2", "1/1/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->pause(250);
- $this->assertVisible("{$base}validator2", "");
- $this->type("{$base}text2", "1/4/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- // <= 3/2/2005
- $this->assertNotVisible("{$base}validator3", "");
- $this->type("{$base}text3", "4/5/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->pause(250);
- $this->assertVisible("{$base}validator3", "");
- $this->type("{$base}text3", "1/2/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
- }
-
- function testStringRange()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorString", "");
- $this->verifyTextPresent("Prado RangeValidator Tests String", "");
-
- //between 'd' and 'y'
- $this->type("{$base}text1", "a");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "b");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "f");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
- // >= 'd'
- $this->assertNotVisible("{$base}validator2", "");
- $this->type("{$base}text2", "a");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
- $this->type("{$base}text2", "g");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- // <= 'y'
- $this->assertNotVisible("{$base}validator3", "");
- $this->type("{$base}text3", "z");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
- $this->type("{$base}text3", "t");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
- }
-}
-
-?>
+<?php + +//New Test +class RangeValidatorTestCase extends SeleniumTestCase +{ + function testIntegerRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorInteger", ""); + $this->verifyTextPresent("Prado RangeValidator Tests Integer", ""); + + //between 1 and 4 + $this->type("{$base}text1", "ad"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "12"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "2"); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 2 + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 20 + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "100"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + + } + + function testFloatRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorFloat", ""); + $this->verifyTextPresent("Prado RangeValidator Tests Float", ""); + + //between 1 and 4 + $this->type("{$base}text1", "ad"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "12"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "2"); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 2 + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 20 + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "100"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + } + + function testDateRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorDate", ""); + $this->verifyTextPresent("Prado RangeValidator Tests Date", ""); + + //between 22/1/2005 and 3/2/2005 + $this->type("{$base}text1", "ad"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "27/2/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "1/2/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 22/1/2005 + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1/1/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->pause(250); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1/4/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 3/2/2005 + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "4/5/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->pause(250); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "1/2/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + } + + function testStringRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorString", ""); + $this->verifyTextPresent("Prado RangeValidator Tests String", ""); + + //between 'd' and 'y' + $this->type("{$base}text1", "a"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "b"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "f"); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 'd' + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "a"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "g"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 'y' + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "z"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "t"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + } +} + +?> diff --git a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php index 751ab80a..40719cf3 100644 --- a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php @@ -1,34 +1,34 @@ -<?php
-
-//New Test
-class RegExpValidatorTestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RegularExpressionValidator", "");
- $this->verifyTextPresent("Prado RegularExpressionValidator Tests", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->type("{$base}text1", "1");
- $this->type("{$base}text2", "2");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
- $this->type("{$base}text1", "asdasd");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->type("{$base}text1", "12345");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
- $this->type("{$base}text2", "wei@gmail.com");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
-
- }
-}
-
+<?php + +//New Test +class RegExpValidatorTestCase extends SeleniumTestCase +{ + function test() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RegularExpressionValidator", ""); + $this->verifyTextPresent("Prado RegularExpressionValidator Tests", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text1", "1"); + $this->type("{$base}text2", "2"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text1", "asdasd"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "12345"); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "wei@gmail.com"); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php index 5ba23133..69765238 100644 --- a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php +++ b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php @@ -1,90 +1,90 @@ -<?php
-
-class RequiredFieldTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RequiredFieldValidator");
- $this->assertTextPresent("RequiredFieldValidator Tests");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- $this->type("{$base}text1", "testing");
- $this->click("{$base}submit1");
- $this->assertNotVisible("{$base}validator1");
- $this->click("{$base}submit2");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertVisible("{$base}validator3");
- $this->assertVisible("{$base}validator4");
- $this->type("{$base}text2", "testing2");
- $this->click("{$base}submit2");
- $this->assertNotVisible("{$base}validator3");
- $this->click("{$base}submit3");
- $this->assertVisible("{$base}summary3");
- $this->clickAndWait("{$base}submit4");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
- $this->assertNotVisible("{$base}validator4");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit2");
- $this->assertVisible("{$base}validator4");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->type("{$base}text1");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- $this->click("{$base}check2");
- $this->clickAndWait("{$base}submit2");
-
- $this->type("{$base}text1", "Hello");
- $this->click("{$base}check1");
- $this->click("{$base}submit2");
-
- $this->assertNotVisible("{$base}validator5");
- $this->assertNotVisible("{$base}validator6");
- $this->assertNotVisible("{$base}validator7");
- $this->assertNotVisible("{$base}validator8");
- $this->type("{$base}text1");
- $this->type("{$base}text2");
- $this->click("{$base}check1");
- $this->click("{$base}check2");
- $this->click("{$base}submit3");
- $this->assertVisible("{$base}validator5");
- $this->assertVisible("{$base}validator6");
- $this->assertVisible("{$base}validator7");
- $this->assertVisible("{$base}validator8");
- $this->clickAndWait("{$base}submit4");
- $this->assertNotVisible("{$base}validator5");
- $this->assertNotVisible("{$base}validator6");
- $this->assertNotVisible("{$base}validator7");
- $this->assertNotVisible("{$base}validator8");
- }
-
- function testInitialValue()
- {
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RequiredFieldValidator");
- $this->assertTextPresent("InitialValue Test");
- $this->assertNotVisible("{$base}validator9");
- $this->click("{$base}submit5");
- $this->pause(250);
- $this->assertVisible("{$base}validator9");
- $this->type("{$base}text5", "adasd");
- $this->pause(250);
- $this->assertNotVisible("{$base}validator9");
- }
-}
+<?php + +class RequiredFieldTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RequiredFieldValidator"); + $this->assertTextPresent("RequiredFieldValidator Tests"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->type("{$base}text1", "testing"); + $this->click("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->click("{$base}submit2"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + $this->assertVisible("{$base}validator4"); + $this->type("{$base}text2", "testing2"); + $this->click("{$base}submit2"); + $this->assertNotVisible("{$base}validator3"); + $this->click("{$base}submit3"); + $this->assertVisible("{$base}summary3"); + $this->clickAndWait("{$base}submit4"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->assertNotVisible("{$base}validator4"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator2"); + $this->click("{$base}check1"); + $this->click("{$base}submit2"); + $this->assertVisible("{$base}validator4"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->type("{$base}text1"); + $this->click("{$base}check1"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->click("{$base}check2"); + $this->clickAndWait("{$base}submit2"); + + $this->type("{$base}text1", "Hello"); + $this->click("{$base}check1"); + $this->click("{$base}submit2"); + + $this->assertNotVisible("{$base}validator5"); + $this->assertNotVisible("{$base}validator6"); + $this->assertNotVisible("{$base}validator7"); + $this->assertNotVisible("{$base}validator8"); + $this->type("{$base}text1"); + $this->type("{$base}text2"); + $this->click("{$base}check1"); + $this->click("{$base}check2"); + $this->click("{$base}submit3"); + $this->assertVisible("{$base}validator5"); + $this->assertVisible("{$base}validator6"); + $this->assertVisible("{$base}validator7"); + $this->assertVisible("{$base}validator8"); + $this->clickAndWait("{$base}submit4"); + $this->assertNotVisible("{$base}validator5"); + $this->assertNotVisible("{$base}validator6"); + $this->assertNotVisible("{$base}validator7"); + $this->assertNotVisible("{$base}validator8"); + } + + function testInitialValue() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RequiredFieldValidator"); + $this->assertTextPresent("InitialValue Test"); + $this->assertNotVisible("{$base}validator9"); + $this->click("{$base}submit5"); + $this->pause(250); + $this->assertVisible("{$base}validator9"); + $this->type("{$base}text5", "adasd"); + $this->pause(250); + $this->assertNotVisible("{$base}validator9"); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php index 9f652583..2151e492 100644 --- a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php +++ b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php @@ -1,43 +1,43 @@ -<?php
-
-class RequiredListTestCase extends SeleniumTestCase
-{
-
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $base = "ctl0_Content_";
- $this->open("validators/index.php?page=RequiredListValidator");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1");
- $this->assertVisible("{$base}validator2");
- $this->assertVisible("{$base}validator3");
- $this->click("{$base}list1_c0");
- $this->addSelection("{$base}list2", "label=One");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list1_c1");
- $this->click("{$base}list1_c2");
- $this->click("{$base}list1_c3");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list1_c3");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
- $this->pause(200);
- $this->assertNotVisible("{$base}validator1");
- $this->assertNotVisible("{$base}validator2");
- $this->assertNotVisible("{$base}validator3");
- }
-}
-
+<?php + +class RequiredListTestCase extends SeleniumTestCase +{ + + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RequiredListValidator"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + $this->click("{$base}list1_c0"); + $this->addSelection("{$base}list2", "label=One"); + $this->addSelection("{$base}list2", "label=Two"); + $this->click("{$base}list3_c3"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->click("{$base}list1_c1"); + $this->click("{$base}list1_c2"); + $this->click("{$base}list1_c3"); + $this->addSelection("{$base}list2", "label=Two"); + $this->click("{$base}list1_c3"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->click("{$base}list3_c3"); + $this->clickAndWait("{$base}submit1"); + $this->pause(200); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php index 3b6225f3..802392ac 100644 --- a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php +++ b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php @@ -1,50 +1,50 @@ -<?php
-
-//New Test
-class ValidationSummaryTestCase extends SeleniumTestCase
-{
- function test()
- {
- $base = "ctl0_Content_";
-
- $this->open("validators/index.php?page=ValidationSummary", "");
- $this->verifyTextPresent("Validation Summary Test", "");
- //$this->verifyText("{$base}summary1", "");
- //$this->verifyText("{$base}summary2", "");
-
- $this->click("//input[@type='submit' and @value='Create New Account']", "");
- $this->assertVisible("{$base}summary1");
- $this->assertNotVisible("{$base}summary2");
-
- $this->click("//input[@type='submit' and @value='Sign In']", "");
- $this->assertNotVisible("{$base}summary1");
- $this->assertVisible("{$base}summary2");
-
- $this->type("{$base}Username", "qwe");
- $this->type("{$base}Password", "ewwq");
- $this->click("//input[@type='submit' and @value='Sign In']", "");
- $this->assertNotVisible("{$base}summary1");
- $this->assertVisible("{$base}summary2");
-
- /*$this->clickAndWait("//input[@type='submit' and @value='Create New Account']", "");
- $this->type("{$base}UserID", "123");
- $this->type("{$base}Pass", "123");
- $this->clickAndWait("//input[@type='submit' and @value='Sign In']", "");
- //$this->verifyText("{$base}summary1", "");
- //$this->verifyText("{$base}summary2", "");
- $this->clickAndWait("//input[@type='submit' and @value='Create New Account']", "");
- //$this->verifyText("{$base}summary1", "");
- //$this->verifyText("{$base}summary2", "");
-
- $this->type("{$base}Password", "");
- $this->click("//input[@type='submit' and @value='Create New Account']", "");
- $this->assertVisible("{$base}summary1");
- $this->assertNotVisible("{$base}summary2");
-
- $this->type("{$base}Password", "12312");
- $this->assertVisible("{$base}summary1");
- */
- }
-}
-
+<?php + +//New Test +class ValidationSummaryTestCase extends SeleniumTestCase +{ + function test() + { + $base = "ctl0_Content_"; + + $this->open("validators/index.php?page=ValidationSummary", ""); + $this->verifyTextPresent("Validation Summary Test", ""); + //$this->verifyText("{$base}summary1", ""); + //$this->verifyText("{$base}summary2", ""); + + $this->click("//input[@type='submit' and @value='Create New Account']", ""); + $this->assertVisible("{$base}summary1"); + $this->assertNotVisible("{$base}summary2"); + + $this->click("//input[@type='submit' and @value='Sign In']", ""); + $this->assertNotVisible("{$base}summary1"); + $this->assertVisible("{$base}summary2"); + + $this->type("{$base}Username", "qwe"); + $this->type("{$base}Password", "ewwq"); + $this->click("//input[@type='submit' and @value='Sign In']", ""); + $this->assertNotVisible("{$base}summary1"); + $this->assertVisible("{$base}summary2"); + + /*$this->clickAndWait("//input[@type='submit' and @value='Create New Account']", ""); + $this->type("{$base}UserID", "123"); + $this->type("{$base}Pass", "123"); + $this->clickAndWait("//input[@type='submit' and @value='Sign In']", ""); + //$this->verifyText("{$base}summary1", ""); + //$this->verifyText("{$base}summary2", ""); + $this->clickAndWait("//input[@type='submit' and @value='Create New Account']", ""); + //$this->verifyText("{$base}summary1", ""); + //$this->verifyText("{$base}summary2", ""); + + $this->type("{$base}Password", ""); + $this->click("//input[@type='submit' and @value='Create New Account']", ""); + $this->assertVisible("{$base}summary1"); + $this->assertNotVisible("{$base}summary2"); + + $this->type("{$base}Password", "12312"); + $this->assertVisible("{$base}summary1"); + */ + } +} + ?>
\ No newline at end of file |