From 70744a98444df0583d76f19d4e399a5cc49349b7 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 30 Mar 2007 01:28:43 +0000 Subject: add test case for #578 --- .gitattributes | 3 +++ .../tickets/protected/pages/Ticket578.page | 11 ++++++++ .../tickets/protected/pages/Ticket578.php | 13 ++++++++++ .../tickets/tests/Ticket578TestCase.php | 29 ++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket578.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket578.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket578TestCase.php diff --git a/.gitattributes b/.gitattributes index eaca3230..dffda353 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2405,6 +2405,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket54.page -text tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php -text tests/FunctionalTests/tickets/protected/pages/Ticket54Master.tpl -text tests/FunctionalTests/tickets/protected/pages/Ticket573.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket578.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket578.php -text tests/FunctionalTests/tickets/protected/pages/Ticket68.page -text tests/FunctionalTests/tickets/protected/pages/Ticket72.page -text tests/FunctionalTests/tickets/protected/pages/Ticket72.php -text @@ -2433,6 +2435,7 @@ tests/FunctionalTests/tickets/tests/Ticket488TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket521TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket54TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket573TestCase.php -text +tests/FunctionalTests/tickets/tests/Ticket578TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket72TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket93TestCase.php -text tests/FunctionalTests/validators.php -text diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket578.page b/tests/FunctionalTests/tickets/protected/pages/Ticket578.page new file mode 100644 index 00000000..e933fd33 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket578.page @@ -0,0 +1,11 @@ + +

ActiveControls broken by presence of THtmlArea in the .page

+ + + + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket578.php b/tests/FunctionalTests/tickets/protected/pages/Ticket578.php new file mode 100644 index 00000000..7d7dbaac --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket578.php @@ -0,0 +1,13 @@ +label1->Text = "Button 1 was clicked : " . htmlspecialchars($this->text1->Text); + } + +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php new file mode 100644 index 00000000..f95af91b --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php @@ -0,0 +1,29 @@ +open('tickets/index.php?page=Ticket578'); + $this->verifyTitle("Verifying Ticket 578", ""); + + $this->assertText("{$base}label1", "Label 1"); + $this->click("{$base}button1", ""); + $this->pause(800); + $this->assertText("{$base}label1", "Button 1 was clicked : "); + + $this->store($this->setTinymceHtml("{$base}text1", "helloworld"),"t2"); + $this->click("{$base}button1", ""); + $this->pause(800); + $this->assertText("{$base}label1", "Button 1 was clicked : helloworld"); + } + + function setTinymceHtml($id, $text) + { + $tinymce = "this.browserbot.getCurrentWindow().tinyMCE.getInstanceById('{$id}')"; + return 'javascript{'."{$tinymce}.setHTML('{$text}') ? 0 : 1".'}'; + } +} + +?> \ No newline at end of file -- cgit v1.2.3