diff options
author | wei <> | 2005-12-10 11:49:29 +0000 |
---|---|---|
committer | wei <> | 2005-12-10 11:49:29 +0000 |
commit | 98215a603fb798cdb4178e49061977544aaa45b7 (patch) | |
tree | 282787037961f7466acbd174ce151cac6de71273 /tests/FunctionalTests/framework | |
parent | 25f9c45261aafd65477ad526e0b6ad3dca80803a (diff) |
Initial import selenium functional test framework.
Diffstat (limited to 'tests/FunctionalTests/framework')
-rw-r--r-- | tests/FunctionalTests/framework/Demos/testControls | 0 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/Demos/testControls.php | 16 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/IndexPage.tpl | 13 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/Web/UI/config.xml | 7 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/Web/UI/testTButton.php | 24 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/Web/UI/testTButton.tpl | 7 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/Web/config.xml | 5 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/application.xml | 12 | ||||
-rw-r--r-- | tests/FunctionalTests/framework/config.xml | 6 |
9 files changed, 90 insertions, 0 deletions
diff --git a/tests/FunctionalTests/framework/Demos/testControls b/tests/FunctionalTests/framework/Demos/testControls new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/FunctionalTests/framework/Demos/testControls diff --git a/tests/FunctionalTests/framework/Demos/testControls.php b/tests/FunctionalTests/framework/Demos/testControls.php new file mode 100644 index 00000000..c55f3618 --- /dev/null +++ b/tests/FunctionalTests/framework/Demos/testControls.php @@ -0,0 +1,16 @@ +<?php + +class testControls extends SeleniumTestCase +{ + function setup() + { + $this->open('../../demos/controls/index.php'); + } + + function testIndexPage() + { + $this->assertTextPresent("Welcome! Guest"); + $this->clickAndWait('ctl0$header$ctl15'); + $this->assertTextPresent("Login"); + } +}
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/IndexPage.tpl b/tests/FunctionalTests/framework/IndexPage.tpl new file mode 100644 index 00000000..733c495e --- /dev/null +++ b/tests/FunctionalTests/framework/IndexPage.tpl @@ -0,0 +1,13 @@ +<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Functional Tests</title>
+</head>
+
+<body>
+<h1>Functional Test Pages</h1>
+</body>
+</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/Web/UI/config.xml b/tests/FunctionalTests/framework/Web/UI/config.xml new file mode 100644 index 00000000..7e71f4aa --- /dev/null +++ b/tests/FunctionalTests/framework/Web/UI/config.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> + +<configuration> + <pages> + <page id="testTButton" class="testTButton" /> + </pages> +</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/Web/UI/testTButton.php b/tests/FunctionalTests/framework/Web/UI/testTButton.php new file mode 100644 index 00000000..eb4c4987 --- /dev/null +++ b/tests/FunctionalTests/framework/Web/UI/testTButton.php @@ -0,0 +1,24 @@ +<?php + +class testTButton extends TPage +{ + +} + + +class testTButtonCase extends SeleniumTestCase +{ + function setup() + { + $this->initPage(__FILE__); + $this->open($this->Page->Request->TestUrl); + } + + function testButtonClick() + { + $this->assertTextPresent("TButton Functional Test"); + $this->click($this->Page->button1); + } +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/Web/UI/testTButton.tpl b/tests/FunctionalTests/framework/Web/UI/testTButton.tpl new file mode 100644 index 00000000..ac051f28 --- /dev/null +++ b/tests/FunctionalTests/framework/Web/UI/testTButton.tpl @@ -0,0 +1,7 @@ +<com:TForm> + + <h1>TButton Functional Test</h1> + + <com:TButton ID="button1" Text="Click Me!" /> + +</com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/Web/config.xml b/tests/FunctionalTests/framework/Web/config.xml new file mode 100644 index 00000000..f9533de1 --- /dev/null +++ b/tests/FunctionalTests/framework/Web/config.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+
+</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/application.xml b/tests/FunctionalTests/framework/application.xml new file mode 100644 index 00000000..16377248 --- /dev/null +++ b/tests/FunctionalTests/framework/application.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?>
+
+<application id="functional" mode="Debug">
+ <paths>
+ <alias id="Tests" path="." />
+ </paths>
+ <!-- modules configured and loaded for all services -->
+ <services>
+ <!-- page service, BasePath is required -->
+ <service id="page" BasePath="Tests" DefaultPage="IndexPage" />
+ </services>
+</application>
\ No newline at end of file diff --git a/tests/FunctionalTests/framework/config.xml b/tests/FunctionalTests/framework/config.xml new file mode 100644 index 00000000..918c49df --- /dev/null +++ b/tests/FunctionalTests/framework/config.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <pages>
+ <page id="IndexPage" class="TPage" TemplateFile="Tests.IndexPage" />
+ </pages>
+</configuration>
\ No newline at end of file |