From a825f07717a03d8b818f93ff3f7aff275fb8527f Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 24 Nov 2013 23:47:44 +0100 Subject: Ported some tests --- .../validators/protected/pages/ConditionalValidation.page | 2 +- .../FunctionalTests/validators/tests/CompareValidatorTestCase.php | 1 + .../FunctionalTests/validators/tests/DataTypeValidatorTestCase.php | 5 +++-- tests/FunctionalTests/validators/tests/DatePickerTestCase.php | 7 ++++--- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'tests/FunctionalTests/validators') 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"> - sender.enabled = $('<%= $this->check1->ClientID %>').checked; + sender.enabled = $('#<%= $this->check1->ClientID %>').get(0).checked; 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", ""); -- cgit v1.2.3