From 5e82afde4d98b26b36fc14980efa75393d6ef77e Mon Sep 17 00:00:00 2001 From: tof <> Date: Thu, 17 Jul 2008 08:52:51 +0000 Subject: Added TestCase for #698 --- .../tickets/protected/pages/Ticket698.page | 7 +++++++ .../tickets/protected/pages/Ticket698.php | 15 +++++++++++++++ .../tickets/tests/Ticket698TestCase.php | 20 ++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket698.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket698.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket698TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket698.page b/tests/FunctionalTests/tickets/protected/pages/Ticket698.page new file mode 100644 index 00000000..686fef9d --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket698.page @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket698.php b/tests/FunctionalTests/tickets/protected/pages/Ticket698.php new file mode 100644 index 00000000..e7bf6646 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket698.php @@ -0,0 +1,15 @@ +EditHtmlTextBox->EnableVisualEdit = !$this->EditHtmlTextBox->EnableVisualEdit; + } + + public function switchContentTypeCallback( $sender, $param ) { + $this->ContentPanel->render( $param->NewWriter ); + } +} +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php new file mode 100644 index 00000000..30911d5d --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php @@ -0,0 +1,20 @@ +open('tickets/index.php?page=Ticket698'); + $this->assertTitle("Verifying Ticket 698"); + + $this->click($base."switchContentTypeButton"); + $this->pause(800); + $this->assertVisible($base."EditHtmlTextBox"); + $this->pause(800); + $this->click($base."switchContentTypeButton"); + $this->pause(1000); + $this->assertNotVisible($base."EditHtmlTextBox"); + } + +} +?> \ No newline at end of file -- cgit v1.2.3