From 840854be7886236d46d3408de5a084983373b4c7 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 10 Dec 2006 23:55:49 +0000 Subject: Fixed #470 --- .../tickets/protected/pages/Ticket470.page | 27 ++++++++++++ .../tickets/protected/pages/Ticket470.php | 24 ++++++++++ .../tickets/tests/Ticket470TestCase.php | 51 ++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket470.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket470.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket470TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket470.page b/tests/FunctionalTests/tickets/protected/pages/Ticket470.page new file mode 100644 index 00000000..c0ad23e6 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket470.page @@ -0,0 +1,27 @@ + + + + nbReload : + + Reload +
+ + + + Valid + + +
+ +
+
+ + + BUG : + click on 'Reload' with no text in the TextBox at anytime, and then, clicking on 'Valid' won't work... + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket470.php b/tests/FunctionalTests/tickets/protected/pages/Ticket470.php new file mode 100644 index 00000000..45741176 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket470.php @@ -0,0 +1,24 @@ +Results->Text = ""; + $this->counter->Text = $this->counter->Text +1; + $this->activePanelTest->renderControl($param->getNewWriter()); + } + + /** + *function to call when the form is valid (and the linkbutton fired his callback event) + */ + public function Valid($sender, $param){ + $this->Results->Text = "OK!!!"; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php new file mode 100644 index 00000000..05ad6fb6 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php @@ -0,0 +1,51 @@ +open('tickets/index.php?page=Ticket470'); + $this->verifyTitle("Verifying Ticket 470"); + $this->assertText("{$base}counter", "0"); + $this->assertText("{$base}Results", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "0"); + $this->assertText("{$base}Results", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}TextBox", "hello"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "0"); + $this->assertText("{$base}Results", "OK!!!"); + $this->assertNotVisible("{$base}validator1"); + + //reload + $this->click("{$base}reloadButton"); + $this->pause(800); + $this->assertValue("{$base}TextBox", "hello"); + $this->assertText("{$base}counter", "1"); + $this->assertText("{$base}Results", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->type("{$base}TextBox", ""); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "1"); + $this->assertText("{$base}Results", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}TextBox", "test"); + $this->click("{$base}button1"); + $this->pause(800); + $this->assertText("{$base}counter", "1"); + $this->assertText("{$base}Results", "OK!!!"); + $this->assertNotVisible("{$base}validator1"); + } +} + +?> \ No newline at end of file -- cgit v1.2.3