diff options
Diffstat (limited to 'tests/FunctionalTests/active-controls')
96 files changed, 770 insertions, 781 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page index 7cb8c6b3..f3df76a2 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page @@ -1,4 +1,4 @@ -<com:TForm> +<com:TContent ID="Content"> <h3 class="ContentAlternating">Some AJAX Tests</h3> <com:TPanel CssClass="Content"> @@ -37,6 +37,4 @@ AIP </com:TActivePanel> - <com:TJavascriptLogger /> - -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page index 2e192c19..9e293934 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>TActiveButton Functional Test</h1> <com:TActiveButton ID="button2" Text="Button 1" @@ -6,6 +6,4 @@ <com:TActiveLabel ID="label1" Text="Label 1" /> - <com:TJavascriptLogger /> - -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page index 431d42f2..297cde15 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Active CheckBox Test</h1> <com:TActiveCheckBox ID="checkbox1" Text="CheckBox 1" OnCallback="checkbox_requested" /> <com:TActiveCheckBox ID="checkbox2" Text="CheckBox 2" OnCallback="checkbox_requested"> @@ -25,5 +25,4 @@ position: absolute; right: 0; top: 0"> Loading... </div> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page index 7b983cd7..5a1c5023 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Active Control With Expression Tag Test</h1>
@@ -22,6 +22,5 @@ <com:TActiveButton ID="button2" Text="Show More!" Enabled="false"
OnCallback="button2_callback" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page index aa3be754..9a561458 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Active Control with TinyMCE</h1>
<com:THtmlArea ID="text1" />
@@ -7,5 +7,4 @@ <com:TActiveLabel ID="label1" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page index 88117744..ce40e1cb 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page @@ -1,15 +1,12 @@ -<html> -<com:THead/> -<body> -<com:TForm> +<com:TContent ID="Content"> <h1>TActiveDatePicker test</h1> <p> -<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/> <com:TActiveLabel ID="status" /><br/> <com:TActiveButton ID="decreaseButton" OnClick="decrease" Text="-1" OnCallback="testDatePicker"/> <com:TActiveButton ID="todayButton" OnClick="today" Text="Today" OnCallback="testDatePicker"/> <com:TActiveButton ID="increaseButton" OnClick="increase" Text="+1" OnCallback="testDatePicker"/> <com:TButton ID="toggleButton" OnClick="toggleMode" Text="Toggle input mode (postback)"/> +<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/> </p> <p> ShowCalendar=false @@ -23,6 +20,4 @@ ShowCalendar=false <com:TActiveDatePicker ID="datepicker3" DateFormat="MMMM/yyyy" OnCallback="testDatePicker3" InputMode="DropDownList" ShowCalendar="true"/> <com:TActiveLabel ID="status3" /><br/> -</com:TForm> -</body> -</html>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page index dc71a228..bf15ba0e 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Active Drop Down List Test Case</h1> <com:TActiveDropDownList ID="list1" AutoPostBack="true" SelectedIndex="0" OnSelectedIndexChanged="list1_changed"> @@ -26,6 +26,4 @@ <com:TButton ID="button5" Text="Post Back" OnClick="do_postback"/> </div> - <com:TJavascriptLogger /> - -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page index f0fc4b92..317da643 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page @@ -1,9 +1,9 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Active HiddenField Test Case</h1> - + <com:TActiveHiddenField ID="HiddenFieldEmpty" /> <com:TActiveHiddenField ID="HiddenFieldUsed" Value="My value" /> - + <div> <com:TActiveButton ID="Button1" Text="Set value to HiddenFieldEmpty" OnClick="onSetValue" /> <com:TActiveButton ID="Button2" Text="Get value from HiddenFieldUsed" OnClick="onGetValue" /> @@ -12,5 +12,4 @@ <div> <com:TActiveLabel ID="ResponseLabel" Text="Value of current hidden field" /> </div> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page index 59098052..9b149b45 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page @@ -1,6 +1,6 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Active HyperLink Test Case</h1> - + <div style="margin:1em; padding:1em; border:1px solid #ccc; text-align:center;"> <com:TActiveHyperLink ID="link1" Text="Link 1" NavigateUrl="http://www.pradosoft.com" /> </div> @@ -8,6 +8,4 @@ <com:TActiveButton ID="button2" Text="Change Image" OnClick="change_image" /> <com:TActiveButton ID="button3" Text="Change Target" OnClick="change_target" /> <com:TActiveButton ID="button4" Text="Change URL" OnClick="change_url" /> - - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page index 7696261a..15cf2380 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveImageButton Functional Test</h1>
@@ -19,6 +19,4 @@ <com:TActiveButton ID="button3" Text="Change Align" OnClick="change_align" />
<com:TActiveButton ID="button4" Text="Change Description" OnClick="change_description" />
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page index cb9f0322..16ea578d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveLinkButton Functional Test</h1>
<com:TActiveLinkButton ID="button2" Text="Button 1"
@@ -6,6 +6,4 @@ <com:TActiveLabel ID="label1" Text="Label 1" />
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page index f7c6baaf..115b833a 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page @@ -23,6 +23,4 @@ <com:TActiveButton ID="button6" Text="Change to Multi-Select" OnClick="change_to_multiple" />
<com:TActiveButton ID="button7" Text="Change to Single-Select" OnClick="change_to_single" />
</div>
-
- <com:TJavascriptLogger />
</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page index 318d53c3..2bf480b4 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active List Box Functional Test</h1>
@@ -22,6 +22,4 @@ <com:TActiveButton ID="button6" Text="Change to Multi-Select" OnClick="change_to_multiple" />
<com:TActiveButton ID="button7" Text="Change to Single-Select" OnClick="change_to_single" />
</div>
-
- <com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page index 7ab4bab9..573c6e8b 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Active Panel replacement tests </h1> <com:TCallback ID="callback1" OnCallback="callback1_requested" /> <com:TActivePanel ID="panel1"> @@ -9,14 +9,11 @@ <div id="div1" style="border:1px solid #666; background-color: #ffe; text-align: center; padding:3em"> Click Me! </div> - <script type="text/javascript"> - Event.OnLoad(function() - { - Event.observe($("div1"), "click", function() - { - Prado.Callback("<%= $this->callback1->UniqueID %>") - }) - }) - </script> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file + <com:TClientScript> + jQuery( document ).ready(function() { + jQuery("#div1").click(function() { + Prado.Callback("<%= $this->callback1->UniqueID %>"); + }); + }); + </com:TClientScript> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page index 0795e46b..93684bef 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>ActivePanel Visible Test</h1>
@@ -12,6 +12,5 @@ <com:TActivePanel ID="pnlB">bar</com:TActivePanel>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page index 26feb594..e222a70f 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRadioButtonList Test Case</h1>
<com:TActiveRadioButtonList ID="list1" OnCallback="list1_callback">
@@ -17,6 +17,4 @@ <com:TActiveButton ID="button4" Text="Select Index 4" OnClick="select_index_4" />
</div>
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page index 2bb4c9de..66587943 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active Radio Button Test</h1>
<com:TActiveRadioButton ID="radio1"
GroupName="group1" Text="Radio Button 1"
@@ -34,5 +34,4 @@ position: absolute; right: 0; top: 0">
Loading...
</div>
- <com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page index 35fcadc7..d3c551b4 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList AllowInput Test Case</h1>
<com:TActiveRatingList ID="RatingList" AllowInput="false"
OnSelectedIndexChanged="ratingChanged">
@@ -11,4 +10,4 @@ <com:TListItem Text="Super" />
</com:TActiveRatingList>
<com:TActiveLabel ID="Status" Text="AllowInput=false" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page index 84ce4ef3..e0d3cbbe 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList AutoPostBack Test Case</h1>
<com:TActiveRatingList ID="RatingList" AutoPostback="false"
OnSelectedIndexChanged="ratingChanged">
@@ -13,4 +12,4 @@ <com:TActiveLabel ID="Status" Text="AutoPostback=false" />
<br />
<com:TActiveButton ID="Submit" Text="Submit" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page index 36f4404d..cba50947 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Check Boxes Test Case</h1>
<com:TActiveRatingList ID="RatingList">
<com:TListItem Text="Poor" />
@@ -9,4 +8,4 @@ <com:TListItem Text="Excellent" />
<com:TListItem Text="Super" />
</com:TActiveRatingList>
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page index 5f732e0d..791176df 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Enabled Test Case</h1>
<com:TActiveRatingList ID="RatingList" Enabled="false"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@ <br />
<com:TActiveButton ID="Enable" Text="Enable" OnClick="enable" />
<com:TActiveButton ID="Disable" Text="Disable" OnClick="disable" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page index 01e47a34..0a2a5f50 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Hover Caption Test Case</h1>
<com:TActiveRatingList ID="RatingList" CaptionID="Status"
OnSelectedIndexChanged="ratingChanged" Rating="3.5">
@@ -11,4 +10,4 @@ <com:TListItem Text="Super" />
</com:TActiveRatingList>
<com:TActiveLabel ID="Status" Text="CaptionID='Status'" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page index 942a5b45..c9aed5b4 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Rating Test Case</h1>
<com:TActiveRatingList ID="RatingList" Rating="5"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@ <br />
<com:TActiveButton ID="SetRating" Text="Set Rating=3"
OnClick="setRating" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page index dad3fd6e..70220e58 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList ReadOnly Test Case</h1>
<com:TActiveRatingList ID="RatingList" ReadOnly="true"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@ <br />
<com:TActiveButton ID="Writable" Text="Writable" OnClick="writable" />
<com:TActiveButton ID="ReadOnly" Text="ReadOnly" OnClick="readOnly" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page index 6fb52822..ee26568d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList SelectedIndex Test Case</h1>
<com:TActiveRatingList ID="RatingList" SelectedIndex="1"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@ <br />
<com:TActiveButton ID="SetSelectedIndex" Text="Set SelectedIndex=5"
OnClick="setSelectedIndex" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page index 5f7959c5..8f4e175d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page @@ -1,8 +1,7 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Redirection Test</h1>
<com:TActiveButton Text="Redirect to Default Page" OnClick="button_clicked" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page index b05ce62e..50b244b5 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page @@ -1,6 +1,5 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>ActiveTextBox Callback Test</h1> <com:TActiveTextBox ID="textbox1" AutoPostBack="true" OnCallback="textbox1_callback" /> <com:TActiveLabel ID="label1" Text="Label 1" /> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page index 477764c3..98745b55 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <style> .autocomplete @@ -58,7 +58,7 @@ <li> << <span class="select"><%# $this->Data %></span> - >> + >> </li> </prop:Suggestions.ItemTemplate> </com:TAutoComplete> @@ -79,7 +79,7 @@ OnSuggest="suggestCountries" OnCallback="callback_requested" OnSuggestionSelected="suggestion_selected" - ResultPanel.CssClass="autocomplete" + ResultPanel.CssClass="autocomplete" MinChars="4" Frequency="2" /> <p><br /></p> @@ -91,5 +91,4 @@ <p><br /></p> <p><br /></p> <p><br /></p> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Calculator.page b/tests/FunctionalTests/active-controls/protected/pages/Calculator.page index 7a565658..e7b1f180 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/Calculator.page +++ b/tests/FunctionalTests/active-controls/protected/pages/Calculator.page @@ -1,17 +1,17 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Callback Enabled Calculator</h1> - + <com:TActiveTextBox id="a" /> + <com:TActiveTextBox id="b" /> = <com:TActiveTextBox id="c" /> - - <com:TActiveButton id="sum" - onclick="do_sum" + + <com:TActiveButton id="sum" + onclick="do_sum" text="Calculate!" /> - - <com:TRequiredFieldValidator + + <com:TRequiredFieldValidator ControlToValidate="a" ErrorMessage="left summand is required." ControlCssClass="required" @@ -27,5 +27,5 @@ ID="summary" HeaderText="Unable to calculate because" /> </div> - -</com:TForm>
\ No newline at end of file + +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Callback.page b/tests/FunctionalTests/active-controls/protected/pages/Callback.page index d8744760..f8489af3 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/Callback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/Callback.page @@ -1,15 +1,13 @@ -<com:TForm>
+<com:TContent ID="Content">
<com:TCallback ID="callback1" OnCallback="callback1_Requested" />
- <script type="text/javascript">
+ <script type="text/javascript">
function do_callback1()
- {
+ {
var callback = <%= $this->callback1->ActiveControl->Javascript %>;
callback.dispatch();
- }
- </script>
+ }
+ </script>
<div onclick="do_callback1()">Click Me!</div>
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page index a99fbf55..134e45cb 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<style>
.loader
{
@@ -37,6 +37,4 @@ <span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page index 3cecbade..5adc646f 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page @@ -1,27 +1,27 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>TCallbackOptions Test</h1> <com:TCallbackOptions ID="options1"> <prop:ClientSide.OnLoading> - $("status").show(); + $("#status").show(); </prop:ClientSide.OnLoading> <prop:ClientSide.OnComplete> - $("status").hide(); + $("#status").hide(); </prop:ClientSide.OnComplete> <prop:ClientSide.OnSuccess> - Element.update("label1", "Button 1 has returned"); + $("#label1").html("Button 1 has returned"); </prop:ClientSide.OnSuccess> </com:TCallbackOptions> <com:TActiveButton id="button1" Text="Button 1" ActiveControl.CallbackOptions="options1" /> <com:TActiveButton id="button2" Text="Button 2" ActiveControl.CallbackOptions="options1"> <prop:ClientSide.OnSuccess> - Element.update("label2", "Button 2 has returned"); + $("#label2").html("Button 2 has returned"); </prop:ClientSide.OnSuccess> </com:TActiveButton> <com:TActiveButton id="button3" Text="Button 3"> <prop:ClientSide.OnSuccess> - Element.update("label3", "Button 3 has returned"); + $("#label3").html("Button 3 has returned"); </prop:ClientSide.OnSuccess> </com:TActiveButton> @@ -31,4 +31,4 @@ <div id="status" style="display:none; background-color: #c00; color:white; text-align:center; padding: 1em" > Loading... </div> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page index acf56bfe..3b5ed15f 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<com:TCallback ID="callback1" OnCallback="method1" />
@@ -7,21 +7,20 @@ var link1 = Prado.CallbackRequest.getRequestById('<%= $this->link1->ClientID %>');
Prado.Callback('<%= $this->callback1->UniqueID %>', link1.getCallbackParameter());
</prop:ClientSide.OnSuccess>
-
+
</com:TCallbackOptions>
- <com:TActiveLinkButton
+ <com:TActiveLinkButton
ID="link1"
- Text="Tab 1"
- OnCallback="method2"
- ActiveControl.CallbackParameter="test"
+ Text="Tab 1"
+ OnCallback="method2"
+ ActiveControl.CallbackParameter="test"
ActiveControl.CallbackOptions="options1"/>
<com:TActiveLabel ID="status1" />
<com:TActiveLabel ID="status2" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page b/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page index f0f3044d..2dc07852 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page @@ -1,10 +1,10 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Control Adapter - State Tracking Tests</h1> <com:TActiveButton ID="button1" Text="Test Button 1" /> - <com:TActiveButton ID="button2" Text="Test Button 2" + <com:TActiveButton ID="button2" Text="Test Button 2" Attributes.onclick="alert('ok')" Style.Font.Size="12" Style.BackColor="blue" Style.Height="2em" /> - + <div style="margin:1em; padding: 0.5em; border:1px solid #ccc; text-align:center"> <com:TActiveButton ID="test1" Text="Enable/Disable Button 1" OnClick="change_enabled"/> <com:TActiveButton ID="test2" Text="Hide/Show Button 1" OnClick="change_visible"/> @@ -19,5 +19,4 @@ <com:TActiveButton ID="test8" Text="Change Button 1 Attributes" OnClick="change_attributes1"/> <com:TActiveButton ID="test9" Text="Change Button 2 Attributes" OnClick="change_attributes2"/> </div> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page index 3bed7d5b..cd34ff98 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Add Dynamic Custom TTemplateControl Test</h1>
<com:TActivePanel ID="Foo">
@@ -10,7 +10,4 @@ <com:TActivePanel ID="placeholder" />
<com:TActiveLabel ID="label1" Text="Label 1" />
-
-
- <com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page index 08b7bb3e..0bebcd59 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page @@ -1,8 +1,8 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Custom Login</h1>
-<a id="showLogin" href="#" onclick="new Effect.Appear('loginBox')">Login</a>
+<a id="showLogin" href="#" onclick="$('#loginBox').fadeIn()">Login</a>
<div id="loginBox" style="display: none;">
<div style="height:1em">
@@ -10,29 +10,28 @@ </div>
<span>Username:</span><br />
<com:TActiveTextBox ID="Username" />
- <com:TRequiredFieldValidator
+ <com:TRequiredFieldValidator
ID="validator1"
- ControlToValidate="Username"
- ValidationGroup="login"
+ ControlToValidate="Username"
+ ValidationGroup="login"
Text="...is required" Display="Dynamic"/>
<br />
<span>Password:</span><br />
<com:TActiveTextBox TextMode="Password" ID="Password" />
- <com:TActiveCustomValidator
- ID="validator2"
- ControlToValidate="Password"
+ <com:TActiveCustomValidator
+ ID="validator2"
+ ControlToValidate="Password"
Text="*"
OnServerValidate="validateUser" ValidationGroup="login" />
<br />
<com:TActiveLinkButton ID="checkLogin" OnCallback="doLogin" Text="Login" ValidationGroup="login" />
- <a href="#" onclick="new Effect.Fade('loginBox')">Close</a>
+ <a href="#" onclick="$('#loginBox').fadeOut()">Close</a>
</div>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page index 8b39dc55..2f51eff2 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page @@ -1,7 +1,7 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>DatePicker in Callback</h1>
<com:TDatePicker ID="datepicker" />
<com:TActiveLinkButton OnCallback="testDatePicker" Text="testDatePicker" />
<com:TActiveLabel ID="status" />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page index b8fba648..f858e8eb 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page @@ -1,7 +1,6 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Delayed Callback Test</h1>
<com:TActiveButton ID="button1" Text="Delayed 4000" OnCallback="callback1" />
<com:TActiveButton ID="button2" Text="Delayed 2000" OnCallback="callback2" />
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page index df1db27a..c27ea397 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Display Style Test</h1>
<div>
@@ -17,6 +17,5 @@ here. <com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page index 913f6a17..26407827 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Dynamic Repeater Data Test</h1>
<com:TActiveButton Text="Click Me!" OnClick="button_clicked" OnCallback="button_callback"/>
@@ -11,6 +11,5 @@ </com:TRepeater>
</com:TActivePanel>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page index 889636f3..1adbaac1 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Event Triggered Callback Test</h1>
@@ -27,5 +27,4 @@ <div style="padding: 2em; border:1px solid #ccc; margin-top:2em">
<com:TActiveLabel ID="label1" Text="Label 1" />
</div>
- <com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page b/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page index eab14a87..a01e6b5e 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page @@ -1,3 +1,3 @@ -<com:TForm ID="form1"> - <com:TBulletedList ID="List" DisplayMode="HyperLink"/> -</com:TForm> +<com:TContent ID="Content"> + <com:TBulletedList ID="List" DisplayMode="HyperLink"/> +</com:TContent> diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page index f4bf644c..bf2b48b7 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page +++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page @@ -1,7 +1,7 @@ -<com:TForm>
+<com:TContent ID="Content">
<com:TLabel ForControl="DDropTurno" Text="Turno:"/>
-<com:TActiveDropDownList ID="DDropTurno"
+<com:TActiveDropDownList ID="DDropTurno"
onSelectedIndexChanged="trocaTurno" AutoPostBack="true"/>
<com:TLabel Text="Código:" ForControl="Codigo"/>
@@ -11,6 +11,5 @@ <com:TActiveTextBox ID="Descricao" MaxLength="25" Columns="25"/>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page index ba3a35db..e4fd93e9 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page +++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page @@ -1,4 +1,4 @@ -
+<com:TContent ID="Content">
<style>
.textbox
{
@@ -35,7 +35,6 @@ }
</style>
-<com:TForm>
<com:TInPlaceTextBox
ID="Firstname"
Text="firstname"
@@ -60,19 +59,18 @@ ValidationGroup="Group"
/>
<br />
- <com:TActiveButton ID="active_button"
- Text="Active Submit"
+ <com:TActiveButton ID="active_button"
+ Text="Active Submit"
ValidationGroup="Group"
CausesValidation="true"
OnCallback="button_valid"
- />
- <com:TButton ID="passive_button"
- Text="Passive Submit"
+ />
+ <com:TButton ID="passive_button"
+ Text="Passive Submit"
ValidationGroup="Group"
CausesValidation="true"
OnClick="button_valid"
- />
+ />
<br />
<com:TActiveLabel ID="status" Text="Status:" />
- <com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page index 701bd74c..b4798fe1 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page @@ -1,12 +1,11 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Large Page State Test</h1>
<com:TActiveButton Text="Show Changes" OnClick="button_clicked"/>
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
<com:TPanel ID="Panel1">
</com:TPanel>
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page index 0b662617..56ad075e 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page @@ -1,13 +1,12 @@ <%@ StatePersisterClass="System.Web.UI.TSessionPageStatePersister" %>
-<com:TForm>
+<com:TContent ID="Content">
<h1>Large Page State Test (using Session page state)</h1>
<com:TActiveButton Text="Show Changes" OnClick="button_clicked"/>
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
<com:TPanel ID="Panel1">
</com:TPanel>
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Layout.php b/tests/FunctionalTests/active-controls/protected/pages/Layout.php new file mode 100755 index 00000000..723f200c --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Layout.php @@ -0,0 +1,5 @@ +<?php + +class Layout extends TTemplateControl +{ +} diff --git a/tests/FunctionalTests/active-controls/protected/pages/Layout.tpl b/tests/FunctionalTests/active-controls/protected/pages/Layout.tpl new file mode 100755 index 00000000..ead6c66f --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Layout.tpl @@ -0,0 +1,38 @@ +<!DOCTYPE html PUBLIC + "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<com:THead Title="PRADO Functional Tests"> + <meta http-equiv="Content-type" content="text/html; charset=UTF-8" /> + <style type="text/css"> + /*<![CDATA[*/ + .defect + { + color: #c00; + font-size: 1.15em; + } + body + { + font-family: Georgia, "Times New Roman", Times, serif; + } + .w3c + { + margin-top: 2em; + display: block; + } + .required + { + border: 1px solid red; + background-color: pink; + } + /*]]>*/ + </style> +</com:THead> +<body> +<com:TForm> +<com:TContentPlaceHolder ID="Content" /> +<hr style="margin-top: 2em" /> +</com:TForm> +</body> +</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page index ab4798a8..33868332 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page @@ -1,7 +1,6 @@ -<com:TForm>
+<com:TContent ID="Content">
<com:Application.pages.DMessagesPanel ID="panel1" PanelCssClass="one1" />
<com:TActiveButton Text="Show" OnClick="show_clicked" />
<com:TActiveButton Text="Hide" OnClick="hide_clicked" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page index 7371086a..c877c083 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>My Tab Panel Test</h1>
@@ -36,6 +36,5 @@ This is the contents of panel C
</com:TActivePanel>
-<com:TJavascriptLogger />
-</com:TForm>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page index 9d3a3d61..a79c5afa 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page +++ b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page @@ -1,12 +1,12 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>Nested Active Controls Test</h1> <com:TCallback ID="callback1" OnCallback="callback1_requested" /> <com:TActivePanel ID="panel1"> <com:TPlaceHolder ID="content1" Visible="false"> - Something lalala + Something lalala <com:TActiveButton ID="button1" Text="Button 1" OnClick="button1_clicked" /> <com:TActiveLabel ID="label3" Text="Label 3" /> - + </com:TPlaceHolder> <com:TActiveLabel ID="label1" Text="Label 1" /> </com:TActivePanel> @@ -14,15 +14,12 @@ Click Me! </div> <com:TActiveLabel ID="label2" Text="Label 2" /> - <script type="text/javascript"> - Event.OnLoad(function() - { - Event.observe($("div1"), "click", function() - { - Prado.Callback("<%= $this->callback1->UniqueID %>") - }) - }) - </script> - <com:TJavascriptLogger /> - -</com:TForm> + <com:TClientScript> + jQuery( document ).ready(function() { + jQuery("#div1").click(function() { + Prado.Callback("<%= $this->callback1->UniqueID %>"); + }); + }); + </com:TClientScript> + +</com:TContent> diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page index 2ce98f5b..6b5ed334 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page @@ -1,10 +1,9 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Null State Test</h1>
<com:TActiveLabel ID="lblTest"/>
<com:TActiveButton OnCallback="btnTest_OnCallback" Text="Clickme"/>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page index c7bf0952..3ab9d8fb 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Populate active list controls</h1>
<com:TActiveListBox ID="list1" OnCallback="list_changed" />
@@ -12,6 +12,5 @@ <com:TActiveButton ID="button2" Text="populate list 2" OnClick="populate_list2" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page index 09ab2fbc..0a07c515 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1 id="heading">PostLoading Test</h1>
<com:TCallback ID="callback1" OnCallback="Page.callback1_requested" />
@@ -8,17 +8,11 @@ <div id="div1" style="border:1px solid #666; background-color: #ffe; text-align: center; padding:3em">
Click Me!
</div>
-
- <script type="text/javascript">
- Event.OnLoad(function()
- {
- Event.observe($("div1"), "click", function()
- {
- Prado.Callback("<%= $this->callback1->UniqueID %>")
- })
- })
- </script>
-
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file + <com:TClientScript>
+ jQuery( document ).ready(function() {
+ jQuery("#div1").click(function() {
+ Prado.Callback("<%= $this->callback1->UniqueID %>");
+ });
+ });
+ </com:TClientScript>
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page index 7de9c6ab..e1a2cb93 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<com:TRequiredFieldValidator
ControlToValidate="rad_button_list"
@@ -6,8 +6,8 @@ Display="Dynamic"
ValidationGroup="Group"
/>
- <br />
- <com:TActiveRadioButtonList
+ <br />
+ <com:TActiveRadioButtonList
ID="rad_button_list"
OnCallback="radChange">
<com:TListItem Value="yes" Text="Yes" />
@@ -16,15 +16,14 @@ </com:TActiveRadioButtonList>
<br />
<com:TActiveLabel
- ID="label"
+ ID="label"
Text="Choice : " />
<br /><br /><br />
<com:TActiveButton
ID="action_button"
Text="action"
OnCallback="action"
- ValidationGroup="Group" />
+ ValidationGroup="Group" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page index ba9c2e5d..6cb9d34a 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page @@ -1,5 +1,4 @@ -<com:THead/>
-<com:TForm>
+<com:TContent ID="Content">
<style>
.more td
{
@@ -93,6 +92,5 @@ Loading...
</div>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page index b94fdbfb..52fdea2d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page +++ b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<style>
.textbox
{
@@ -56,6 +56,5 @@ <com:TActiveLabel ID="label1" />
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page index 7842cde9..c946d5fd 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Callback Replace Content Test</h1>
@@ -26,6 +26,5 @@ Main Panel <com:TActiveButton id="btn_replace" Text="Replace" OnCallback="replaceContent"/>
-<com:TJavascriptLogger />
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page index fdd4a604..48d1207f 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page @@ -1,5 +1,4 @@ -<com:THead />
-<com:TForm>
+<com:TContent ID="Content">
<com:TActiveButton ID="button1"
CustomData="0"
@@ -41,7 +40,4 @@ Loading...
</div>
-
-<com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page b/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page index f3332bad..915092d2 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>TActiveCheckBoxList Test Case</h1> <com:TActiveCheckBoxList ID="list1" OnCallback="list1_callback"> @@ -19,6 +19,4 @@ <com:TActiveButton ID="button5" Text="Select Values 'value 2', 'value 5'" OnClick="select_values_25" /> </div> - <com:TJavascriptLogger /> - -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page b/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page index 41390e52..e126f34a 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page @@ -1,14 +1,12 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1 id="heading">TActiveFileUpload AutoPostBack Functional Test</h1> <com:TActiveFileUpload ID='uploader' OnFileUpload="uploadComplete" AutoPostBack="false"/> - + <com:TActiveButton ID="button1" Text="Submit File"/> - + <com:TActiveButton ID="button2" Text="This won't submit the file"/> - - <com:TActiveLabel ID="label1" Text="Label 1" /> - <com:TJavascriptLogger /> + <com:TActiveLabel ID="label1" Text="Label 1" /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page index 8c0a0d71..6b0c5109 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page @@ -1,6 +1,5 @@ <%@ Application.Globalization.Charset="UTF-8" %>
-<com:TForm ID="form1">
-
+<com:TContent ID="Content">
<style>
.textbox
{
@@ -61,7 +60,7 @@ <com:TActiveLabel ID="status" Text="Status:" />
- <com:TInPlaceTextBox
+ <com:TInPlaceTextBox
id="lblNewPackageTitle"
OnTextChanged="NewPackageSubject"
CssClass="textbox"
@@ -72,6 +71,4 @@ <com:TActiveButton Text="ad" OnCallback="button_clicked" />
- <com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page index 79fc17e0..b9d2c6f3 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>TextBox AutoPostBack With Group Validation</h1>
<com:TTextBox ID="Address" Columns="60" Maxlength="128" />
<com:TRequiredFieldValidator
@@ -14,8 +14,7 @@ Maxlength="12"
ValidationGroup="post"
OnCallback="lookupZipCode"/>
-<com:TJavascriptLogger />
<com:TActiveTextBox ID="City" Columns="60" Maxlength="128" />
-</com:TForm>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page index a285f03d..050f6681 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page @@ -1,4 +1,4 @@ -<com:TForm ID="form1"> +<com:TContent ID="Content"> <h1>TTimeTriggeredCallback + ViewState Tests</h1> <com:TActiveButton id="button1" Text="Start Timer" OnCallback="start_timer" /> <com:TActiveButton Text="Stop Timer" OnCallback="stop_timer" /> @@ -17,5 +17,4 @@ position: absolute; right: 0; top: 0"> Loading... </div> - <com:TJavascriptLogger /> -</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page index 1281cc5c..a164afc9 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page @@ -1,4 +1,4 @@ -<com:TForm>
+<com:TContent ID="Content">
<h1>Value Trigger Callback Test</h1>
<com:TTextBox ID="text1" />
@@ -9,6 +9,4 @@ <com:TActiveLabel ID="label1" Text="Label 1" />
-<com:TJavascriptLogger />
-
-</com:TForm>
\ No newline at end of file +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/config.xml b/tests/FunctionalTests/active-controls/protected/pages/config.xml new file mode 100755 index 00000000..05909075 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/config.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> + +<configuration> + <pages MasterClass="Application.pages.Layout" /> +</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php index c8fcfa57..acbdbb2a 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php @@ -1,14 +1,15 @@ <?php -class ActiveButtonTestCase extends PradoGenericSeleniumTest +class ActiveButtonTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveButtonTest"); - $this->verifyTextPresent("TActiveButton Functional Test"); - $this->assertText("label1", "Label 1"); - $this->click("button2"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveButtonTest"); + $this->assertContains("TActiveButton Functional Test", $this->source()); + $this->assertText("{$base}label1", "Label 1"); + $this->clickOnElement("{$base}button2"); $this->pause(800); - $this->assertText("label1", "Button 1 was clicked using callback!"); + $this->assertText("{$base}label1", "Button 1 was clicked using callback!"); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php index 312b8443..c032c084 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php @@ -1,55 +1,57 @@ <?php -class ActiveCheckBoxListTestCase extends PradoGenericSeleniumTest +class ActiveCheckBoxListTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=TActiveCheckBoxListTest"); - $this->verifyTextPresent("TActiveCheckBoxList Test Case"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=TActiveCheckBoxListTest"); + $this->assertContains("TActiveCheckBoxList Test Case", $this->source()); - $this->assertText("label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertCheckBoxes(array(1,2,3)); - $this->click("button2"); + $this->byId("{$base}button2")->click(); $this->pause(800); $this->assertCheckBoxes(array()); - $this->click("button3"); + $this->byId("{$base}button3")->click(); $this->pause(800); $this->assertCheckBoxes(array(0)); - $this->click("button4"); + $this->byId("{$base}button4")->click(); $this->pause(800); $this->assertCheckBoxes(array(4)); - $this->click("button5"); + $this->byId("{$base}button5")->click(); $this->pause(800); $this->assertCheckBoxes(array(1,4)); - $this->click("list1_c2"); + $this->byId("{$base}list1_c2")->click(); $this->pause(800); - $this->assertText("label1", "Selection: value 2, value 3, value 5"); + $this->assertText("{$base}label1", "Selection: value 2, value 3, value 5"); - $this->click("list1_c2"); + $this->byId("{$base}list1_c2")->click(); $this->pause(800); - $this->assertText("label1", "Selection: value 2, value 5"); + $this->assertText("{$base}label1", "Selection: value 2, value 5"); } function assertCheckBoxes($checks, $total = 5) { + $base='ctl0_Content_'; for($i = 0; $i < $total; $i++) { if(in_array($i, $checks)) - $this->assertChecked("list1_c{$i}"); + $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected()); else - $this->assertNotChecked("list1_c{$i}"); + $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected()); } } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php index 6f235273..782b35be 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php @@ -1,59 +1,60 @@ <?php -class ActiveCheckBoxTestCase extends PradoGenericSeleniumTest +class ActiveCheckBoxTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveCheckBoxTest"); - $this->verifyTextPresent("Active CheckBox Test"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveCheckBoxTest"); + $this->assertContains("Active CheckBox Test", $this->source()); - $this->assertText("checkbox1_label", "CheckBox 1"); - $this->assertText("checkbox2_label", "CheckBox 2"); - $this->assertText('label1', 'Label 1'); + $this->assertText("{$base}checkbox1_label", "CheckBox 1"); + $this->assertText("{$base}checkbox2_label", "CheckBox 2"); + $this->assertText("{$base}label1", 'Label 1'); - $this->click("change_text1"); + $this->byId("{$base}change_text1")->click(); $this->pause(800); - $this->assertText('checkbox1_label', 'Hello CheckBox 1'); + $this->assertText("{$base}checkbox1_label", 'Hello CheckBox 1'); - $this->click("change_text2"); + $this->byId("{$base}change_text2")->click(); $this->pause(800); - $this->assertText('checkbox2_label', 'CheckBox 2 World'); + $this->assertText("{$base}checkbox2_label", 'CheckBox 2 World'); //check box 1 - $this->click('change_checked1'); + $this->byId("{$base}change_checked1")->click(); $this->pause(800); - $this->assertChecked('checkbox1'); + $this->assertTrue($this->byId("{$base}checkbox1")->selected()); - $this->click('change_checked1'); + $this->byId("{$base}change_checked1")->click(); $this->pause(800); - $this->assertNotChecked('checkbox1'); + $this->assertFalse($this->byId("{$base}checkbox1")->selected()); //check box 2 - $this->click('change_checked2'); + $this->byId("{$base}change_checked2")->click(); $this->pause(800); - $this->assertChecked('checkbox2'); + $this->assertTrue($this->byId("{$base}checkbox2")->selected()); - $this->click('change_checked2'); + $this->byId("{$base}change_checked2")->click(); $this->pause(800); - $this->assertNotChecked('checkbox2'); + $this->assertFalse($this->byId("{$base}checkbox2")->selected()); //click checkbox 1 - $this->click("checkbox1"); + $this->byId("{$base}checkbox1")->click(); $this->pause(800); - $this->assertText("label1", "Label 1:Hello CheckBox 1 Checked"); + $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Checked"); - $this->click("checkbox1"); + $this->byId("{$base}checkbox1")->click(); $this->pause(800); - $this->assertText("label1", "Label 1:Hello CheckBox 1 Not Checked"); + $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Not Checked"); //click checkbox 2 - $this->click("checkbox2"); + $this->byId("{$base}checkbox2")->click(); $this->pause(800); - $this->assertText("label1", "Label 1:CheckBox 2 World Checked"); + $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Checked"); - $this->click("checkbox2"); + $this->byId("{$base}checkbox2")->click(); $this->pause(800); - $this->assertText("label1", "Label 1:CheckBox 2 World Not Checked"); + $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Not Checked"); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php index 75b86e19..c41988cc 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php @@ -1,18 +1,19 @@ <?php -class ActiveControlExpressionTagTestCase extends PradoGenericSeleniumTest +class ActiveControlExpressionTagTestCase extends PradoGenericSelenium2Test { function test() { - $this->open('active-controls/index.php?page=ActiveControlExpressionTag'); - $this->assertTextPresent('Active Control With Expression Tag Test'); - $this->assertTextNotPresent('Text box content:'); + $base='ctl0_Content_'; + $this->url('active-controls/index.php?page=ActiveControlExpressionTag'); + $this->assertContains('Active Control With Expression Tag Test', $this->source()); + $this->assertNotContains('Text box content:', $this->source()); - $this->type('textbox1', 'Hello world'); - $this->click('button1'); + $this->type("{$base}textbox1", 'Hello world'); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText('repeats', 'result - 1 result - two'); - $this->assertText('contents', 'Text box content: Hello world'); + $this->assertText("repeats", 'result - 1 result - two'); + $this->assertText("contents", 'Text box content: Hello world'); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php index be0a6fb4..570a6717 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php @@ -1,118 +1,119 @@ <?php -class ActiveDatePickerTestCase extends PradoGenericSeleniumTest +class ActiveDatePickerTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveDatePicker"); - $this->verifyTextPresent("TActiveDatePicker test"); - $this->verifyText("status", ""); - $this->verifyValue("datepicker", date('m-d-Y')); - $this->click("increaseButton"); - $this->pause(800); - $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 day'))); - $this->verifyText("status", date('m-d-Y', strtotime('+ 1 day'))); - $this->click("increaseButton"); - $this->pause(800); - $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 2 day'))); - $this->verifyText("status", date('m-d-Y', strtotime('+ 2 day'))); - $this->click("todayButton"); - $this->pause(800); - $this->verifyValue("datepicker", date('m-d-Y')); - $this->verifyText("status", date('m-d-Y')); - $this->click("decreaseButton"); - $this->pause(800); - $this->verifyValue("datepicker", date('m-d-Y', strtotime('- 1 day'))); - $this->verifyText("status", date('m-d-Y', strtotime('- 1 day'))); - $this->click("datepicker"); - $this->pause(800); - $this->click("css=input.todayButton"); - $this->pause(800); - $this->verifyValue("datepicker", date('m-d-Y')); - $this->verifyText("status", date('m-d-Y')); - $this->click("css=input.nextMonthButton"); - $this->pause(800); - $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 month'))); - $this->verifyText("status", date('m-d-Y', strtotime('+1 month'))); - - $this->click('toggleButton'); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveDatePicker"); + $this->assertContains("TActiveDatePicker test", $this->source()); + $this->assertText("{$base}status", ""); + $this->assertValue("{$base}datepicker", date('m-d-Y')); + $this->byId("{$base}increaseButton")->click(); + $this->pause(800); + $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 1 day'))); + $this->assertText("{$base}status", date('m-d-Y', strtotime('+ 1 day'))); + $this->byId("{$base}increaseButton")->click(); + $this->pause(800); + $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 2 day'))); + $this->assertText("{$base}status", date('m-d-Y', strtotime('+ 2 day'))); + $this->byId("{$base}todayButton")->click(); + $this->pause(800); + $this->assertValue("{$base}datepicker", date('m-d-Y')); + $this->assertText("{$base}status", date('m-d-Y')); + $this->byId("{$base}decreaseButton")->click(); + $this->pause(800); + $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('- 1 day'))); + $this->assertText("{$base}status", date('m-d-Y', strtotime('- 1 day'))); + $this->byId("{$base}datepicker")->click(); + $this->pause(800); + $this->byCssSelector("input.todayButton")->click(); + $this->pause(800); + $this->assertValue("{$base}datepicker", date('m-d-Y')); + $this->assertText("{$base}status", date('m-d-Y')); + $this->byCssSelector("input.nextMonthButton")->click(); + $this->pause(800); + $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 1 month'))); + $this->assertText("{$base}status", date('m-d-Y', strtotime('+1 month'))); + + $this->byId("{$base}toggleButton")->click(); $this->pause(2000); - - $this->click("todayButton"); + + $this->byId("{$base}todayButton")->click(); $this->pause(800); - $this->assertSelected("datepicker_month", date('m')); - $this->verifyText("status", date('m-d-Y')); - - $this->click("increaseButton"); + $this->assertSelected("{$base}datepicker_month", date('m')); + $this->assertText("{$base}status", date('m-d-Y')); + + $this->byId("{$base}increaseButton")->click(); $this->pause(800); $dateToCheck=strtotime('+ 1 day'); - $this->assertSelected("datepicker_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker_year", date('Y', $dateToCheck)); - $this->verifyText("status", date('m-d-Y', $dateToCheck)); - - $this->click("increaseButton"); + $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck)); + $this->assertText("{$base}status", date('m-d-Y', $dateToCheck)); + + $this->byId("{$base}increaseButton")->click(); $this->pause(800); $dateToCheck=strtotime('+ 2 day'); - $this->assertSelected("datepicker_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker_year", date('Y', $dateToCheck)); - $this->verifyText("status", date('m-d-Y', $dateToCheck)); - - $this->click("todayButton"); + $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck)); + $this->assertText("{$base}status", date('m-d-Y', $dateToCheck)); + + $this->byId("{$base}todayButton")->click(); $this->pause(800); $dateToCheck=time(); - $this->assertSelected("datepicker_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker_year", date('Y', $dateToCheck)); - $this->verifyText("status", date('m-d-Y', $dateToCheck)); - - $this->click("decreaseButton"); + $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck)); + $this->assertText("{$base}status", date('m-d-Y', $dateToCheck)); + + $this->byId("{$base}decreaseButton")->click(); $this->pause(800); $dateToCheck=strtotime('- 1 day'); - $this->assertSelected("datepicker_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker_year", date('Y', $dateToCheck)); - $this->verifyText("status", date('m-d-Y', $dateToCheck)); - - $this->click("datepickerbutton"); + $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck)); + $this->assertText("{$base}status", date('m-d-Y', $dateToCheck)); + + $this->byId("{$base}datepickerbutton")->click(); $this->pause(800); - $this->click("css=input.todayButton"); + $this->byCssSelector("input.todayButton")->click(); $this->pause(800); $dateToCheck=time(); - $this->assertSelected("datepicker_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker_year", date('Y', $dateToCheck)); - $this->verifyText("status", date('m-d-Y', $dateToCheck)); - - $this->click("css=input.nextMonthButton"); + $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck)); + $this->assertText("{$base}status", date('m-d-Y', $dateToCheck)); + + $this->byCssSelector("input.nextMonthButton")->click(); $this->pause(800); $dateToCheck=strtotime('+ 1 month'); - $this->assertSelected("datepicker_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker_year", date('Y', $dateToCheck)); - $this->verifyText("status", date('m-d-Y', $dateToCheck)); - - $this->click('ctl1'); - $this->pause(800); - - $this->verifyText("status2", ""); + $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck)); + $this->assertText("{$base}status", date('m-d-Y', $dateToCheck)); + + $this->byId('ctl0_ctl1')->click(); + $this->pause(800); + + $this->assertText("{$base}status2", ""); $dateToCheck=time(); - $this->assertSelected("datepicker2_month", date('m', $dateToCheck)); - $this->assertSelected("datepicker2_day", date('d', $dateToCheck)); - $this->assertSelected("datepicker2_year", date('Y', $dateToCheck)); - $this->select("datepicker2_year", date('Y')+1); + $this->assertSelected("{$base}datepicker2_month", date('m', $dateToCheck)); + $this->assertSelected("{$base}datepicker2_day", date('d', $dateToCheck)); + $this->assertSelected("{$base}datepicker2_year", date('Y', $dateToCheck)); + $this->select("{$base}datepicker2_year", date('Y')+1); $this->pause(800); $dateToCheck=mktime(0,0,0,(int)date('m'),(int)date('d'), date('Y')+1); - $this->verifyText("status2", date('m-d-Y', $dateToCheck)); + $this->assertText("{$base}status2", date('m-d-Y', $dateToCheck)); - $this->verifyText("status3", ""); + $this->assertText("{$base}status3", ""); $dateToCheck=time(); - $this->assertSelected("datepicker3_month", date('F', $dateToCheck)); - $this->assertSelected("datepicker3_year", date('Y', $dateToCheck)); - $this->select("datepicker3_year", date('Y')+1); + $this->assertSelected("{$base}datepicker3_month", date('F', $dateToCheck)); + $this->assertSelected("{$base}datepicker3_year", date('Y', $dateToCheck)); + $this->select("{$base}datepicker3_year", date('Y')+1); $this->pause(800); $dateToCheck=mktime(0,0,0,(int)date('m'),(int)date('d'), date('Y')+1); - $this->verifyText("status3", date('m/Y', $dateToCheck)); + $this->assertText("{$base}status3", date('m/Y', $dateToCheck)); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php index a54cbd75..cb8c953f 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php @@ -1,45 +1,46 @@ <?php -class ActiveDropDownListTestCase extends PradoGenericSeleniumTest +class ActiveDropDownListTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveDropDownList"); - $this->assertTextPresent('Active Drop Down List Test Case'); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveDropDownList"); + $this->assertContains('Active Drop Down List Test Case', $this->source()); - $this->assertText("label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertSelected("list1", "item 4"); + $this->assertSelected("{$base}list1", "item 4"); - $this->click("button2"); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertSelectedIndex("list1", 0); + $this->assertSelectedValue("{$base}list1", 'value 1'); - $this->click("button3"); + $this->byId("{$base}button3")->click(); $this->pause(800); - $this->assertSelected("list1", "item 2"); + $this->assertSelected("{$base}list1", "item 2"); - $this->assertText("label1", "Selection 1: value 1"); + $this->assertText("{$base}label1", "Selection 1: value 1"); - $this->select("list1", "item 1"); + $this->select("{$base}list1", "item 1"); $this->pause(800); - $this->select("list2", "value 1 - item 4"); + $this->select("{$base}list2", "value 1 - item 4"); $this->pause(800); - $this->assertText("label2", "Selection 2: value 1 - item 4"); + $this->assertText("{$base}label2", "Selection 2: value 1 - item 4"); - $this->select("list1", "item 3"); + $this->select("{$base}list1", "item 3"); $this->pause(800); - $this->select("list2", "value 3 - item 5"); + $this->select("{$base}list2", "value 3 - item 5"); $this->pause(800); - $this->assertText("label2", "Selection 2: value 3 - item 5"); + $this->assertText("{$base}label2", "Selection 2: value 3 - item 5"); - $this->click('button4'); + $this->byId("{$base}button4")->click(); $this->pause(800); - $this->assertSelected('list1', 'item 3'); + $this->assertSelected("{$base}list1", 'item 3'); $this->pause(300); - $this->assertSelected('list2', 'value 3 - item 3'); + $this->assertSelected("{$base}list2", 'value 3 - item 3'); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php index b8c02868..d4b82068 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php @@ -1,22 +1,23 @@ <?php -class ActiveHiddenFieldTestCase extends PradoGenericSeleniumTest +class ActiveHiddenFieldTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveHiddenFieldTest"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveHiddenFieldTest"); $fieldEmpty = 'No longer empty'; $fieldUsed = 'My value'; - - $this->verifyTextPresent('Value of current hidden field'); - $this->click('Button1'); + + $this->assertContains('Value of current hidden field', $this->source()); + $this->byId("{$base}Button1")->click(); $this->pause(800); - $this->assertText('ResponseLabel', $fieldEmpty); - $this->click('Button2'); + $this->assertText("{$base}ResponseLabel", $fieldEmpty); + $this->byId("{$base}Button2")->click(); $this->pause(800); - $this->assertText('ResponseLabel', $fieldUsed); - $this->click('Button3'); + $this->assertText("{$base}ResponseLabel", $fieldUsed); + $this->byId("{$base}Button3")->click(); $this->pause(800); - $this->assertText('ResponseLabel', $fieldEmpty.'|'.$fieldUsed); + $this->assertText("{$base}ResponseLabel", $fieldEmpty.'|'.$fieldUsed); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php index bfcdd206..6329d826 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php @@ -1,16 +1,17 @@ <?php -class ActiveHyperLinkTestCase extends PradoGenericSeleniumTest +class ActiveHyperLinkTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveHyperLinkTest"); - $this->assertTextPresent("Active HyperLink Test Case"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveHyperLinkTest"); + $this->assertContains("Active HyperLink Test Case", $this->source()); - $this->assertText("link1", "Link 1"); + $this->assertText("{$base}link1", "Link 1"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("link1", "Pradosoft.com"); + $this->assertText("{$base}link1", "Pradosoft.com"); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php index 2989ab27..0ef2e082 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php @@ -1,15 +1,16 @@ <?php -class ActiveImageButtonTestCase extends PradoGenericSeleniumTest +class ActiveImageButtonTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveImageButtonTest"); - $this->assertTextPresent("TActiveImageButton Functional Test"); - $this->assertText("label1", "Label 1"); - $this->click("image1"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveImageButtonTest"); + $this->assertContains("TActiveImageButton Functional Test", $this->source()); + $this->assertText("{$base}label1", "Label 1"); + $this->byId("{$base}image1")->click(); $this->pause(800); //unable to determine mouse position - $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+"); + $this->assertRegExp('/Image clicked at x=\d+, y=\d+/', $this->source()); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php index 88cdf15e..1f7c40ea 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php @@ -1,14 +1,15 @@ <?php -class ActiveLinkButtonTestCase extends PradoGenericSeleniumTest +class ActiveLinkButtonTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveLinkButtonTest"); - $this->verifyTextPresent("TActiveLinkButton Functional Test"); - $this->assertText("label1", "Label 1"); - $this->click("button2"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveLinkButtonTest"); + $this->assertContains("TActiveLinkButton Functional Test", $this->source()); + $this->assertText("{$base}label1", "Label 1"); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertText("label1", "Button 1 was clicked using callback!"); + $this->assertText("{$base}label1", "Button 1 was clicked using callback!"); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php index 911e3cc7..be2bf174 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php @@ -1,48 +1,48 @@ <?php -class ActiveListBoxMasterTestCase extends PradoGenericSeleniumTest +class ActiveListBoxMasterTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveListBoxMasterTest"); - $this->assertTextPresent('Active List Box Functional Test'); + $this->url("active-controls/index.php?page=ActiveListBoxMasterTest"); + $this->assertContains('Active List Box Functional Test', $this->source()); $base = 'ctl0_body_'; - $this->assertText($base."label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->click($base."button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4')); - $this->click($base.'button3'); + $this->byId("{$base}button3")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 1')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1')); - $this->click($base.'button4'); + $this->byId("{$base}button4")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 5')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5')); - $this->click($base.'button5'); + $this->byId("{$base}button5")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 5')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5')); - $this->click($base.'button2'); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertNotSomethingSelected($base."list1"); + $this->assertNotSomethingSelected("{$base}list1"); - $this->click($base.'button6'); + $this->byId("{$base}button6")->click(); $this->pause(800); - $this->click($base."button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4')); - $this->select($base."list1", "item 1"); + $this->select("{$base}list1", "item 1"); $this->pause(800); - $this->assertText($base.'label1', 'Selection: value 1'); + $this->assertText("{$base}label1", 'Selection: value 1'); - $this->addSelection($base."list1", "item 4"); + $this->addSelection("{$base}list1", "item 4"); $this->pause(800); - $this->assertText($base.'label1', 'Selection: value 1, value 4'); + $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 d45cb42c..1830f5ab 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php @@ -1,46 +1,47 @@ <?php -class ActiveListBoxTestCase extends PradoGenericSeleniumTest +class ActiveListBoxTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveListBoxTest"); - $this->assertTextPresent('Active List Box Functional Test'); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveListBoxTest"); + $this->assertContains('Active List Box Functional Test', $this->source()); - $this->assertText("label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4')); - $this->click('button3'); + $this->byId("{$base}button3")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 1')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1')); - $this->click('button4'); + $this->byId("{$base}button4")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 5')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5')); - $this->click('button5'); + $this->byId("{$base}button5")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 5')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5')); - $this->click('button2'); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertNotSomethingSelected("list1"); + $this->assertNotSomethingSelected("{$base}list1"); - $this->click('button6'); + $this->byId("{$base}button6")->click(); $this->pause(800); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4')); - $this->select("list1", "item 1"); + $this->select("{$base}list1", "item 1"); $this->pause(800); - $this->assertText('label1', 'Selection: value 1'); + $this->assertText("{$base}label1", 'Selection: value 1'); - $this->addSelection("list1", "item 4"); + $this->addSelection("{$base}list1", "item 4"); $this->pause(800); - $this->assertText('label1', 'Selection: value 1, value 4'); + $this->assertText("{$base}label1", 'Selection: value 1, value 4'); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php index 9b069a14..73ab3ad0 100755 --- a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php @@ -1,14 +1,15 @@ <?php -class ActivePanelTestCase extends PradoGenericSeleniumTest +class ActivePanelTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActivePanelTest"); - $this->verifyTextPresent("Active Panel replacement tests"); - $this->assertTextNotPresent('Something lalala'); - $this->click("div1"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActivePanelTest"); + $this->assertContains("Active Panel replacement tests", $this->source()); + $this->assertNotContains('Something lalala', $this->source()); + $this->byId("div1")->click(); $this->pause(800); - $this->assertTextPresent("Something lalala"); + $this->assertContains("Something lalala", $this->source()); } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php index b0942ffa..82408732 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php @@ -1,45 +1,47 @@ <?php -class ActiveRadioButtonListTestCase extends PradoGenericSeleniumTest +class ActiveRadioButtonListTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveRadioButtonListTest"); - $this->verifyTextPresent("TActiveRadioButtonList Test Case"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveRadioButtonListTest"); + $this->assertContains("TActiveRadioButtonList Test Case", $this->source()); - $this->assertText("label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->click("button3"); + $this->byId("{$base}button3")->click(); $this->pause(800); $this->assertCheckBoxes(array(0)); - $this->click("button2"); + $this->byId("{$base}button2")->click(); $this->pause(800); $this->assertCheckBoxes(array()); - $this->click("button4"); + $this->byId("{$base}button4")->click(); $this->pause(800); $this->assertCheckBoxes(array(4)); - $this->click("list1_c2"); + $this->byId("{$base}list1_c2")->click(); $this->pause(800); - $this->assertText("label1", "Selection: value 3"); + $this->assertText("{$base}label1", "Selection: value 3"); - $this->click("list1_c3"); + $this->byId("{$base}list1_c3")->click(); $this->pause(800); - $this->assertText("label1", "Selection: value 4"); + $this->assertText("{$base}label1", "Selection: value 4"); } function assertCheckBoxes($checks, $total = 5) { + $base='ctl0_Content_'; for($i = 0; $i < $total; $i++) { if(in_array($i, $checks)) - $this->assertChecked("list1_c{$i}"); + $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected()); else - $this->assertNotChecked("list1_c{$i}"); + $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected()); } } } diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php index fceb2e21..7606e46b 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php @@ -1,52 +1,53 @@ <?php -class ActiveRadioButtonTestCase extends PradoGenericSeleniumTest +class ActiveRadioButtonTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveRadioButtonTest"); - $this->verifyTextPresent("Active Radio Button Test"); - $this->assertText('label1', 'Label 1'); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveRadioButtonTest"); + $this->assertContains("Active Radio Button Test", $this->source()); + $this->assertText("{$base}label1", 'Label 1'); - $this->assertNotChecked('radio1'); - $this->assertNotChecked('radio2'); - $this->assertNotChecked('radio3'); + $this->assertFalse($this->byId("{$base}radio1")->selected()); + $this->assertFalse($this->byId("{$base}radio2")->selected()); + $this->assertFalse($this->byId("{$base}radio3")->selected()); - $this->assertText('radio1_label', 'Radio Button 1'); - $this->assertText('radio2_label', 'Radio Button 2'); - $this->assertText('radio3_label', 'Radio Button 3'); + $this->assertText("{$base}radio1_label", 'Radio Button 1'); + $this->assertText("{$base}radio2_label", 'Radio Button 2'); + $this->assertText("{$base}radio3_label", 'Radio Button 3'); - $this->click('change_text1'); + $this->byId("{$base}change_text1")->click(); $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->assertText("{$base}radio1_label", 'Hello Radio Button 1'); + $this->assertText("{$base}radio2_label", 'Radio Button 2'); + $this->assertText("{$base}radio3_label", 'Radio Button 3'); - $this->click('change_text2'); + $this->byId("{$base}change_text2")->click(); $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->assertText("{$base}radio1_label", 'Hello Radio Button 1'); + $this->assertText("{$base}radio2_label", 'Radio Button 2 World'); + $this->assertText("{$base}radio3_label", 'Radio Button 3'); - $this->click('change_radio1'); + $this->byId("{$base}change_radio1")->click(); $this->pause(800); - $this->assertChecked('radio1'); - $this->assertNotChecked('radio2'); - $this->assertNotChecked('radio3'); + $this->assertTrue($this->byId("{$base}radio1")->selected()); + $this->assertFalse($this->byId("{$base}radio2")->selected()); + $this->assertFalse($this->byId("{$base}radio3")->selected()); - $this->click('change_radio2'); + $this->byId("{$base}change_radio2")->click(); $this->pause(800); - $this->assertNotChecked('radio1'); - $this->assertChecked('radio2'); - $this->assertNotChecked('radio3'); + $this->assertFalse($this->byId("{$base}radio1")->selected()); + $this->assertTrue($this->byId("{$base}radio2")->selected()); + $this->assertFalse($this->byId("{$base}radio3")->selected()); - $this->click('radio3'); + $this->byId("{$base}radio3")->click(); $this->pause(800); - $this->assertNotChecked('radio1'); - $this->assertChecked('radio2'); - $this->assertChecked('radio3'); - $this->assertText('label1', 'Label 1:Radio Button 3 Checked'); + $this->assertFalse($this->byId("{$base}radio1")->selected()); + $this->assertTrue($this->byId("{$base}radio2")->selected()); + $this->assertTrue($this->byId("{$base}radio3")->selected()); + $this->assertText("{$base}label1", 'Label 1:Radio Button 3 Checked'); } diff --git a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php index 2033d6ff..058aae01 100755 --- a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php @@ -1,42 +1,43 @@ <?php -class AutoCompleteTestCase extends PradoGenericSeleniumTest +class AutoCompleteTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=AutoCompleteTest"); - $this->verifyTextPresent("TAutoComplete Test"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=AutoCompleteTest"); + $this->assertContains("TAutoComplete Test", $this->source()); - $this->assertText("label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->type("textbox3", 'a'); - $this->runScript('Prado.Registry.get(\'textbox3\').onKeyPress({})'); + $this->byId("{$base}textbox3")->click(); + $this->keys('a'); $this->pause(500); - $this->verifyTextPresent('Andorra'); - $this->assertText("label1", "suggestion for a"); + $this->assertContains('Andorra', $this->source()); + $this->assertText("{$base}label1", "suggestion for a"); - $this->type("textbox3", 'au'); - $this->runScript('Prado.Registry.get(\'textbox3\').onKeyPress({})'); + $this->keys('u'); $this->pause(500); - $this->verifyTextPresent('Australia'); - $this->assertText("label1", "suggestion for au"); + $this->assertContains('Australia', $this->source()); + $this->assertText("{$base}label1", "suggestion for au"); - $this->click("css=#textbox3_result ul li"); + $this->byCssSelector("#{$base}textbox3_result ul li")->click(); $this->pause(500); - $this->assertText("label1", "Label 1: Austria"); + $this->assertText("{$base}label1", "Label 1: Austria"); - $this->type("textbox2", "cu"); - $this->runScript('Prado.Registry.get(\'textbox2\').onKeyPress({})'); + + $this->byId("{$base}textbox2")->click(); + $this->keys('cu'); $this->pause(500); - $this->click('css=#textbox2_result ul li'); + $this->byCssSelector("#{$base}textbox2_result ul li")->click(); $this->pause(500); - $this->assertText("label1", "Label 1: Cuba"); + $this->assertText("{$base}label1", "Label 1: Cuba"); - $this->type("textbox2", "Cuba,me"); - $this->runScript('Prado.Registry.get(\'textbox2\').onKeyPress({})'); + $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::END); + $this->keys(',me'); $this->pause(500); - $this->click('css=#textbox2_result ul li'); + $this->byCssSelector("#{$base}textbox2_result ul li")->click(); $this->pause(500); - $this->assertText("label1", "Label 1: Cuba,Mexico"); + $this->assertText("{$base}label1", "Label 1: Cuba,Mexico"); } } diff --git a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php index 48960d39..9bef7d00 100755 --- a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php @@ -1,23 +1,24 @@ <?php -class CalculatorTestCase extends PradoGenericSeleniumTest +class CalculatorTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=Calculator"); - $this->assertTextPresent("Callback Enabled Calculator"); - $this->assertNotVisible("summary"); - - $this->click("sum"); - $this->assertVisible("summary"); - - $this->type("a", "2"); - $this->type("b", "5"); - - $this->click("sum"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=Calculator"); + $this->assertContains("Callback Enabled Calculator", $this->source()); + $this->assertNotVisible("{$base}summary"); + + $this->byId("{$base}sum")->click(); + $this->assertVisible("{$base}summary"); + + $this->type("{$base}a", "2"); + $this->type("{$base}b", "5"); + + $this->byId("{$base}sum")->click(); $this->pause(500); - $this->assertNotVisible("summary"); - $this->assertValue("c", "7"); + $this->assertNotVisible("{$base}summary"); + $this->assertValue("{$base}c", "7"); } } diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php index c495935a..25dabe24 100755 --- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php @@ -1,58 +1,65 @@ <?php -class CallbackAdapterTestCase extends PradoGenericSeleniumTest +class CallbackAdapterTestCase extends PradoGenericSelenium2Test { function test() { + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ControlAdapterTest"); + $this->assertContains('Control Adapter - State Tracking Tests', $this->source()); - $this->open("active-controls/index.php?page=ControlAdapterTest"); - $this->assertTextPresent('Control Adapter - State Tracking Tests'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); - $this->click('button2'); - $this->assertAlert('ok'); - - $this->click('test6'); + $this->byId("{$base}test6")->click(); $this->pause(800); - $this->click('test7'); + $this->byId("{$base}test7")->click(); $this->pause(800); - $this->click('test8'); + $this->byId("{$base}test8")->click(); $this->pause(800); - $this->click('test9'); + $this->byId("{$base}test9")->click(); $this->pause(800); - $this->click('button1'); - $this->assertAlert('haha!'); - - $this->click('button2'); - $this->assertAlert('ok'); - $this->assertAlert('baz!'); + $this->byId("{$base}button1")->click(); + $this->assertEquals('haha!', $this->alertText()); + $this->acceptAlert(); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); + $this->assertEquals('baz!', $this->alertText()); + $this->acceptAlert(); } /* function testIE() { - $this->open("active-controls/index.php?page=ControlAdapterTest"); - $this->assertTextPresent('Control Adapter - State Tracking Tests'); + $this->url("active-controls/index.php?page=ControlAdapterTest"); + $this->assertContains('Control Adapter - State Tracking Tests', $this->source()); - $this->click('button2'); - $this->assertAlert('ok'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); - $this->click('test6'); + $this->byId('test6')->click(); $this->pause(800); - $this->click('test7'); + $this->byId('test7')->click(); $this->pause(800); - $this->click('test8'); + $this->byId('test8')->click(); $this->pause(800); - $this->click('test9'); + $this->byId('test9')->click(); $this->pause(800); - $this->click('button1'); - $this->assertAlert('haha!'); + $this->byId("{$base}button1")->click(); + $this->assertEquals('haha!', $this->alertText()); + $this->acceptAlert(); //IE alerts in diffrent order - $this->click('button2'); - $this->assertAlert('baz!'); - $this->assertAlert('ok'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('baz!', $this->alertText()); + $this->acceptAlert(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); } */ } diff --git a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php index d1f48cf3..4c2c7070 100755 --- a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php @@ -1,29 +1,30 @@ <?php -class CallbackOptionsTestCase extends PradoGenericSeleniumTest +class CallbackOptionsTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=CallbackOptionsTest"); - $this->verifyTextPresent("TCallbackOptions Test"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=CallbackOptionsTest"); + $this->assertContains("TCallbackOptions Test", $this->source()); $this->assertText("label1", "Label 1"); $this->assertText("label2", "Label 2"); $this->assertText("label3", "Label 3"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("label1", "Button 1 has returned"); $this->assertText("label2", "Label 2"); $this->assertText("label3", "Label 3"); - $this->click("button2"); + $this->byId("{$base}button2")->click(); $this->pause(800); $this->assertText("label1", "Button 1 has returned"); $this->assertText("label2", "Button 2 has returned"); $this->assertText("label3", "Label 3"); - $this->click("button3"); + $this->byId("{$base}button3")->click(); $this->pause(800); $this->assertText("label1", "Button 1 has returned"); $this->assertText("label2", "Button 2 has returned"); diff --git a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php index 7e38423e..3b594b39 100755 --- a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php @@ -1,20 +1,21 @@ <?php -class CustomTemplateTestCase extends PradoGenericSeleniumTest +class CustomTemplateTestCase extends PradoGenericSelenium2Test { function test() { - $this->open('active-controls/index.php?page=CustomTemplateControlTest'); - $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test'); - $this->assertText('label1', 'Label 1'); + $base='ctl0_Content_'; + $this->url('active-controls/index.php?page=CustomTemplateControlTest'); + $this->assertContains('Add Dynamic Custom TTemplateControl Test', $this->source()); + $this->assertText("{$base}label1", 'Label 1'); - $this->type('foo', 'Foo Bar!'); - $this->click('button2'); + $this->type("{$base}foo", 'Foo Bar!'); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertVisible('ctl1_ThePanel'); - $this->assertTextPresent('Client ID: ctl1_ThePanel'); + $this->assertVisible("{$base}ctl0_ThePanel"); + $this->assertContains("Client ID: {$base}ctl0_ThePanel", $this->source()); - $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!'); + $this->assertText("{$base}label1", 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!'); } } diff --git a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php index 841de5aa..49c268ad 100755 --- a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php @@ -1,20 +1,21 @@ <?php -class DelayedCallbackTestCase extends PradoGenericSeleniumTest +class DelayedCallbackTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=DelayedCallback"); - $this->verifyTextPresent("Delayed Callback Test"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=DelayedCallback"); + $this->assertContains("Delayed Callback Test", $this->source()); - $this->assertText("status", ""); - $this->click("button1"); - $this->click("button2"); + $this->assertText("{$base}status", ""); + $this->byId("{$base}button1")->click(); + $this->byId("{$base}button2")->click(); $this->pause("5000"); - $this->assertText("status", "Callback 1 returned after 4s"); + $this->assertText("{$base}status", "Callback 1 returned after 4s"); $this->pause("3000"); - $this->assertText("status", "Callback 2 delayed 2s"); + $this->assertText("{$base}status", "Callback 2 delayed 2s"); } } diff --git a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php index 30678786..7cc9a3bd 100755 --- a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php @@ -1,20 +1,21 @@ <?php -class EventTriggerTestCase extends PradoGenericSeleniumTest +class EventTriggerTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=EventTriggeredCallback"); - $this->verifyTextPresent("Event Triggered Callback Test"); + $base = "ctl0_Content_"; + $this->url("active-controls/index.php?page=EventTriggeredCallback"); + $this->assertContains("Event Triggered Callback Test", $this->source()); - $this->assertText('label1', 'Label 1'); + $this->assertText("{$base}label1", 'Label 1'); - $this->click('button1'); + $this->byId("button1")->click(); $this->pause(800); - $this->assertText('label1', 'button 1 clicked'); + $this->assertText("{$base}label1", 'button 1 clicked'); - $this->type('text1', 'test'); + $this->byId("{$base}text1")->value('test'); $this->pause(800); - $this->assertText('label1', 'text 1 focused'); + $this->assertText("{$base}label1", 'text 1 focused'); } } diff --git a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php index e2ceb33e..f08a6f78 100755 --- a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php @@ -1,24 +1,25 @@ <?php -class NestedActiveControlsTestCase extends PradoGenericSeleniumTest +class NestedActiveControlsTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=NestedActiveControls"); - $this->verifyTextPresent("Nested Active Controls Test"); - $this->assertText("label1", "Label 1"); - $this->assertText("label2", "Label 2"); - $this->assertTextNotPresent("Label 3"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=NestedActiveControls"); + $this->assertContains("Nested Active Controls Test", $this->source()); + $this->assertText("{$base}label1", "Label 1"); + $this->assertText("{$base}label2", "Label 2"); + $this->assertNotContains("Label 3", $this->source()); - $this->click("div1"); + $this->byId("div1")->click(); $this->pause(800); - $this->assertTextPresent("Something lalala"); - $this->assertText("label3", "Label 3"); + $this->assertContains("Something lalala", $this->source()); + $this->assertText("{$base}label3", "Label 3"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("label1", "Label 1: Button 1 Clicked"); - $this->assertText("label2", "Label 2: Button 1 Clicked"); - $this->assertText("label3", "Label 3: Button 1 Clicked"); + $this->assertText("{$base}label1", "Label 1: Button 1 Clicked"); + $this->assertText("{$base}label2", "Label 2: Button 1 Clicked"); + $this->assertText("{$base}label3", "Label 3: Button 1 Clicked"); } } diff --git a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php index adb5a3a5..e7f7f287 100755 --- a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php @@ -1,23 +1,24 @@ <?php -class PopulateListTestCase extends PradoGenericSeleniumTest +class PopulateListTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=PopulateActiveList"); - $this->verifyTextPresent("Populate active list controls"); - $this->assertText("label1", ""); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=PopulateActiveList"); + $this->assertContains("Populate active list controls", $this->source()); + $this->assertText("{$base}label1", ""); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->select("list1", "World"); + $this->select("{$base}list1", "World"); $this->pause(800); - $this->assertText("label1", "list1: World"); + $this->assertText("{$base}label1", "list1: World"); - $this->click("button2"); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->select("list2", "Prado"); + $this->select("{$base}list2", "Prado"); $this->pause(800); - $this->assertText("label1", "list2: Prado"); + $this->assertText("{$base}label1", "list2: Prado"); } } diff --git a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php index 21a5128d..271a2ffb 100755 --- a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php @@ -1,20 +1,21 @@ <?php -class PostLoadingTestCase extends PradoGenericSeleniumTest +class PostLoadingTestCase extends PradoGenericSelenium2Test { function test() { - $this->open('active-controls/index.php?page=PostLoadingTest'); - $this->assertTextPresent('PostLoading Test'); + $base="ctl0_Content_"; + $this->url('active-controls/index.php?page=PostLoadingTest'); + $this->assertContains('PostLoading Test', $this->source()); - $this->assertTextNotPresent('Hello World'); + $this->assertNotContains('Hello World', $this->source()); - $this->click('div1'); + $this->byId('div1')->click(); $this->pause(800); - $this->type('MyTextBox', 'Hello World'); - $this->click('MyButton'); + $this->type("{$base}MyTextBox", 'Hello World'); + $this->byId("{$base}MyButton")->click(); $this->pause(800); - $this->assertTextPresent('Result is Hello World'); + $this->assertContains('Result is Hello World', $this->source()); } } diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php index fd273ae7..c3345d6a 100755 --- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php @@ -1,90 +1,90 @@ <?php -class ReplaceContentTestCase extends PradoGenericSeleniumTest +class ReplaceContentTestCase extends PradoGenericSelenium2Test { function test() { + $base='ctl0_Content_'; + $this->url('active-controls/index.php?page=ReplaceContentTest'); + $this->assertContains('Callback Replace Content Test', $this->source()); - $this->open('active-controls/index.php?page=ReplaceContentTest'); - $this->assertTextPresent('Callback Replace Content Test'); + $this->assertText("{$base}subpanel", 'Sub Panel'); + $this->assertText("{$base}panel1", "Main Panel\nSub Panel"); - $this->assertText('subpanel', 'Sub Panel'); - $this->assertText('panel1', 'Main Panel Sub Panel'); + $this->type("{$base}content", 'something'); - $this->type('content', 'something'); - - $this->click('btn_append'); + $this->byId("{$base}btn_append")->click(); $this->pause(800); - $this->assertText('subpanel', 'Sub Panel something'); - $this->assertText('panel1', 'Main Panel Sub Panel something'); + $this->assertText("{$base}subpanel", 'Sub Panel something'); + $this->assertText("{$base}panel1", "Main Panel\nSub Panel something"); - $this->type('content', 'more'); - $this->click('btn_prepend'); + $this->type("{$base}content", 'more'); + $this->byId("{$base}btn_prepend")->click(); $this->pause(800); - $this->assertText('subpanel', 'more Sub Panel something'); - $this->assertText('panel1', 'Main Panel more Sub Panel something'); + $this->assertText("{$base}subpanel", 'more Sub Panel something'); + $this->assertText("{$base}panel1", "Main Panel\nmore Sub Panel something"); - $this->type('content', 'prado'); - $this->click('btn_before'); + $this->type("{$base}content", 'prado'); + $this->byId("{$base}btn_before")->click(); $this->pause(800); - $this->assertText('subpanel', 'more Sub Panel something'); - $this->assertText('panel1', 'Main Panel pradomore Sub Panel something'); + $this->assertText("{$base}subpanel", 'more Sub Panel something'); + $this->assertText("{$base}panel1", "Main Panel prado\nmore Sub Panel something"); - $this->type('content', ' php '); - $this->click('btn_after'); + $this->type("{$base}content", ' php '); + $this->byId("{$base}btn_after")->click(); $this->pause(800); - $this->type('content', 'mauahahaha'); - $this->click('btn_replace'); + $this->type("{$base}content", 'mauahahaha'); + $this->byId("{$base}btn_replace")->click(); $this->pause(1000); - $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); + $this->assertText("{$base}panel1", 'Main Panel pradomauahahaha php'); } /* function testIE() { - $this->open('active-controls/index.php?page=ReplaceContentTest'); - $this->assertTextPresent('Callback Replace Content Test'); + $this->url('active-controls/index.php?page=ReplaceContentTest'); + $this->assertContains('Callback Replace Content Test', $this->source()); - $this->assertText('subpanel', 'Sub Panel'); - $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel'); + $this->assertText("{$base}subpanel", 'Sub Panel'); + $this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel'); - $this->type('content', 'something'); + $this->type("{$base}content", 'something'); - $this->click('btn_append'); + $this->byId('btn_append')->click(); $this->pause(800); - $this->assertText('subpanel', 'Sub Panel something'); - $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something'); + $this->assertText("{$base}subpanel", 'Sub Panel something'); + $this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel\s*something'); - $this->type('content', 'more'); - $this->click('btn_prepend'); + $this->type("{$base}content", 'more'); + $this->byId('btn_prepend')->click(); $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->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something'); + $this->assertText("{$base}panel1", 'regexp:Main Panel\s*moreSub Panel\s*something'); - $this->type('content', 'prado'); - $this->click('btn_before'); + $this->type("{$base}content", 'prado'); + $this->byId('btn_before')->click(); $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->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something'); + $this->assertText("{$base}panel1", 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something'); - $this->type('content', ' php '); - $this->click('btn_after'); + $this->type("{$base}content", ' php '); + $this->byId('btn_after')->click(); $this->pause(800); - $this->type('content', 'mauahahaha'); - $this->click('btn_replace'); + $this->type("{$base}content", 'mauahahaha'); + $this->byId('btn_replace')->click(); $this->pause(1000); - $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); + $this->assertText("{$base}panel1", 'Main Panel pradomauahahahaphp'); } */ } diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php index 14d575fe..559c80a6 100755 --- a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php @@ -1,15 +1,16 @@ <?php -class TextBoxCallbackTestCase extends PradoGenericSeleniumTest +class TextBoxCallbackTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveTextBoxCallback"); - $this->verifyTextPresent("ActiveTextBox Callback Test"); - $this->assertText("label1", "Label 1"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveTextBoxCallback"); + $this->assertContains("ActiveTextBox Callback Test", $this->source()); + $this->assertText("{$base}label1", "Label 1"); - $this->type("textbox1", "hello!"); + $this->type("{$base}textbox1", "hello!"); $this->pause(800); - $this->assertText("label1", "Label 1: hello!"); + $this->assertText("{$base}label1", "Label 1: hello!"); } } diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php index ffc1ac72..2562a18b 100755 --- a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php @@ -1,22 +1,23 @@ <?php -class TextBoxGroupValidationTestCase extends PradoGenericSeleniumTest +class TextBoxGroupValidationTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=TextBoxValidationCallback"); - $this->assertTextPresent('TextBox AutoPostBack With Group Validation'); - $this->assertNotVisible('validator1'); + $base="ctl0_Content_"; + $this->url("active-controls/index.php?page=TextBoxValidationCallback"); + $this->assertContains('TextBox AutoPostBack With Group Validation', $this->source()); + $this->assertNotVisible("{$base}validator1"); - $this->type('ZipCode', 'test'); - $this->assertVisible('validator1'); + $this->type("{$base}ZipCode", 'test'); + $this->assertVisible("{$base}validator1"); - $this->type('Address', 'Sydney'); - $this->type('ZipCode', '2000'); + $this->type("{$base}Address", 'Sydney'); + $this->type("{$base}ZipCode", '2000'); - $this->assertNotVisible('validator1'); + $this->assertNotVisible("{$base}validator1"); $this->pause(800); - $this->assertValue('City', 'City: Sydney Zip: 2000'); + $this->assertValue("{$base}City", 'City: Sydney Zip: 2000'); } } diff --git a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php index de0ecad8..741c7a2d 100755 --- a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php @@ -1,19 +1,20 @@ <?php -class TimeTriggeredCallbackTestCase extends PradoGenericSeleniumTest +class TimeTriggeredCallbackTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=TimeTriggeredCallbackTest"); - $this->verifyTextPresent("TimeTriggeredCallback + ViewState Tests"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=TimeTriggeredCallbackTest"); + $this->assertContains("TimeTriggeredCallback + ViewState Tests", $this->source()); - $this->assertText("label1", "ViewState Counter :"); + $this->assertText("{$base}label1", "ViewState Counter :"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(8000); - $this->assertText("label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10"); + $this->assertText("{$base}label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10"); } } diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php index 5113cc92..8b0428a9 100755 --- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php @@ -1,20 +1,21 @@ <?php -class ValueTriggerTestCase extends PradoGenericSeleniumTest +class ValueTriggerTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ValueTriggerCallbackTest"); - $this->verifyTextPresent("Value Trigger Callback Test"); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ValueTriggerCallbackTest"); + $this->assertContains("Value Trigger Callback Test", $this->source()); - $this->assertText('label1', 'Label 1'); + $this->assertText("{$base}label1", 'Label 1'); - $this->type('text1', 'test'); + $this->type("{$base}text1", 'test'); $this->pause(2000); - $this->assertText('label1', 'Old = : New Value = test'); + $this->assertText("{$base}label1", 'Old = : New Value = test'); - $this->type('text1', 'more'); + $this->type("{$base}text1", 'more'); $this->pause(3000); - $this->assertText('label1', 'Old = test : New Value = more'); + $this->assertText("{$base}label1", 'Old = test : New Value = more'); } } |