diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-24 23:47:44 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-26 11:42:53 +0100 |
commit | aafdbae23b0669f098f94e0377ead6c6ae9ccf75 (patch) | |
tree | 4ef6bc74a3612ef583a81aeb225c44b2d68ba6e6 /tests/FunctionalTests/validators | |
parent | d564ec922a468fd8e32df4ccbe6e64d66252efc2 (diff) |
Ported some tests
Diffstat (limited to 'tests/FunctionalTests/validators')
4 files changed, 9 insertions, 6 deletions
diff --git a/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page b/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page index ad43135b..582fff59 100755 --- a/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page +++ b/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page @@ -16,7 +16,7 @@ ErrorMessage="*"
ControlCssClass="required">
<prop:ClientSide.OnValidate>
- sender.enabled = $('<%= $this->check1->ClientID %>').checked;
+ sender.enabled = $('#<%= $this->check1->ClientID %>').get(0).checked;
</prop:ClientSide.OnValidate>
</com:TRequiredFieldValidator>
diff --git a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php index 187351c1..0c18f43b 100755 --- a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php @@ -28,6 +28,7 @@ class CompareValidatorTestCase extends PradoGenericSeleniumTest $this->type("{$base}text3", "12312"); $this->click("//input[@type='submit' and @value='Test']", ""); + $this->pause(500); $this->assertVisible("{$base}validator2"); $this->type("{$base}text3", "13/1/2005"); diff --git a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php index 7ec220f0..58a74fe4 100755 --- a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php +++ b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php @@ -7,11 +7,11 @@ class DataTypeValidatorTestCase extends PradoGenericSeleniumTest { function test() { - $this->setSpeed(500); $base = "ctl0_Content_"; $this->open("validators/index.php?page=DataTypeValidator", ""); $this->verifyTextPresent("Data Type Validator Tests", ""); $this->click("//input[@type='submit' and @value='submit!']", ""); + $this->pause(500); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); @@ -21,6 +21,7 @@ class DataTypeValidatorTestCase extends PradoGenericSeleniumTest $this->type("{$base}textbox2", "b"); $this->type("{$base}textbox3", "c"); $this->click("//input[@type='submit' and @value='submit!']", ""); + $this->pause(500); $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); @@ -39,11 +40,11 @@ class DataTypeValidatorTestCase extends PradoGenericSeleniumTest $this->type("{$base}textbox2", "-12.5"); $this->type("{$base}textbox3", "2/13/2005"); $this->click("//input[@type='submit' and @value='submit!']", ""); + $this->pause(500); $this->assertVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); $this->assertVisible("{$base}validator3"); - $this->setSpeed(0); } } diff --git a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php index e7425a33..ab37ec06 100755 --- a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php +++ b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php @@ -17,6 +17,7 @@ class DatePickerTestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}validator8", ""); $this->click("{$base}submit1"); + $this->pause(500); $this->assertVisible("{$base}validator1", ""); $this->assertNotVisible("{$base}validator2", ""); @@ -27,8 +28,8 @@ class DatePickerTestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}validator6", ""); $this->assertVisible("{$base}validator8", ""); - $this->click("{$base}submit1"); - $this->pause(250); + $this->clickAndWait("{$base}submit1"); + $this->type("{$base}picker1", "13/4/$year"); $this->select("{$base}picker2_month", "label=9"); $this->select("{$base}picker2_day", "label=10"); @@ -43,8 +44,8 @@ class DatePickerTestCase extends PradoGenericSeleniumTest $this->select("{$base}picker6_month", "label=3"); $this->select("{$base}picker6_year", "label=$year2"); $this->select("{$base}picker6_day", "label=5"); - $this->click("{$base}submit1"); + $this->pause(500); $this->assertNotVisible("{$base}validator1", ""); $this->assertVisible("{$base}validator2", ""); |