From 36ef6f1b680ff1ea525a293c3464f0dedad11c1f Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 2 Apr 2007 07:11:06 +0000 Subject: Add testcase #290 --- .../tickets/protected/pages/Ticket290.page | 21 +++++++++++++++++ .../tickets/protected/pages/Ticket290.php | 16 +++++++++++++ .../tickets/tests/Ticket290TestCase.php | 26 ++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket290.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket290.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket290TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page new file mode 100644 index 00000000..a785d5db --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.php b/tests/FunctionalTests/tickets/protected/pages/Ticket290.php new file mode 100644 index 00000000..c5e9e357 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.php @@ -0,0 +1,16 @@ +label1->Text = "Doing Validation"; + } + + function button_clicked($sender, $param) + { + $this->label2->Text = $sender->Text . " Clicked!"; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php new file mode 100644 index 00000000..e32e58bf --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php @@ -0,0 +1,26 @@ +open('tickets/index.php?page=Ticket290'); + $this->assertTitle("Verifying Ticket 290"); + + $this->assertText("{$base}label1", "Label 1"); + $this->assertText("{$base}label2", "Label 2"); + + $this->type("{$base}textbox1", "test"); + $this->keyDownAndWait("{$base}textbox1", "\\13"); + + $this->assertText("{$base}label1", "Doing Validation"); + $this->assertText("{$base}label2", "Button 2 (default) Clicked!"); + } +} + + +?> \ No newline at end of file -- cgit v1.2.3