diff options
author | wei <> | 2006-10-21 02:46:12 +0000 |
---|---|---|
committer | wei <> | 2006-10-21 02:46:12 +0000 |
commit | 68eb20ae56e35cc48982be6f15c0738a276c3684 (patch) | |
tree | 520ce7d2d4f72ae3bd326b586be6f0cc1a38afb6 /tests/FunctionalTests/active-controls | |
parent | 5d6b7068de8768d56c4731cc7301438b69354d57 (diff) |
update ajax callback to be quequed
Diffstat (limited to 'tests/FunctionalTests/active-controls')
7 files changed, 113 insertions, 1 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page new file mode 100644 index 00000000..b8fba648 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page @@ -0,0 +1,7 @@ +<com:TForm>
+<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 diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php new file mode 100644 index 00000000..7e9195dc --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php @@ -0,0 +1,21 @@ +<?php
+
+class DelayedCallback extends TPage
+{
+ function callback1($sender, $param)
+ {
+ $ms = 4;
+ sleep($ms);
+ $this->status->Text="Callback 1 returned after {$ms}s";
+ }
+
+ function callback2($sender, $param)
+ {
+ $ms = 2;
+ sleep($ms);
+ $this->status->Text="Callback 2 delayed {$ms}s";
+ }
+
+}
+
+?>
\ 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 new file mode 100644 index 00000000..c68be7ca --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page @@ -0,0 +1,45 @@ +<com:THead />
+<com:TForm>
+
+<com:TActiveButton ID="button1" Text="Click Me!" OnCallback="button1_oncallback" />
+<com:TActiveLabel ID="label1" />
+
+<com:TActiveRatingList RepeatColumns="2" RepeatDirection="Vertical">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Stars" />
+ <com:TListItem Text="3 Stars" />
+ <com:TListItem Text="4 Stars" />
+ <com:TListItem Text="5 Stars" />
+ <com:TListItem Text="6 Stars" />
+ <com:TListItem Text="7 Stars" />
+ <com:TListItem Text="8 Stars" />
+ <com:TListItem Text="9 Stars" />
+ <com:TListItem Text="10 Stars" />
+ <prop:ClientSide
+ OnLoading="Element.show('status')"
+ OnComplete="Element.hide('status')" />
+</com:TActiveRatingList>
+<br />
+
+<com:TActiveRatingList ID="list4" Rating="3.5" Attributes.title="3.5 Stars" ReadOnly="true">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Stars" />
+ <com:TListItem Text="3 Stars" />
+ <com:TListItem Text="4 Stars" />
+ <com:TListItem Text="5 Stars" />
+</com:TActiveRatingList>
+
+<br />
+
+ <div id="status" style="margin:1em; padding:0.5em;
+ text-align:center;
+ background-color:#900;
+ color:white; display: none;
+ position: absolute; right: 0; top: 0">
+ Loading...
+ </div>
+
+
+<com:TJavascriptLogger />
+
+</com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php new file mode 100644 index 00000000..3291189c --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php @@ -0,0 +1,11 @@ +<?php
+
+class PageStateTest extends TPage
+{
+ function button1_oncallback($sender, $param)
+ {
+ $this->label1->Text .= " button1 clicked ";
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml new file mode 100644 index 00000000..754e9bc5 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <pages StatePersisterClass="System.Web.UI.TSessionPageStatePersister" />
+</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php index 96c0fb4b..59b266d8 100644 --- a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php @@ -4,6 +4,8 @@ class AutoCompleteTestCase extends SeleniumTestCase { function test() { + $this->skipBrowsers(self::INTERNET_EXPLORER); + $this->open("active-controls/index.php?page=AutoCompleteTest"); $this->verifyTextPresent("TAutoComplete Test"); @@ -16,7 +18,7 @@ class AutoCompleteTestCase extends SeleniumTestCase $this->pause(1000); $this->verifyTextPresent('Australia'); $this->click("heading"); //click somewhere else. - $this->waitForText("label1", "suggestion for au"); + $this->pause(800); $this->assertText("label1", "suggestion for au"); $this->click("css=#textbox3_result ul li"); $this->pause(800); diff --git a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php new file mode 100644 index 00000000..3653dae1 --- /dev/null +++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php @@ -0,0 +1,22 @@ +<?php
+
+class DelayedCallbackTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("active-controls/index.php?page=DelayedCallback");
+ $this->verifyTextPresent("Delayed Callback Test");
+
+ $this->assertText("status", "");
+ $this->click("button1");
+ $this->click("button2");
+
+ $this->pause("5000");
+ $this->assertText("status", "Callback 1 returned after 4s");
+ $this->pause("3000");
+ $this->assertText("status", "Callback 2 delayed 2s");
+
+ }
+}
+
+?>
\ No newline at end of file |