diff options
author | wei <> | 2007-03-27 08:34:28 +0000 |
---|---|---|
committer | wei <> | 2007-03-27 08:34:28 +0000 |
commit | d5950ec0b553d46c4800adc0532d4464a4eb1883 (patch) | |
tree | 232a4f5ccbd36d6a114dff383adb383793422814 /tests/FunctionalTests/validators/tests | |
parent | cdf3ba1c190393d86460f8c13073dc9784436b3e (diff) |
Fixed #278, conditional validation.
Diffstat (limited to 'tests/FunctionalTests/validators/tests')
-rw-r--r-- | tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php new file mode 100644 index 00000000..7191ff9f --- /dev/null +++ b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php @@ -0,0 +1,55 @@ +<?php
+
+class ConditionalValidationTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = "ctl0_Content_";
+ $this->open("validators/index.php?page=ConditionalValidation", "");
+ $this->verifyTextPresent("Conditional Validation (clientside + server side)", "");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ $this->click("{$base}submit1");
+ $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ $this->click("{$base}check1");
+ $this->click("{$base}submit1");
+ $this->assertVisible("{$base}validator1", "");
+ $this->assertVisible("{$base}validator2", "");
+
+ $this->click("{$base}check1");
+ $this->click("{$base}submit1");
+ $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ $this->type("{$base}text1", "testing");
+ $this->clickAndWait("{$base}submit1");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ $this->type("{$base}text1" ,"");
+ $this->click("{$base}check1");
+ $this->click("{$base}submit1");
+ $this->assertVisible("{$base}validator1", "");
+ $this->assertVisible("{$base}validator2", "");
+
+ $this->type("{$base}text1", "test");
+ $this->type("{$base}text2", "123");
+ $this->clickAndWait("{$base}submit1");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ $this->click("{$base}check1");
+ $this->type("{$base}text1", "");
+ $this->type("{$base}text2", "");
+ $this->click("{$base}submit1");
+ $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ }
+
+}
+
+?>
|