From 8d8b6688cbbb1febe92012ccc2a4158fa594fcb3 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 5 Jul 2006 04:23:43 +0000 Subject: Fixed #223 #225 --- .../features/protected/pages/ClientScripTest.page | 30 ----------- .../features/protected/pages/CompositeControl.page | 12 ----- .../features/protected/pages/DatePicker.page | 61 ---------------------- .../features/protected/pages/HtmlArea.page | 25 --------- .../features/protected/pages/test.js | 4 -- .../features/tests/CompositeControlTestCase.php | 23 -------- .../tickets/protected/pages/Ticket220.page | 30 +++++++++++ .../tickets/protected/pages/Ticket225.page | 14 +++++ .../tickets/protected/pages/Ticket225.php | 19 +++++++ .../tickets/protected/pages/test.js | 4 ++ .../tickets/tests/Ticket220TestCase.php | 18 +++++++ .../tickets/tests/Ticket225TestCase.php | 24 +++++++++ 12 files changed, 109 insertions(+), 155 deletions(-) delete mode 100644 tests/FunctionalTests/features/protected/pages/ClientScripTest.page delete mode 100644 tests/FunctionalTests/features/protected/pages/CompositeControl.page delete mode 100644 tests/FunctionalTests/features/protected/pages/DatePicker.page delete mode 100644 tests/FunctionalTests/features/protected/pages/HtmlArea.page delete mode 100644 tests/FunctionalTests/features/protected/pages/test.js delete mode 100644 tests/FunctionalTests/features/tests/CompositeControlTestCase.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket220.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket225.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket225.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/test.js create mode 100644 tests/FunctionalTests/tickets/tests/Ticket220TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket225TestCase.php (limited to 'tests') diff --git a/tests/FunctionalTests/features/protected/pages/ClientScripTest.page b/tests/FunctionalTests/features/protected/pages/ClientScripTest.page deleted file mode 100644 index d5b6e182..00000000 --- a/tests/FunctionalTests/features/protected/pages/ClientScripTest.page +++ /dev/null @@ -1,30 +0,0 @@ - -

ClientScript Test

- - > - if(typeof(ClientScriptInfo) == "undefined") - ClientScriptInfo = []; - ClientScriptInfo.push("ok 3?") - - - - if(typeof(ClientScriptInfo) == "undefined") - ClientScriptInfo = []; - ClientScriptInfo.push("ok 2!") - - - - - - - Event.observe("button1", "click", function() - { - element = $("<%= $this->label1->ClientID %>"); - if(element) - element.innerHTML = "Label 1: "+inspect(ClientScriptInfo); - else - alert("failed"); - }); - - -
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/CompositeControl.page b/tests/FunctionalTests/features/protected/pages/CompositeControl.page deleted file mode 100644 index b135445a..00000000 --- a/tests/FunctionalTests/features/protected/pages/CompositeControl.page +++ /dev/null @@ -1,12 +0,0 @@ - -

Composite Control Test

-
-
- - -user->TextBox->Text != "" %> > -

Result

- User: <%= $this->user->TextBox->Text %> Pass: <%= $this->pass->TextBox->Text %> -
- -
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/DatePicker.page b/tests/FunctionalTests/features/protected/pages/DatePicker.page deleted file mode 100644 index 261a6994..00000000 --- a/tests/FunctionalTests/features/protected/pages/DatePicker.page +++ /dev/null @@ -1,61 +0,0 @@ - - -

TDatePicker Samples

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Default TDatePicker - -
Button Mode, pre-selected date - -
InputMode="DropDownList", custom DateFormat - -
InputMode="DropDownList", custom DateFormat, Culture - -
Custom DateFormat, culture, ImageButton mode, pre-selected date - /> -
Custom DateFormat, DropDownList, pre-selected date set in as Text - -
DropDownList, pre-selected date as integer - /> -
- -
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/HtmlArea.page b/tests/FunctionalTests/features/protected/pages/HtmlArea.page deleted file mode 100644 index 3936e68c..00000000 --- a/tests/FunctionalTests/features/protected/pages/HtmlArea.page +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/test.js b/tests/FunctionalTests/features/protected/pages/test.js deleted file mode 100644 index e8e80b19..00000000 --- a/tests/FunctionalTests/features/protected/pages/test.js +++ /dev/null @@ -1,4 +0,0 @@ -if(typeof(ClientScriptInfo) == "undefined") - ClientScriptInfo = []; - -ClientScriptInfo.push("ok") \ No newline at end of file diff --git a/tests/FunctionalTests/features/tests/CompositeControlTestCase.php b/tests/FunctionalTests/features/tests/CompositeControlTestCase.php deleted file mode 100644 index dda3f63b..00000000 --- a/tests/FunctionalTests/features/tests/CompositeControlTestCase.php +++ /dev/null @@ -1,23 +0,0 @@ -open("features/index.php?page=CompositeControl", ""); - $this->verifyTextPresent("Composite Control Test", ""); - $this->type("{$base}user_textbox", "Hello"); - $this->type("{$base}pass_textbox", "world"); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyTextPresent("Result", ""); - $this->verifyTextPresent("User: Hello Pass: world", ""); - } - -} - -?> diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page new file mode 100644 index 00000000..d5b6e182 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page @@ -0,0 +1,30 @@ + +

ClientScript Test

+ + > + if(typeof(ClientScriptInfo) == "undefined") + ClientScriptInfo = []; + ClientScriptInfo.push("ok 3?") + + + + if(typeof(ClientScriptInfo) == "undefined") + ClientScriptInfo = []; + ClientScriptInfo.push("ok 2!") + + + + + + + Event.observe("button1", "click", function() + { + element = $("<%= $this->label1->ClientID %>"); + if(element) + element.innerHTML = "Label 1: "+inspect(ClientScriptInfo); + else + alert("failed"); + }); + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket225.page b/tests/FunctionalTests/tickets/protected/pages/Ticket225.page new file mode 100644 index 00000000..362c4dce --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket225.page @@ -0,0 +1,14 @@ + +

RadioButton Group Tests

+ + + + + + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket225.php b/tests/FunctionalTests/tickets/protected/pages/Ticket225.php new file mode 100644 index 00000000..2cc3fc38 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket225.php @@ -0,0 +1,19 @@ +label1->setText($this->getGroupIDs($this->button1)); + } + + private function getGroupIDs($radio) + { + $ids = ''; + foreach($radio->getRadioButtonsInGroup() as $control) + $ids .= " ".$control->getUniqueID(); + return $ids; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/test.js b/tests/FunctionalTests/tickets/protected/pages/test.js new file mode 100644 index 00000000..e8e80b19 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/test.js @@ -0,0 +1,4 @@ +if(typeof(ClientScriptInfo) == "undefined") + ClientScriptInfo = []; + +ClientScriptInfo.push("ok") \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php new file mode 100644 index 00000000..0753f732 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php @@ -0,0 +1,18 @@ +open('tickets/index.php?page=Ticket220'); + $this->assertTextPresent('ClientScript Test'); + $this->assertText("{$base}label1", "Label 1"); + + $this->click("button1"); + $this->assertText("{$base}label1", 'Label 1: ["ok", "ok 3?", "ok 2!"]'); + $this->assertAlertNotPresent(); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php new file mode 100644 index 00000000..966e8383 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php @@ -0,0 +1,24 @@ +open('tickets/index.php?page=Ticket225'); + $this->assertTextPresent('RadioButton Group Tests'); + $this->assertText("{$base}label1", "Label 1"); + + $this->assertNotVisible("{$base}validator1"); + $this->click("{$base}button4"); + $this->assertVisible("{$base}validator1"); + + $this->click("{$base}button2"); + $this->clickAndWait("{$base}button4"); + + $this->assertText("{$base}label1", 'ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3'); + $this->assertNotVisible("{$base}validator1"); + } +} + +?> \ No newline at end of file -- cgit v1.2.3