diff options
author | xue <> | 2006-01-23 05:03:53 +0000 |
---|---|---|
committer | xue <> | 2006-01-23 05:03:53 +0000 |
commit | 632d932373b53d40bae313d8b1d899c76d428a82 (patch) | |
tree | 7e08a4faa32ac6e56b921073b6477ecdae1304ef /tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php | |
parent | 7a3e29d0db0104ae9f4c3a74147e534a943e164c (diff) |
TTextBox FT completed.
Diffstat (limited to 'tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php')
-rw-r--r-- | tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php index 583d7583..55cbe19c 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php +++ b/tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php @@ -5,9 +5,7 @@ class TextBoxTestCase extends SeleniumTestCase function test ()
{
$this->open("../../demos/quickstart/?page=Controls.Samples.TTextBox.Home", "");
- // a read-only multiline textbox
- $this->verifyAttribute("ctl0\$body\$ctl13@readonly","regexp:/(true|readonly)/");
-return;
+
$this->verifyTitle("PRADO QuickStart Sample", "");
// a normal textbox
@@ -25,10 +23,10 @@ return; $this->type("ctl0\$body\$ctl3", "last");
// a disabled textbox
- $this->verifyAttribute("ctl0\$body\$ctl4@disabled","disabled");
+ $this->verifyAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled");
// a read-only textbox
- $this->verifyAttribute("ctl0\$body\$ctl5@readonly","readonly");
+ $this->verifyAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly");
// auto postback textbox, CausesValidation=false
$this->verifyValue("ctl0\$body\$ctl6", "change me");
@@ -56,28 +54,39 @@ return; // password
$this->verifyAttribute("ctl0\$body\$ctl9@type","password");
- $this->type("ctl0\$body\$TextBox3", "tests");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->type("ctl0\$body\$ctl9", "test");
- $this->type("ctl0\$body\$ctl10", "test
-test
-test");
+ // ------------------multiline textbox----------------------
+
+ // regular textbox
+ $this->type("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox.");
$this->type("ctl0\$body\$ctl11", "This is a multiline text box.
In HTML, it is displayed as a textarea.
-test ");
- $this->typeAndWait("ctl0\$body\$ctl14", "change med");
- $this->type("ctl0\$body\$MultiTextBox3", "test");
- $this->verifyTextPresent("You must enter a value not equal to 'test'.", "");
- $this->typeAndWait("ctl0\$body\$MultiTextBox3", "testd");
-
+End of message
+");
// a disabled multiline textbox
- $this->verifyAttribute("ctl0\$body\$ctl12@disabled","disabled");
+ $this->verifyAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled");
- //$this->verifyElementPresent("//ctl0\$body\$ctl13[@readonly]");
+ // a read-only multiline textbox
+ $this->verifyAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly");
$this->verifyAttribute("ctl0\$body\$ctl13@wrap","off");
+ // auto postback textbox
+ $this->verifyValue("ctl0\$body\$ctl14", "change me");
+ $this->typeAndWait("ctl0\$body\$ctl14", "change mes");
+ $this->verifyValue("ctl0\$body\$ctl14", "text changed");
+ $this->verifyValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox.");
+ $this->verifyValue("ctl0\$body\$ctl11", "This is a multiline text box.
+In HTML, it is displayed as a textarea.
+End of message
+");
+
+ // textbox associated with a validator
+ $this->verifyNotVisible('ctl0_body_ctl15');
+ $this->type("ctl0\$body\$MultiTextBox3", "demo");
+ $this->pause(1000);
+ $this->verifyVisible('ctl0_body_ctl15');
+ $this->typeAndWait("ctl0\$body\$MultiTextBox3", "non demo");
+ $this->verifyNotVisible('ctl0_body_ctl15');
}
}
|