summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/quickstart')
-rw-r--r--tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php15
-rw-r--r--tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php15
-rw-r--r--tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php38
-rw-r--r--tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php15
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php26
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php26
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php46
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php44
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php37
9 files changed, 262 insertions, 0 deletions
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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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