From eb2a6e9431445b3cb24be4b75f02f07aef70aebc Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 28 Apr 2006 01:22:42 +0000 Subject: New abstract TCompositeControl + FT tests --- .../features/protected/application.xml | 3 +++ .../features/protected/controls/LabeledTextBox.tpl | 2 ++ .../features/protected/controls/LabeledTextbox.php | 19 ++++++++++++++++++ .../features/protected/pages/CompositeControl.page | 12 +++++++++++ .../features/tests/CompositeControlTestCase.php | 23 ++++++++++++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl create mode 100644 tests/FunctionalTests/features/protected/controls/LabeledTextbox.php create mode 100644 tests/FunctionalTests/features/protected/pages/CompositeControl.page create mode 100644 tests/FunctionalTests/features/tests/CompositeControlTestCase.php (limited to 'tests') diff --git a/tests/FunctionalTests/features/protected/application.xml b/tests/FunctionalTests/features/protected/application.xml index 642152cc..9153f3f7 100644 --- a/tests/FunctionalTests/features/protected/application.xml +++ b/tests/FunctionalTests/features/protected/application.xml @@ -1,6 +1,9 @@ + + + diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl b/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl new file mode 100644 index 00000000..276d03b2 --- /dev/null +++ b/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php new file mode 100644 index 00000000..33396734 --- /dev/null +++ b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php @@ -0,0 +1,19 @@ +textbox; + } + + public function getLabel() + { + return $this->label; + } +} + +?> diff --git a/tests/FunctionalTests/features/protected/pages/CompositeControl.page b/tests/FunctionalTests/features/protected/pages/CompositeControl.page new file mode 100644 index 00000000..b135445a --- /dev/null +++ b/tests/FunctionalTests/features/protected/pages/CompositeControl.page @@ -0,0 +1,12 @@ + +

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/tests/CompositeControlTestCase.php b/tests/FunctionalTests/features/tests/CompositeControlTestCase.php new file mode 100644 index 00000000..dda3f63b --- /dev/null +++ b/tests/FunctionalTests/features/tests/CompositeControlTestCase.php @@ -0,0 +1,23 @@ +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", ""); + } + +} + +?> -- cgit v1.2.3