diff options
author | xue <> | 2006-04-27 03:03:57 +0000 |
---|---|---|
committer | xue <> | 2006-04-27 03:03:57 +0000 |
commit | cb01c9389c481ea9bf09eecbed9102b623f87d62 (patch) | |
tree | 9fbaba3809ef09862ba585d57c25014e559b1a77 | |
parent | f4437c190074be283d9297f8e2ad54bbb055bf2d (diff) |
Added more FT.
12 files changed, 274 insertions, 3 deletions
diff --git a/.gitattributes b/.gitattributes index 7de019bb..7b1781d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -874,20 +874,29 @@ tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php -text tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php -text tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php -text tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php -text +tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php -text +tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php -text tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php -text tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php -text tests/FunctionalTests/quickstart/Controls/ImageTestCase.php -text tests/FunctionalTests/quickstart/Controls/LabelTestCase.php -text tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php -text tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php -text +tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php -text tests/FunctionalTests/quickstart/Controls/PanelTestCase.php -text tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php -text tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php -text tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php -text tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php -text tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php -text +tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php -text tests/FunctionalTests/quickstart/Controls/TableTestCase.php -text tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php -text +tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php -text +tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php -text +tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php -text +tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php -text +tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php -text tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php -text tests/FunctionalTests/selenium/SeleneseRunner.html -text tests/FunctionalTests/selenium/SeleniumLog.html -text diff --git a/demos/quickstart/protected/pages/Controls/Samples/TMultiView/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TMultiView/Home.page index b0e2386d..7cc98ce6 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TMultiView/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TMultiView/Home.page @@ -5,8 +5,8 @@ <com:TMultiView ID="MultiView" ActiveViewIndex="0" OnActiveViewChanged="viewChanged">
<com:TView ID="View1">
<h2>View 1</h2>
- <p>Please enter a paragraph:</p>
- <com:THtmlArea ID="Memo" />
+ <p>Please enter a memo:</p>
+ <com:TTextBox ID="Memo" />
<hr/>
<com:TButton Text="View 2" CommandName="NextView" />
<com:TButton Text="View 3" CommandName="SwitchViewIndex" CommandParameter="2" />
diff --git a/framework/Web/UI/WebControls/TLiteral.php b/framework/Web/UI/WebControls/TLiteral.php index f335499f..60e4a6f6 100644 --- a/framework/Web/UI/WebControls/TLiteral.php +++ b/framework/Web/UI/WebControls/TLiteral.php @@ -80,7 +80,7 @@ class TLiteral extends TControl $writer->write($text);
}
else
- parent::renderContents($writer);
+ parent::render($writer);
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php new file mode 100644 index 00000000..dfa1036f --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php @@ -0,0 +1,15 @@ +<?php
+
+class ExpressionTestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&notheme=true", "");
+
+ $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 new file mode 100644 index 00000000..212ff6b9 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php @@ -0,0 +1,15 @@ +<?php
+
+class HtmlAreaTestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&notheme=true", "");
+
+ $this->verifyTitle("PRADO QuickStart Sample", "");
+
+ // can't perform any test
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php new file mode 100644 index 00000000..c94a325c --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php @@ -0,0 +1,38 @@ +<?php
+
+class MultiViewTestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&notheme=true", "");
+
+ $this->verifyTitle("PRADO QuickStart Sample", "");
+
+ // view 1 : type in a string
+ $this->verifyNotVisible('ctl0_body_Result1');
+ $this->verifyNotVisible('ctl0_body_Result2');
+ $this->type('ctl0_body_Memo','test');
+ $this->clickAndWait('ctl0$body$ctl1');
+
+ // 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->verifyNotVisible('ctl0_body_Result1');
+ $this->verifyNotVisible('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/StatementsTestCase.php b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php new file mode 100644 index 00000000..93844296 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php @@ -0,0 +1,15 @@ +<?php
+
+class StatementsTestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&notheme=true", "");
+
+ $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/Wizard1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php new file mode 100644 index 00000000..ea071612 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php @@ -0,0 +1,26 @@ +<?php
+
+class Wizard1TestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&notheme=true", "");
+
+ $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$ctl8$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 new file mode 100644 index 00000000..ca94bb19 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php @@ -0,0 +1,26 @@ +<?php
+
+class Wizard2TestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&notheme=true", "");
+
+ $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$ctl8$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 new file mode 100644 index 00000000..807e7dc6 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php @@ -0,0 +1,46 @@ +<?php
+
+class Wizard3TestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true", "");
+
+ $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$ctl8$ctl0');
+
+ // step 2
+ $this->select('ctl0$body$Wizard3$DropDownList11', "label=Chemistry");
+ $this->clickAndWait('ctl0$body$Wizard3$ctl9$ctl1');
+
+ // step 3
+ $this->select('ctl0$body$Wizard3$DropDownList22', "label=Tennis");
+ $this->clickAndWait('ctl0$body$Wizard3$ctl10$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$ctl8$ctl0');
+
+ // step 3
+ $this->select('ctl0$body$Wizard3$DropDownList22', "label=Baseball");
+ $this->clickAndWait('ctl0$body$Wizard3$ctl10$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 new file mode 100644 index 00000000..41fd7dd2 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php @@ -0,0 +1,44 @@ +<?php
+
+class Wizard4TestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&notheme=true", "");
+
+ $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 new file mode 100644 index 00000000..e25ce86d --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php @@ -0,0 +1,37 @@ +<?php
+
+class Wizard5TestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&notheme=true", "");
+
+ $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$ctl6$ctl0');
+
+ // step 2
+ $this->select('ctl0_body_Wizard1_Step2_DropDownList2','label=Football');
+ $this->clickAndWait('ctl0$body$Wizard1$ctl8$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$ctl8$ctl1');
+
+ // step 3
+ $this->verifyTextPresent('Your favorite color is: Cyan');
+ $this->verifyTextPresent('Your favorite sport is: Football');
+ }
+}
+
+?>
\ No newline at end of file |