diff options
Diffstat (limited to 'tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php')
-rw-r--r-- | tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php new file mode 100644 index 00000000..751ab80a --- /dev/null +++ b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php @@ -0,0 +1,34 @@ +<?php
+
+//New Test
+class RegExpValidatorTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = "ctl0_Content_";
+ $this->open("validators/index.php?page=RegularExpressionValidator", "");
+ $this->verifyTextPresent("Prado RegularExpressionValidator Tests", "");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+ $this->type("{$base}text1", "1");
+ $this->type("{$base}text2", "2");
+ $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->assertVisible("{$base}validator1", "");
+ $this->assertVisible("{$base}validator2", "");
+ $this->type("{$base}text1", "asdasd");
+ $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->assertVisible("{$base}validator1", "");
+ $this->type("{$base}text1", "12345");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertVisible("{$base}validator2", "");
+ $this->type("{$base}text2", "wei@gmail.com");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+ $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
+ $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator2", "");
+
+ }
+}
+
+?>
\ No newline at end of file |