From aafdbae23b0669f098f94e0377ead6c6ae9ccf75 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 24 Nov 2013 23:47:44 +0100 Subject: Ported some tests --- .../active-controls/protected/pages/CallbackOptionsTest.page | 10 +++++----- .../validators/protected/pages/ConditionalValidation.page | 2 +- .../validators/tests/CompareValidatorTestCase.php | 1 + .../validators/tests/DataTypeValidatorTestCase.php | 5 +++-- tests/FunctionalTests/validators/tests/DatePickerTestCase.php | 7 ++++--- 5 files changed, 14 insertions(+), 11 deletions(-) (limited to 'tests/FunctionalTests') diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page index 3cecbade..975def5c 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page @@ -3,25 +3,25 @@ - $("status").show(); + $("#status").show(); - $("status").hide(); + $("#status").hide(); - Element.update("label1", "Button 1 has returned"); + $("#label1").html("Button 1 has returned"); - Element.update("label2", "Button 2 has returned"); + $("#label2").html("Button 2 has returned"); - Element.update("label3", "Button 3 has returned"); + $("#label3").html("Button 3 has returned"); 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