diff options
author | xue <> | 2006-02-13 22:12:50 +0000 |
---|---|---|
committer | xue <> | 2006-02-13 22:12:50 +0000 |
commit | 3e60cbad4b79301ae086ecacbdc63af333532a43 (patch) | |
tree | aaa72887f9e5eaf94305c8a08a07f7a735c378ac /tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php | |
parent | 98e796c1a4f0bda1abc4df7e08df9ddb4f6e50af (diff) |
Added repeater functional tests.
Diffstat (limited to 'tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php')
-rw-r--r-- | tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php new file mode 100644 index 00000000..d34d6747 --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php @@ -0,0 +1,37 @@ +<?php
+
+class Repeater3TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&notheme=true", "");
+
+ // verify product name is required
+ $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0');
+ $this->type("ctl0_body_Repeater_ctl0_ProductName", "");
+ $this->click("//input[@type='submit' and @value='Save']", "");
+ $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl0');
+
+ // verify product price is of proper format
+ $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1');
+ $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "abc");
+ $this->click("//input[@type='submit' and @value='Save']", "");
+ $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl1');
+
+ // perform postback
+ $this->click("ctl0_body_Repeater_ctl0_ProductImported",'');
+ $this->type("ctl0_body_Repeater_ctl0_ProductName", "Mother Board");
+ $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "99.01");
+ $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "label=Accessories");
+ $this->clickAndWait("//input[@type='submit' and @value='Save']", "");
+ $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0');
+ $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1');
+
+ // verify postback results
+ $this->verifyElementPresent("//td[text()='Mother Board']",'');
+ $this->verifyElementNotPresent("//td[text()='Input Devices']",'');
+ $this->verifyElementPresent("//td[text()='99.01']",'');
+ }
+}
+
+?>
\ No newline at end of file |