summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests
diff options
context:
space:
mode:
authorwei <>2007-03-30 01:28:43 +0000
committerwei <>2007-03-30 01:28:43 +0000
commit70744a98444df0583d76f19d4e399a5cc49349b7 (patch)
treec6b2d57c47197d8a073da09e09011ec2b11e2cac /tests/FunctionalTests/tickets/tests
parent3fb25eec92c0c72760c4bf8040efd4b86c446bc6 (diff)
add test case for #578
Diffstat (limited to 'tests/FunctionalTests/tickets/tests')
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket578TestCase.php29
1 files changed, 29 insertions, 0 deletions
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 @@
+<?php
+
+class Ticket578TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->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