diff options
Diffstat (limited to 'tests/FunctionalTests/active-controls')
5 files changed, 57 insertions, 3 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page index 5c2d1abb..8eff7105 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page @@ -1,4 +1,5 @@ <com:TForm ID="form1"> + <h1>TActiveButton Functional Test</h1> <com:TActiveButton ID="button2" Text="Button 1" OnClick="button2_onclick" OnCallback="button2_oncallback" /> @@ -6,4 +7,5 @@ <com:TActiveLabel ID="label1" Text="Label 1" /> <com:TJavascriptLogger /> + </com:TForm>
\ 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 d0a750ac..b05ce62e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page @@ -2,4 +2,5 @@ <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 diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page index 93658bd7..b7429c60 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page @@ -15,6 +15,11 @@ font-family: Tahoma, Arial, Helvetica, sans-serif; color: #333; } + + ul.different + { + background-color: pink; + } .autocomplete li { @@ -27,14 +32,33 @@ } </style> - <h1>TAutoComplete Test</h1> + <h1 id="heading">TAutoComplete Test</h1> + <div><strong>Manual Testing Required</strong></div> <com:TAutoComplete Style="width: 20em" - OnCallback="suggestCountries" + ID="textbox1" + OnSuggest="suggestCountries" Separator=", " ResultPanel.CssClass="autocomplete" /> + <com:TAutoComplete Style="width: 30em; height: 20em" TextMode="MultiLine" + OnSuggest="suggestCountries" + Separator=", \n" + ResultPanel.CssClass="autocomplete"> + <prop:Suggestions.HeaderTemplate> + <ul class="different"> + </prop:Suggestions.HeaderTemplate> + </com:TAutoComplete> + + <com:TAutoComplete Style="width: 20em" + id="textbox3" + OnSuggest="suggestCountries" + OnCallback="callback_requested" + Separator=", " AutoPostBack="true" + ResultPanel.CssClass="autocomplete" /> + <p><br /></p> + <com:TActiveLabel ID="label1" Text="Label 1" /> <p><br /></p> <p><br /></p> <p><br /></p> diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php index 938b8640..df314891 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php @@ -9,7 +9,13 @@ class AutoCompleteTest extends TPage { $sender->setDataSource($this->matchCountries($param->getParameter())); $sender->dataBind(); - $sender->render($param->getOutput()); + $sender->flush($param->getOutput()); + $this->label1->Text = "suggestion for ".$param->getParameter(); + } + + public function callback_requested($sender, $param) + { + $this->label1->Text = "Label 1: ".$this->textbox3->Text; } protected function matchCountries($token) diff --git a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php new file mode 100644 index 00000000..f8b4cf55 --- /dev/null +++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php @@ -0,0 +1,21 @@ +<?php + +class AutoCompleteTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=AutoCompleteTest"); + $this->verifyTextPresent("TAutoComplete Test"); + + $this->assertText("label1", "Label 1"); + + $this->type("textbox3", "Australia"); + $this->pause(500); + $this->click("heading"); //click somewhere else. + $this->pause(500); + $this->assertText("label1", "Label 1: Australia"); + + } +} + +?>
\ No newline at end of file |