summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests
diff options
context:
space:
mode:
authorwei <>2006-08-11 05:05:32 +0000
committerwei <>2006-08-11 05:05:32 +0000
commitb687748278d29510bb28875627c98b5da0a96cc5 (patch)
tree6d4f4b89027129530eae6d6aaf9c96c18b5ad8e2 /tests/FunctionalTests/active-controls/tests
parentdeb09283421970296b7ec6931d9eab3529be44ed (diff)
Fixed callback replace content.
Diffstat (limited to 'tests/FunctionalTests/active-controls/tests')
-rw-r--r--tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php22
-rw-r--r--tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php48
-rw-r--r--tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php24
3 files changed, 94 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
new file mode 100644
index 00000000..b927b3e9
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
@@ -0,0 +1,22 @@
+<?php
+
+class CustomTemplateTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('active-controls/index.php?page=CustomTemplateControlTest');
+ $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test');
+ $this->assertText('label1', 'Label 1');
+
+ $this->type('foo', 'Foo Bar!');
+ $this->click('button2');
+ $this->pause(500);
+
+ $this->assertVisible('ctl1_ThePanel');
+ $this->assertTextPresent('Client ID: ctl1_ThePanel');
+
+ $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
new file mode 100644
index 00000000..de4cbc71
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
@@ -0,0 +1,48 @@
+<?php
+
+class ReplaceContentTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('active-controls/index.php?page=ReplaceContentTest');
+ $this->assertTextPresent('Callback Replace Content Test');
+
+ $this->assertText('subpanel', 'Sub Panel');
+ $this->assertText('panel1', 'Main Panel Sub Panel');
+
+ $this->type('content', 'something');
+
+ $this->click('btn_append');
+ $this->pause(500);
+
+ $this->assertText('subpanel', 'Sub Panel something');
+ $this->assertText('panel1', 'Main Panel Sub Panel something');
+
+ $this->type('content', 'more');
+ $this->click('btn_prepend');
+ $this->pause(500);
+
+ $this->assertText('subpanel', 'more Sub Panel something');
+ $this->assertText('panel1', 'Main Panel more Sub Panel something');
+
+
+ $this->type('content', 'prado');
+ $this->click('btn_before');
+ $this->pause(500);
+
+ $this->assertText('subpanel', 'more Sub Panel something');
+ $this->assertText('panel1', 'Main Panel pradomore Sub Panel something');
+
+ $this->type('content', ' php ');
+ $this->click('btn_after');
+ $this->pause(500);
+
+ $this->type('content', 'mauahahaha');
+ $this->click('btn_replace');
+ $this->pause(1000);
+
+ $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
new file mode 100644
index 00000000..b0950cbc
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
@@ -0,0 +1,24 @@
+<?php
+
+class TextBoxGroupValidationTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("active-controls/index.php?page=TextBoxValidationCallback");
+ $this->assertTextPresent('TextBox AutoPostBack With Group Validation');
+ $this->assertNotVisible('validator1');
+
+ $this->type('ZipCode', 'test');
+ $this->assertVisible('validator1');
+
+ $this->type('Address', 'Sydney');
+ $this->type('ZipCode', '2000');
+
+ $this->assertNotVisible('validator1');
+
+ $this->pause(500);
+ $this->assertValue('City', 'City: Sydney Zip: 2000');
+ }
+}
+
+?> \ No newline at end of file