From 101d1733f1ed5421161ee40c02d91e55ef9eafcb Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 22 Jan 2006 00:17:02 +0000 Subject: Added tests for checkbox with validation. --- .../protected/pages/Validation/CheckBox.page | 37 ++++++++++++++++++++++ .../protected/pages/Validation/CheckBox.php | 31 ++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 tests/FunctionalTests/protected/pages/Validation/CheckBox.page create mode 100644 tests/FunctionalTests/protected/pages/Validation/CheckBox.php (limited to 'tests/FunctionalTests') diff --git a/tests/FunctionalTests/protected/pages/Validation/CheckBox.page b/tests/FunctionalTests/protected/pages/Validation/CheckBox.page new file mode 100644 index 00000000..42241ca7 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/Validation/CheckBox.page @@ -0,0 +1,37 @@ +<%@ Title="Basic TRequiredFieldValidator" %> + + + +

An AutoPostBack CheckBox

+ + +
+ +
+ +
+!> +Input: + +
+ + +
+
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/Validation/CheckBox.php b/tests/FunctionalTests/protected/pages/Validation/CheckBox.php new file mode 100644 index 00000000..b85bf383 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/Validation/CheckBox.php @@ -0,0 +1,31 @@ +IsPostBack) + $this->dataBind(); + } +} + +class CheckBoxTestCase extends SeleniumTestCase +{ + function setup() + { + $this->open(Prado::getApplication()->getTestPage(__FILE__)); + } + + function testValidator() + { + $this->assertTextPresent("Basic TRequiredFieldValidator Test1"); + $this->assertNotVisible("validator1"); + $this->click("button1"); + $this->assertVisible("validator1"); + $this->type("text1", "test"); + $this->clickAndWait("button1"); + $this->assertNotVisible("validator1"); + } +} + +?> \ No newline at end of file -- cgit v1.2.3