summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/tests
diff options
context:
space:
mode:
authorwei <>2007-03-27 08:34:28 +0000
committerwei <>2007-03-27 08:34:28 +0000
commitd5950ec0b553d46c4800adc0532d4464a4eb1883 (patch)
tree232a4f5ccbd36d6a114dff383adb383793422814 /tests/FunctionalTests/validators/tests
parentcdf3ba1c190393d86460f8c13073dc9784436b3e (diff)
Fixed #278, conditional validation.
Diffstat (limited to 'tests/FunctionalTests/validators/tests')
-rw-r--r--tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php55
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", "");
+
+ }
+
+}
+
+?>