From 7e002c23edc5fb5db70935591aa6adeda25fc7fb Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 2 Jul 2006 18:05:42 +0000 Subject: Merge from 3.0 branch till 1224. --- tests/FunctionalTests/index.php | 2 +- .../tickets/protected/pages/Home.page | 3 ++ .../tickets/protected/pages/Home.php | 34 ++++++++++++++++++++ .../tickets/protected/pages/Ticket200.page | 6 ++++ .../tickets/protected/pages/Ticket200.php | 16 ++++++++++ .../tickets/protected/pages/Ticket202.page | 19 +++++++++++ .../tickets/protected/pages/Ticket205.page | 26 +++++++++++++++ .../tickets/protected/pages/Ticket205.php | 11 +++++++ .../tickets/protected/pages/Ticket207.page | 24 ++++++++++++++ .../tickets/protected/pages/Ticket227.page | 4 +++ .../tickets/protected/pages/Ticket246.page | 17 ++++++++++ .../tickets/tests/Ticket205TestCase.php | 23 ++++++++++++++ .../tickets/tests/Ticket207TestCase.php | 37 ++++++++++++++++++++++ .../tickets/tests/Ticket227TestCase.php | 12 +++++++ .../tickets/tests/Ticket246TestCase.php | 12 +++++++ .../validators/protected/pages/Home.page | 3 ++ .../validators/protected/pages/Home.php | 34 ++++++++++++++++++++ 17 files changed, 282 insertions(+), 1 deletion(-) create mode 100755 tests/FunctionalTests/tickets/protected/pages/Home.page create mode 100755 tests/FunctionalTests/tickets/protected/pages/Home.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket200.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket200.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket202.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket205.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket205.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket207.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket227.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket246.page create mode 100644 tests/FunctionalTests/tickets/tests/Ticket205TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket207TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket227TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket246TestCase.php create mode 100755 tests/FunctionalTests/validators/protected/pages/Home.page create mode 100755 tests/FunctionalTests/validators/protected/pages/Home.php (limited to 'tests') diff --git a/tests/FunctionalTests/index.php b/tests/FunctionalTests/index.php index ceba599a..c4b3123b 100644 --- a/tests/FunctionalTests/index.php +++ b/tests/FunctionalTests/index.php @@ -14,4 +14,4 @@ Prado Functional Test Suites
  • Tests of New Features (list of new features)
  • - \ No newline at end of file + diff --git a/tests/FunctionalTests/tickets/protected/pages/Home.page b/tests/FunctionalTests/tickets/protected/pages/Home.page new file mode 100755 index 00000000..d4ac162c --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Home.page @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Home.php b/tests/FunctionalTests/tickets/protected/pages/Home.php new file mode 100755 index 00000000..37804419 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Home.php @@ -0,0 +1,34 @@ +getPageList(dirname(__FILE__),''); + $this->List->DataSource=$list; + $this->List->dataBind(); + } + + protected function getPageList($directory,$basePath) + { + $list=array(); + $folder=@opendir($directory); + while($entry=@readdir($folder)) + { + if($entry[0]==='.') + continue; + else if(is_file($directory.'/'.$entry)) + { + if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) + $list['?page='.$basePath.$page]=$basePath.$page; + } + else + $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); + } + closedir($folder); + return $list; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket200.page b/tests/FunctionalTests/tickets/protected/pages/Ticket200.page new file mode 100644 index 00000000..76c60f40 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket200.page @@ -0,0 +1,6 @@ + + +


    + +


    +
    \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket200.php b/tests/FunctionalTests/tickets/protected/pages/Ticket200.php new file mode 100644 index 00000000..a80a3b8a --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket200.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket202.page b/tests/FunctionalTests/tickets/protected/pages/Ticket202.page new file mode 100644 index 00000000..ae984c2d --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket202.page @@ -0,0 +1,19 @@ +<%@ MasterPage="" %> + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page new file mode 100644 index 00000000..1481a227 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page @@ -0,0 +1,26 @@ + +

    TCustomValidator not enabling ControlCssClass or prop:ClientSide.OnError after postback.

    + + + + + +
    \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.php b/tests/FunctionalTests/tickets/protected/pages/Ticket205.php new file mode 100644 index 00000000..6145af9a --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.php @@ -0,0 +1,11 @@ +IsValid = $this->textbox1->Text == "Prado"; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page new file mode 100644 index 00000000..556c5aae --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page @@ -0,0 +1,24 @@ + +

    Validators ClientSide.OnError triggered twice

    +

    Use ClientSide.ObseveChanges="false"

    +
    + +
    +
    + +
    + +

    Conditions

    +
    +	(TextBox? B is just there to prevent server submission)
    +	To verify try exactly this:
    +
    +	1. Enter nothing and click on submit : 1 error event will be triggered
    +	2. Enter something into TextBox? T and click on submit : no error event (ok)
    +	3. Delete your text from TextBox? T again and click on submit : error event will be triggered twice
    +
    +
    \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket227.page b/tests/FunctionalTests/tickets/protected/pages/Ticket227.page new file mode 100644 index 00000000..ab481fa2 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket227.page @@ -0,0 +1,4 @@ + +

    Disabled HTMLArea

    + +
    \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket246.page b/tests/FunctionalTests/tickets/protected/pages/Ticket246.page new file mode 100644 index 00000000..e25a484b --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket246.page @@ -0,0 +1,17 @@ + +

    TDatePicker inside absolute DIV with scrollbar

    + +
    +

    + +

    + + + + +

    +
    +
    \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php new file mode 100644 index 00000000..85785697 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php @@ -0,0 +1,23 @@ +open("tickets/index.php?page=Ticket205"); + $this->assertTitle("Verifying Ticket 205"); + $this->assertNotVisible("{$base}validator1"); + + $this->type("{$base}textbox1", "test"); + $this->click("{$base}button1"); + $this->assertVisible("{$base}validator1"); + $this->assertAlert("error"); + + $this->type("{$base}textbox1", "Prado"); + $this->clickAndWait("{$base}button1"); + $this->assertNotVisible("{$base}validator1"); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php new file mode 100644 index 00000000..53ae6528 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php @@ -0,0 +1,37 @@ +open('tickets/index.php?page=Ticket207'); + $this->assertTitle("Verifying Ticket 207"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + $this->click("{$base}button1"); + $this->assertAlert('error on text1 fired'); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + + $this->type("{$base}text1", 'test'); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + + $this->click("{$base}button1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + + $this->type("{$base}text1", ''); + $this->assertNotVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + + $this->click("{$base}button1"); + $this->assertAlert('error on text1 fired'); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php new file mode 100644 index 00000000..c0dd2a98 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php @@ -0,0 +1,12 @@ +open('tickets/index.php?page=Ticket227'); + $this->assertTitle('Verifying Ticket 227'); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php new file mode 100644 index 00000000..8f07790e --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php @@ -0,0 +1,12 @@ +open('tickets/index.php?page=Ticket246'); + $this->assertTitle('Verifying Ticket 246'); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/Home.page b/tests/FunctionalTests/validators/protected/pages/Home.page new file mode 100755 index 00000000..d4ac162c --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/Home.page @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/Home.php b/tests/FunctionalTests/validators/protected/pages/Home.php new file mode 100755 index 00000000..37804419 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/Home.php @@ -0,0 +1,34 @@ +getPageList(dirname(__FILE__),''); + $this->List->DataSource=$list; + $this->List->dataBind(); + } + + protected function getPageList($directory,$basePath) + { + $list=array(); + $folder=@opendir($directory); + while($entry=@readdir($folder)) + { + if($entry[0]==='.') + continue; + else if(is_file($directory.'/'.$entry)) + { + if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) + $list['?page='.$basePath.$page]=$basePath.$page; + } + else + $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); + } + closedir($folder); + return $list; + } +} + +?> \ No newline at end of file -- cgit v1.2.3