diff options
| -rw-r--r-- | .gitattributes | 48 | ||||
| -rw-r--r-- | tests/FunctionalTests/config.php | 9 | ||||
| -rw-r--r-- | tests/FunctionalTests/index.php | 54 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart.php | 39 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Advanced/I18N.php (renamed from tests/FunctionalTests/quickstart_tests/Advanced/I18N.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/ButtonTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/CheckBoxListTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/CheckBoxTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/DropDownListTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/HyperLinkTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/ImageButtonTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/ImageTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/ImageTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/LabelTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/LabelTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/LinkButtonTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/ListBoxTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/PanelTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/PanelTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/RadioButtonListTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/RadioButtonTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/TableTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/TableTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Fundamentals/HangmanTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/quickstart/Fundamentals/HelloWorldTestCase.php (renamed from tests/FunctionalTests/quickstart_tests/Fundamentals/HelloWorldTestCase.php) | 0 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets.php | 39 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/application.xml | 4 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/index.php | 8 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Layout.php | 14 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Layout.tpl | 45 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket21.page | 10 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket21.php | 22 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket27.page | 17 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/config.xml | 5 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket21TestCase.php | 16 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket27TestCase.php | 18 | 
33 files changed, 282 insertions, 66 deletions
| diff --git a/.gitattributes b/.gitattributes index 3d554c69..cd27d149 100644 --- a/.gitattributes +++ b/.gitattributes @@ -779,24 +779,25 @@ tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.php -t  tests/FunctionalTests/protected/pages/ViewSource.page -text  tests/FunctionalTests/protected/pages/ViewSource.php -text  tests/FunctionalTests/protected/pages/config.xml -text -tests/FunctionalTests/quickstart_tests/Advanced/I18N.php -text -tests/FunctionalTests/quickstart_tests/Controls/ButtonTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/CheckBoxListTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/CheckBoxTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/DropDownListTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/HyperLinkTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/ImageButtonTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/ImageTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/LabelTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/LinkButtonTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/ListBoxTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/PanelTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/RadioButtonListTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/RadioButtonTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/TableTestCase.php -text -tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php -text -tests/FunctionalTests/quickstart_tests/Fundamentals/HangmanTestCase.php -text -tests/FunctionalTests/quickstart_tests/Fundamentals/HelloWorldTestCase.php -text +tests/FunctionalTests/quickstart.php -text +tests/FunctionalTests/quickstart/Advanced/I18N.php -text +tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php -text +tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php -text +tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php -text +tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php -text +tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php -text +tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php -text +tests/FunctionalTests/quickstart/Controls/ImageTestCase.php -text +tests/FunctionalTests/quickstart/Controls/LabelTestCase.php -text +tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php -text +tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php -text +tests/FunctionalTests/quickstart/Controls/PanelTestCase.php -text +tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php -text +tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php -text +tests/FunctionalTests/quickstart/Controls/TableTestCase.php -text +tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php -text +tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php -text +tests/FunctionalTests/quickstart/Fundamentals/HelloWorldTestCase.php -text  tests/FunctionalTests/selenium/SeleneseRunner.html -text  tests/FunctionalTests/selenium/SeleniumLog.html -text  tests/FunctionalTests/selenium/TestRunner-splash.html -text @@ -868,6 +869,17 @@ tests/FunctionalTests/selenium/user-extensions.js.sample -text  tests/FunctionalTests/selenium/xmlextras.js -text  tests/FunctionalTests/selenium/xpath.js -text  tests/FunctionalTests/tests.php -text +tests/FunctionalTests/tickets.php -text +tests/FunctionalTests/tickets/application.xml -text +tests/FunctionalTests/tickets/index.php -text +tests/FunctionalTests/tickets/protected/pages/Layout.php -text +tests/FunctionalTests/tickets/protected/pages/Layout.tpl -text +tests/FunctionalTests/tickets/protected/pages/Ticket21.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket21.php -text +tests/FunctionalTests/tickets/protected/pages/Ticket27.page -text +tests/FunctionalTests/tickets/protected/pages/config.xml -text +tests/FunctionalTests/tickets/tests/Ticket21TestCase.php -text +tests/FunctionalTests/tickets/tests/Ticket27TestCase.php -text  tests/UnitTests/TODO.txt -text  tests/UnitTests/framework/Collections/utList.php -text  tests/UnitTests/framework/Collections/utMap.php -text diff --git a/tests/FunctionalTests/config.php b/tests/FunctionalTests/config.php index 99644888..73491c6e 100644 --- a/tests/FunctionalTests/config.php +++ b/tests/FunctionalTests/config.php @@ -90,15 +90,12 @@ class PradoApplicationTester extends TApplication  	protected function getTestServiceParameter($file)  	{ -		$file = realpath($file); -		$base = realpath($this->testConfig->tests_directory().'/pages/'); +		$file = strtr(realpath($file),'\\','/'); +		$base = strtr(realpath($this->testConfig->tests_directory().'/pages/'),'\\','/');  		$search = array($base, '.php');  		$replace = array('', '');  		$pagePath = str_replace($search, $replace, $file); -		$separator = array("/", "\\"); -		if(in_array($pagePath[0], $separator)) -			$pagePath = substr($pagePath, 1); -		return str_replace($separator, array('.','.'), $pagePath); +		return strtr(trim($pagePath,'/'),'/','.');  	}  } diff --git a/tests/FunctionalTests/index.php b/tests/FunctionalTests/index.php index d104f10e..7cf01abd 100644 --- a/tests/FunctionalTests/index.php +++ b/tests/FunctionalTests/index.php @@ -1,42 +1,12 @@ -<?php - -require('config.php'); -header("Content-Type: text/html; charset=UTF-8"); -class BrowserTestConfig extends PradoTestConfig -{ -	//functional test groups -	public function unit_test_groups() -	{ -		$groups = array(); - -		//tests for quickstart samples -		$this->get_directories(dirname(__FILE__).'/quickstart_tests', $groups); - -		//tests to verify tickets -		$this->get_directories($this->tests_directory(),$groups); -		 -		return $groups; -	} - -	protected function get_directories($base,&$groups) -	{ -		$groups[] = realpath($base); -		$dirs = new DirectoryIterator($base); -		foreach($dirs as $dir) -			if(!$dir->isDot() && $dir->isDir()  -				&& !preg_match("/\.svn/", $dir->getPathName())) -				$this->get_directories($dir->getPathName(), $groups); -	} -} - - -$root = dirname(__FILE__); -$server = SimpleSeleniumProxyServer::getInstance($root); - -$tester = new PradoSimpleTester(new BrowserTestConfig()); -$browser_tests = $tester->getTests(); -$browser_tests->run(new SimpleReporter()); - -$server->handleRequest(); - -?>
\ No newline at end of file +<html> +<head> +<title> +Prado Functional Test Suites +</title> +</head> +<body> +<a href="quickstart.php">Tests of QuickStart Tutorial Demo</a> +<br/> +<a href="tickets.php">Tests of Trac Tickets</a> +</body> +</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart.php b/tests/FunctionalTests/quickstart.php new file mode 100644 index 00000000..e4157aca --- /dev/null +++ b/tests/FunctionalTests/quickstart.php @@ -0,0 +1,39 @@ +<?php + +require('config.php'); +header("Content-Type: text/html; charset=UTF-8"); +class BrowserTestConfig extends PradoTestConfig +{ +	//functional test groups +	public function unit_test_groups() +	{ +		$groups = array(); + +		//tests for quickstart samples +		$this->get_directories(dirname(__FILE__).'/quickstart', $groups); + +		return $groups; +	} + +	protected function get_directories($base,&$groups) +	{ +		$groups[] = realpath($base); +		$dirs = new DirectoryIterator($base); +		foreach($dirs as $dir) +			if(!$dir->isDot() && $dir->isDir() +				&& !preg_match("/\.svn/", $dir->getPathName())) +				$this->get_directories($dir->getPathName(), $groups); +	} +} + + +$root = dirname(__FILE__); +$server = SimpleSeleniumProxyServer::getInstance($root); + +$tester = new PradoSimpleTester(new BrowserTestConfig()); +$browser_tests = $tester->getTests(); +$browser_tests->run(new SimpleReporter()); + +$server->handleRequest(); + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/quickstart_tests/Advanced/I18N.php b/tests/FunctionalTests/quickstart/Advanced/I18N.php index fc45b096..fc45b096 100644 --- a/tests/FunctionalTests/quickstart_tests/Advanced/I18N.php +++ b/tests/FunctionalTests/quickstart/Advanced/I18N.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/ButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php index 032f5ff1..032f5ff1 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/ButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/CheckBoxListTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php index 783e2ccc..783e2ccc 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/CheckBoxListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/CheckBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php index a24ce937..a24ce937 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/CheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php index cfb2047b..cfb2047b 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/DropDownListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/HyperLinkTestCase.php b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php index b0b964f8..b0b964f8 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/HyperLinkTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/ImageButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php index cc0bda53..cc0bda53 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/ImageButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/ImageTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php index a0ad6d6b..a0ad6d6b 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/ImageTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/LabelTestCase.php b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php index aa045e0c..aa045e0c 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/LabelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/LinkButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php index 49c3c61a..49c3c61a 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/LinkButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php index 6f86719a..6f86719a 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/ListBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/PanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php index 32134512..32134512 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/PanelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/RadioButtonListTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php index b6242d05..b6242d05 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/RadioButtonListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/RadioButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php index d6d5f2e3..d6d5f2e3 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/RadioButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/TableTestCase.php b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php index e9bd63be..e9bd63be 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/TableTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php index e1c76938..e1c76938 100644 --- a/tests/FunctionalTests/quickstart_tests/Controls/TextBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Fundamentals/HangmanTestCase.php b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php index cad3dc0e..cad3dc0e 100644 --- a/tests/FunctionalTests/quickstart_tests/Fundamentals/HangmanTestCase.php +++ b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php diff --git a/tests/FunctionalTests/quickstart_tests/Fundamentals/HelloWorldTestCase.php b/tests/FunctionalTests/quickstart/Fundamentals/HelloWorldTestCase.php index e3da5a72..e3da5a72 100644 --- a/tests/FunctionalTests/quickstart_tests/Fundamentals/HelloWorldTestCase.php +++ b/tests/FunctionalTests/quickstart/Fundamentals/HelloWorldTestCase.php diff --git a/tests/FunctionalTests/tickets.php b/tests/FunctionalTests/tickets.php new file mode 100644 index 00000000..a2ea99d2 --- /dev/null +++ b/tests/FunctionalTests/tickets.php @@ -0,0 +1,39 @@ +<?php + +require('config.php'); +header("Content-Type: text/html; charset=UTF-8"); +class BrowserTestConfig extends PradoTestConfig +{ +	//functional test groups +	public function unit_test_groups() +	{ +		$groups = array(); + +		//tests for quickstart samples +		$this->get_directories(dirname(__FILE__).'/tickets/tests', $groups); + +		return $groups; +	} + +	protected function get_directories($base,&$groups) +	{ +		$groups[] = realpath($base); +		$dirs = new DirectoryIterator($base); +		foreach($dirs as $dir) +			if(!$dir->isDot() && $dir->isDir() +				&& !preg_match("/\.svn/", $dir->getPathName())) +				$this->get_directories($dir->getPathName(), $groups); +	} +} + + +$root = dirname(__FILE__); +$server = SimpleSeleniumProxyServer::getInstance($root); + +$tester = new PradoSimpleTester(new BrowserTestConfig()); +$browser_tests = $tester->getTests(); +$browser_tests->run(new SimpleReporter()); + +$server->handleRequest(); + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/application.xml b/tests/FunctionalTests/tickets/application.xml new file mode 100644 index 00000000..e973d37d --- /dev/null +++ b/tests/FunctionalTests/tickets/application.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?>
 +
 +<application id="FunctionTests" Mode="Debug">
 +</application>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/index.php b/tests/FunctionalTests/tickets/index.php new file mode 100644 index 00000000..fe127639 --- /dev/null +++ b/tests/FunctionalTests/tickets/index.php @@ -0,0 +1,8 @@ +<?php + +require_once(dirname(__FILE__).'/../../../framework/prado.php'); + +$app=new TApplication; +$app->run(); + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Layout.php new file mode 100644 index 00000000..64b0aebe --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.php @@ -0,0 +1,14 @@ +<?php
 +
 +class Layout extends TTemplateControl
 +{
 +	public function onLoad($param)
 +	{
 +		$num = str_replace('Ticket','',get_class($this->getPage()));
 +		$this->getPage()->setTitle("Verifying Ticket $num");
 +		$this->ticketlink->setText("Verifying Ticket $num");
 +		$this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/ticket/{$num}");
 +	}
 +}
 +
 +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl new file mode 100644 index 00000000..bf2f8fab --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl @@ -0,0 +1,45 @@ +<!DOCTYPE html PUBLIC 
 +	"-//W3C//DTD XHTML 1.0 Strict//EN" 
 +	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 +	
 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 +<com:THead Title="PRADO Functional Tests">
 +	<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
 +	<style type="text/css">
 +	/*<![CDATA[*/
 +	.defect
 +	{
 +		color: #c00;
 +		font-size: 1.15em;
 +	}
 +	body
 +	{
 +		font-family: Georgia, "Times New Roman", Times, serif;
 +	}
 +	.w3c
 +	{
 +		margin-top: 2em;
 +		display: block;
 +	}
 +	/*]]>*/
 +	</style>
 +</com:THead>
 +<body>
 +<com:TForm>
 +<h1><com:THyperLink ID="ticketlink" /></h1>
 +
 +<com:TContentPlaceHolder ID="Content" />
 +<hr style="margin-top: 2em" />
 +<com:TJavascriptLogger />
 +</com:TForm>
 +<div class="w3c">
 +<a href="http://validator.w3.org/check?uri=referer">
 +		Validate XHTML 1.0
 +</a>
 +<a href="?page=ViewSource&path=<%= str_replace('.','/', $this->Request->ServiceParameter) %>.page"
 +	style="margin: 0 1em;"
 +	onclick="window.open(this.href); return false;" 
 +	onkeypress="window.open(this.href); return false;">View Source</a>
 +</div>
 +</body>
 +</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket21.page b/tests/FunctionalTests/tickets/protected/pages/Ticket21.page new file mode 100644 index 00000000..e0619ea1 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket21.page @@ -0,0 +1,10 @@ +<com:TContent ID="Content">
 +<h2 class="defect">TRadioButton always postback if AutoPostBack=true</h2>
 +
 +<com:TRadioButton ID="button1" 
 +	AutoPostBack="true" 
 +	OnCheckedChanged="doClick" />
 +<com:TLabel ForControl="button1" Text="radio button 1" /> <br>
 +
 +<com:TLabel ID="label1" />
 +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket21.php b/tests/FunctionalTests/tickets/protected/pages/Ticket21.php new file mode 100644 index 00000000..041ba4b7 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket21.php @@ -0,0 +1,22 @@ +<?php
 +
 +class Ticket21 extends TPage
 +{
 +	public function onLoad($param)
 +	{
 +		parent::onLoad($param);
 +
 +		if(!$this->IsPostBack)
 +			$this->setViewState("clicks", 0);
 +	}
 +
 +	public function doClick($sender, $param)
 +	{
 +		$clicks = $this->getViewState("clicks");
 +		$clicks++;
 +		$this->label1->setText("Radio button clicks: $clicks");
 +		$this->setViewState("clicks", $clicks);
 +	}
 +}
 +
 +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket27.page b/tests/FunctionalTests/tickets/protected/pages/Ticket27.page new file mode 100644 index 00000000..f92511c7 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket27.page @@ -0,0 +1,17 @@ +<com:TContent ID="Content">
 +<h2 class="defect">TCheckBoxList demo js error on IE</h2>
 +
 +<com:TTextBox ID="TextBox" />
 +<com:TRequiredFieldValidator
 +	ID="validator1"
 +	ControlToValidate="TextBox"
 +	ErrorMessage="You must enter a value"
 +	Display="Dynamic"
 +	ValidationGroup="Group2" />
 +<com:TCheckBoxList AutoPostBack="true" ValidationGroup="Group2">
 +  <com:TListItem Text="Agree" />
 +  <com:TListItem Text="Disagree" />
 +</com:TCheckBoxList>
 +
 +
 +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/config.xml b/tests/FunctionalTests/tickets/protected/pages/config.xml new file mode 100644 index 00000000..83bb5791 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/config.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?>
 +
 +<configuration>
 +  <pages MasterClass="Application.pages.Layout" />
 +</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php new file mode 100644 index 00000000..d9677779 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php @@ -0,0 +1,16 @@ +<?php
 +
 +class Ticket21TestCase extends SeleniumTestCase
 +{
 +	function test()
 +	{
 +		$this->open('tickets/index.php?page=Ticket21');
 +		$this->assertTitle("Verifying Ticket 21");
 +		$this->clickAndWait("ctl0_Content_button1");
 +		$this->verifyTextPresent("Radio button clicks: 1", "");
 +		$this->click("ctl0_Content_button1");
 +		$this->verifyTextPresent("Radio button clicks: 1", "");
 +	}
 +}
 +
 +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php new file mode 100644 index 00000000..6a5ccdb9 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php @@ -0,0 +1,18 @@ +<?php
 +
 +class Ticket27TestCase extends SeleniumTestCase
 +{
 +	function test()
 +	{
 +		$this->open('tickets/index.php?page=Ticket27');
 +		$this->verifyTitle("Verifying Ticket 27", "");
 +		$this->click("//input[@value='Agree']", "");
 +		$this->assertVisible("ctl0_Content_validator1", "");
 +		$this->type("ctl0_Content_TextBox", "122");
 +		$this->assertNotVisible("ctl0_Content_validator1", "");
 +		$this->clickAndWait("//input[@value='Disagree']", "");
 +		$this->assertNotVisible("ctl0_Content_validator1", "");
 +	}
 +}
 +
 +?>
\ No newline at end of file | 
