From 875efd1707a2ac5307b24181ddd7e0420bff5854 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 2 Jul 2006 05:50:29 +0000 Subject: fixed 3.02 bug --- .../tickets/protected/pages/Ticket205.page | 24 +++++++++++++- .../tickets/protected/pages/Ticket205.php | 11 +++++++ .../tickets/protected/pages/Ticket207.page | 16 ++++++---- .../tickets/tests/Ticket205TestCase.php | 23 ++++++++++++++ .../tickets/tests/Ticket207TestCase.php | 37 ++++++++++++++++++++++ 5 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket205.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket205TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket207TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page index 1f271c14..1481a227 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page @@ -1,4 +1,26 @@

TCustomValidator not enabling ControlCssClass or prop:ClientSide.OnError after postback.

- + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.php b/tests/FunctionalTests/tickets/protected/pages/Ticket205.php new file mode 100644 index 00000000..6145af9a --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.php @@ -0,0 +1,11 @@ +IsValid = $this->textbox1->Text == "Prado"; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page index 8826c208..556c5aae 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page @@ -1,13 +1,17 @@

Validators ClientSide.OnError triggered twice

-
- +

Use ClientSide.ObseveChanges="false"

+
+
-
- +
+
- +

Conditions

 	(TextBox? B is just there to prevent server submission)
diff --git a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
new file mode 100644
index 00000000..85785697
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
@@ -0,0 +1,23 @@
+open("tickets/index.php?page=Ticket205");
+		$this->assertTitle("Verifying Ticket 205");
+		$this->assertNotVisible("{$base}validator1");
+		
+		$this->type("{$base}textbox1", "test");
+		$this->click("{$base}button1");
+		$this->assertVisible("{$base}validator1");
+		$this->assertAlert("error");
+		
+		$this->type("{$base}textbox1", "Prado");
+		$this->clickAndWait("{$base}button1");		
+		$this->assertNotVisible("{$base}validator1");
+	}
+}
+
+?>
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
new file mode 100644
index 00000000..53ae6528
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
@@ -0,0 +1,37 @@
+open('tickets/index.php?page=Ticket207');
+		$this->assertTitle("Verifying Ticket 207");
+		$this->assertNotVisible("{$base}validator1");
+		$this->assertNotVisible("{$base}validator2");
+		
+		$this->click("{$base}button1");
+		$this->assertAlert('error on text1 fired');
+		$this->assertVisible("{$base}validator1");
+		$this->assertVisible("{$base}validator2");
+		
+		$this->type("{$base}text1", 'test');
+		$this->assertVisible("{$base}validator1");
+		$this->assertVisible("{$base}validator2");
+
+		$this->click("{$base}button1");
+		$this->assertNotVisible("{$base}validator1");
+		$this->assertVisible("{$base}validator2");
+
+		$this->type("{$base}text1", '');
+		$this->assertNotVisible("{$base}validator1");
+		$this->assertVisible("{$base}validator2");
+
+		$this->click("{$base}button1");
+		$this->assertAlert('error on text1 fired');
+		$this->assertVisible("{$base}validator1");
+		$this->assertVisible("{$base}validator2");
+	}
+}
+
+?>
\ No newline at end of file
-- 
cgit v1.2.3