From e392ecbf6e422825083bc7204eacb7090619a47c Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 21 Apr 2006 12:36:06 +0000 Subject: Merge from 3.0 branch till 953. --- .../protected/pages/CausesValidation.page | 11 ++ .../protected/pages/CompareValidator.page | 31 ++++ .../protected/pages/CustomValidator.page | 26 ++++ .../validators/protected/pages/CustomValidator.php | 14 ++ .../protected/pages/RangeValidatorDate.page | 48 ++++++ .../protected/pages/RangeValidatorFloat.page | 45 ++++++ .../protected/pages/RangeValidatorInteger.page | 45 ++++++ .../protected/pages/RangeValidatorString.page | 45 ++++++ .../pages/RegularExpressionValidator.page | 22 +++ .../protected/pages/RequiredFieldValidator.page | 108 +++++++++++++ .../protected/pages/RequiredListValidator.page | 57 +++++++ .../protected/pages/ValidationSummary.page | 83 ++++++++++ .../validators/tests/CompareValidatorTestCase.php | 47 ++++++ .../validators/tests/CustomValidatorTestCase.php | 31 ++++ .../validators/tests/RangeValidatorTestCase.php | 167 +++++++++++++++++++++ .../validators/tests/RegExpValidatorTestCase.php | 34 +++++ .../validators/tests/RequiredFieldTestCase.php | 87 +++++++++++ .../validators/tests/RequiredListTestCase.php | 40 +++++ .../validators/tests/ValidationSummaryTestCase.php | 50 ++++++ 19 files changed, 991 insertions(+) create mode 100644 tests/FunctionalTests/validators/protected/pages/CausesValidation.page create mode 100644 tests/FunctionalTests/validators/protected/pages/CompareValidator.page create mode 100644 tests/FunctionalTests/validators/protected/pages/CustomValidator.page create mode 100644 tests/FunctionalTests/validators/protected/pages/CustomValidator.php create mode 100644 tests/FunctionalTests/validators/protected/pages/RangeValidatorDate.page create mode 100644 tests/FunctionalTests/validators/protected/pages/RangeValidatorFloat.page create mode 100644 tests/FunctionalTests/validators/protected/pages/RangeValidatorInteger.page create mode 100644 tests/FunctionalTests/validators/protected/pages/RangeValidatorString.page create mode 100644 tests/FunctionalTests/validators/protected/pages/RegularExpressionValidator.page create mode 100644 tests/FunctionalTests/validators/protected/pages/RequiredFieldValidator.page create mode 100644 tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page create mode 100644 tests/FunctionalTests/validators/protected/pages/ValidationSummary.page create mode 100644 tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php create mode 100644 tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php create mode 100644 tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php create mode 100644 tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php create mode 100644 tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php create mode 100644 tests/FunctionalTests/validators/tests/RequiredListTestCase.php create mode 100644 tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php (limited to 'tests/FunctionalTests/validators') diff --git a/tests/FunctionalTests/validators/protected/pages/CausesValidation.page b/tests/FunctionalTests/validators/protected/pages/CausesValidation.page new file mode 100644 index 00000000..c6748b9a --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/CausesValidation.page @@ -0,0 +1,11 @@ + + +

Test for CausesValidation="false"

+
+ + + + +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/CompareValidator.page b/tests/FunctionalTests/validators/protected/pages/CompareValidator.page new file mode 100644 index 00000000..679d2e8e --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/CompareValidator.page @@ -0,0 +1,31 @@ + +

Prado CompareValidator Tests

+
+
+ + + +
+ +
+ + +
+ + +
+ + +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/CustomValidator.page b/tests/FunctionalTests/validators/protected/pages/CustomValidator.page new file mode 100644 index 00000000..2d0d490b --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/CustomValidator.page @@ -0,0 +1,26 @@ + +

Prado CustomValidator Tests

+ + +
+ + + +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/CustomValidator.php b/tests/FunctionalTests/validators/protected/pages/CustomValidator.php new file mode 100644 index 00000000..ed1f9433 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/CustomValidator.php @@ -0,0 +1,14 @@ +isValid = $this->text1->Text == "Prado"; + } +} + +?> diff --git a/tests/FunctionalTests/validators/protected/pages/RangeValidatorDate.page b/tests/FunctionalTests/validators/protected/pages/RangeValidatorDate.page new file mode 100644 index 00000000..f7f65460 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RangeValidatorDate.page @@ -0,0 +1,48 @@ + +

Prado RangeValidator Tests Date

+
+

Dates between 22/1/2005 and 3/2/2005

+
+ + +
+

Dates >= 22/1/2005

+
+ + +
+ +

Dates <= 3/2/2005

+
+ + +
+ + +
+ + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/RangeValidatorFloat.page b/tests/FunctionalTests/validators/protected/pages/RangeValidatorFloat.page new file mode 100644 index 00000000..18c476c7 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RangeValidatorFloat.page @@ -0,0 +1,45 @@ + +

Prado RangeValidator Tests Float

+
+

Float between 1.4 and 4.4

+
+ + +
+

Float >= 2.2

+
+ + +
+ +

Float <= 20.2

+
+ + +
+ + +
+ + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/RangeValidatorInteger.page b/tests/FunctionalTests/validators/protected/pages/RangeValidatorInteger.page new file mode 100644 index 00000000..922236e5 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RangeValidatorInteger.page @@ -0,0 +1,45 @@ + +

Prado RangeValidator Tests Integer

+
+

Integers between 1 and 4

+
+ + +
+

Integers >= 2

+
+ + +
+ +

Integers <= 20

+
+ + +
+ + +
+ + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/RangeValidatorString.page b/tests/FunctionalTests/validators/protected/pages/RangeValidatorString.page new file mode 100644 index 00000000..64e596d6 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RangeValidatorString.page @@ -0,0 +1,45 @@ + +

Prado RangeValidator Tests String

+
+

Strings between 'd' and 'y'

+
+ + +
+

Strings >= 'd'

+
+ + +
+ +

Strings <= 'y'

+
+ + +
+ + +
+ + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/RegularExpressionValidator.page b/tests/FunctionalTests/validators/protected/pages/RegularExpressionValidator.page new file mode 100644 index 00000000..ac24cd0d --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RegularExpressionValidator.page @@ -0,0 +1,22 @@ + +

Prado RegularExpressionValidator Tests

+
+
+ + + + +
+ +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/RequiredFieldValidator.page b/tests/FunctionalTests/validators/protected/pages/RequiredFieldValidator.page new file mode 100644 index 00000000..f8a1c4ca --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RequiredFieldValidator.page @@ -0,0 +1,108 @@ + +

RequiredFieldValidator Tests

+
+ + +
+ + + + + + +
+ + +
+ + + + + + +
+ + + + +
+ + + + + +
+
+ + + + + + +
+ + + + + + +
+ +

InitialValue Test

+ + + +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page b/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page new file mode 100644 index 00000000..9bbd9d5a --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page @@ -0,0 +1,57 @@ + + +
+
+ + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + + + +
+ + + +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/protected/pages/ValidationSummary.page b/tests/FunctionalTests/validators/protected/pages/ValidationSummary.page new file mode 100644 index 00000000..d260a93a --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/ValidationSummary.page @@ -0,0 +1,83 @@ + + +

Validation Summary Test

+
+ Create New Account + +
+ Username: + + +
+
+ Password + +
+ + +
+ +
+ +
+ +
+ +
+ + +
+ Sign In + +
+ Login Name: + + + +
+ +
+ Password: + + +
+ + + + +
+ +
+ +
+ + +
\ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php new file mode 100644 index 00000000..5107a89f --- /dev/null +++ b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php @@ -0,0 +1,47 @@ +open("validators/index.php?page=CompareValidator", ""); + $this->verifyTextPresent("Prado CompareValidator Tests", ""); + + $this->type("{$base}text1", "qwe"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + $this->click("//input[@type='submit' and @value='Test']", ""); + + $this->type("{$base}text2", "1234"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}text2", "qwe"); + $this->assertNotVisible("{$base}validator1"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + + $this->type("{$base}text3", "12312"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2"); + + $this->type("{$base}text3", "13/1/2005"); + $this->assertVisible("{$base}validator2"); + + + $this->type("{$base}text3", "12/1/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php new file mode 100644 index 00000000..3a5daa6a --- /dev/null +++ b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php @@ -0,0 +1,31 @@ +open("validators/index.php?page=CustomValidator", ""); + $this->assertTextPresent("Prado CustomValidator Tests", ""); + $this->assertNotVisible("{$base}validator1"); + + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1"); + + $this->type("{$base}text1", "Prado"); + $this->pause(250); + $this->assertNotVisible("{$base}validator1"); + $this->type("{$base}text1", "Testing"); + $this->pause(250); + $this->assertVisible("{$base}validator1"); + $this->type("{$base}text1", "Prado"); + $this->pause(250); + $this->assertNotVisible("{$base}validator1"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1"); + + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php new file mode 100644 index 00000000..69d4cc07 --- /dev/null +++ b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php @@ -0,0 +1,167 @@ +open("validators/index.php?page=RangeValidatorInteger", ""); + $this->verifyTextPresent("Prado RangeValidator Tests Integer", ""); + + //between 1 and 4 + $this->type("{$base}text1", "ad"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "12"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "2"); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 2 + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 20 + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "100"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + + } + + function testFloatRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorFloat", ""); + $this->verifyTextPresent("Prado RangeValidator Tests Float", ""); + + //between 1 and 4 + $this->type("{$base}text1", "ad"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "12"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "2"); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 2 + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 20 + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "100"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "10"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + } + + function testDateRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorDate", ""); + $this->verifyTextPresent("Prado RangeValidator Tests Date", ""); + + //between 22/1/2005 and 3/2/2005 + $this->type("{$base}text1", "ad"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "27/2/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "1/2/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 22/1/2005 + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1/1/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->pause(250); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "1/4/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 3/2/2005 + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "4/5/2005"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->pause(250); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "1/2/2005"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + } + + function testStringRange() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RangeValidatorString", ""); + $this->verifyTextPresent("Prado RangeValidator Tests String", ""); + + //between 'd' and 'y' + $this->type("{$base}text1", "a"); + $this->assertNotVisible("{$base}validator1", ""); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "b"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "f"); + $this->assertNotVisible("{$base}validator1", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + + + // >= 'd' + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text2", "a"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "g"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator2", ""); + + // <= 'y' + $this->assertNotVisible("{$base}validator3", ""); + $this->type("{$base}text3", "z"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator3", ""); + $this->type("{$base}text3", "t"); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator3", ""); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php new file mode 100644 index 00000000..751ab80a --- /dev/null +++ b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php @@ -0,0 +1,34 @@ +open("validators/index.php?page=RegularExpressionValidator", ""); + $this->verifyTextPresent("Prado RegularExpressionValidator Tests", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + $this->type("{$base}text1", "1"); + $this->type("{$base}text2", "2"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text1", "asdasd"); + $this->click("//input[@type='submit' and @value='Test']", ""); + $this->assertVisible("{$base}validator1", ""); + $this->type("{$base}text1", "12345"); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertVisible("{$base}validator2", ""); + $this->type("{$base}text2", "wei@gmail.com"); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + $this->clickAndWait("//input[@type='submit' and @value='Test']", ""); + $this->assertNotVisible("{$base}validator1", ""); + $this->assertNotVisible("{$base}validator2", ""); + + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php new file mode 100644 index 00000000..41372b93 --- /dev/null +++ b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php @@ -0,0 +1,87 @@ +open("validators/index.php?page=RequiredFieldValidator"); + $this->assertTextPresent("RequiredFieldValidator Tests"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->type("{$base}text1", "testing"); + $this->click("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->click("{$base}submit2"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + $this->assertVisible("{$base}validator4"); + $this->type("{$base}text2", "testing2"); + $this->click("{$base}submit2"); + $this->assertNotVisible("{$base}validator3"); + $this->click("{$base}submit3"); + $this->assertVisible("{$base}summary3"); + $this->clickAndWait("{$base}submit4"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->assertNotVisible("{$base}validator4"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator2"); + $this->click("{$base}check1"); + $this->click("{$base}submit2"); + $this->assertVisible("{$base}validator4"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->type("{$base}text1"); + $this->click("{$base}check1"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->click("{$base}check2"); + $this->clickAndWait("{$base}submit2"); + + $this->type("{$base}text1", "Hello"); + $this->click("{$base}check1"); + $this->click("{$base}submit2"); + + $this->assertNotVisible("{$base}validator5"); + $this->assertNotVisible("{$base}validator6"); + $this->assertNotVisible("{$base}validator7"); + $this->assertNotVisible("{$base}validator8"); + $this->type("{$base}text1"); + $this->type("{$base}text2"); + $this->click("{$base}check1"); + $this->click("{$base}check2"); + $this->click("{$base}submit3"); + $this->assertVisible("{$base}validator5"); + $this->assertVisible("{$base}validator6"); + $this->assertVisible("{$base}validator7"); + $this->assertVisible("{$base}validator8"); + $this->clickAndWait("{$base}submit4"); + $this->assertNotVisible("{$base}validator5"); + $this->assertNotVisible("{$base}validator6"); + $this->assertNotVisible("{$base}validator7"); + $this->assertNotVisible("{$base}validator8"); + } + + function testInitialValue() + { + $base = "ctl0_Content_"; + $this->open("validators/index.php?page=RequiredFieldValidator"); + $this->assertTextPresent("InitialValue Test"); + $this->assertNotVisible("{$base}validator9"); + $this->click("{$base}submit5"); + $this->pause(250); + $this->assertVisible("{$base}validator9"); + $this->type("{$base}text5", "adasd"); + $this->pause(250); + $this->assertNotVisible("{$base}validator9"); + } +} +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php new file mode 100644 index 00000000..1eab60d4 --- /dev/null +++ b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php @@ -0,0 +1,40 @@ +open("validators/index.php?page=RequiredListValidator"); + $this->assertLocation("index.php?page=RequiredListValidator"); + $this->click("submit1"); + $this->assertVisible("validator1"); + $this->assertVisible("validator2"); + $this->assertVisible("validator3"); + $this->click("list1:0"); + $this->select("list2", "label=One"); + $this->select("list2", "label=Two"); + $this->click("list3:3"); + $this->clickAndWait("submit1"); + $this->assertNotVisible("validator1"); + $this->assertNotVisible("validator2"); + $this->assertNotVisible("validator3"); + $this->click("list1:1"); + $this->click("list1:2"); + $this->click("list1:3"); + $this->select("list2", "label=Two"); + $this->click("list1:3"); + $this->click("submit1"); + $this->assertNotVisible("validator1"); + $this->assertNotVisible("validator2"); + $this->assertNotVisible("validator3"); + $this->click("list3:3"); + $this->click("submit1"); + $this->pause(200); + $this->assertNotVisible("validator1"); + $this->assertNotVisible("validator2"); + $this->assertVisible("validator3"); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php new file mode 100644 index 00000000..3b6225f3 --- /dev/null +++ b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php @@ -0,0 +1,50 @@ +open("validators/index.php?page=ValidationSummary", ""); + $this->verifyTextPresent("Validation Summary Test", ""); + //$this->verifyText("{$base}summary1", ""); + //$this->verifyText("{$base}summary2", ""); + + $this->click("//input[@type='submit' and @value='Create New Account']", ""); + $this->assertVisible("{$base}summary1"); + $this->assertNotVisible("{$base}summary2"); + + $this->click("//input[@type='submit' and @value='Sign In']", ""); + $this->assertNotVisible("{$base}summary1"); + $this->assertVisible("{$base}summary2"); + + $this->type("{$base}Username", "qwe"); + $this->type("{$base}Password", "ewwq"); + $this->click("//input[@type='submit' and @value='Sign In']", ""); + $this->assertNotVisible("{$base}summary1"); + $this->assertVisible("{$base}summary2"); + + /*$this->clickAndWait("//input[@type='submit' and @value='Create New Account']", ""); + $this->type("{$base}UserID", "123"); + $this->type("{$base}Pass", "123"); + $this->clickAndWait("//input[@type='submit' and @value='Sign In']", ""); + //$this->verifyText("{$base}summary1", ""); + //$this->verifyText("{$base}summary2", ""); + $this->clickAndWait("//input[@type='submit' and @value='Create New Account']", ""); + //$this->verifyText("{$base}summary1", ""); + //$this->verifyText("{$base}summary2", ""); + + $this->type("{$base}Password", ""); + $this->click("//input[@type='submit' and @value='Create New Account']", ""); + $this->assertVisible("{$base}summary1"); + $this->assertNotVisible("{$base}summary2"); + + $this->type("{$base}Password", "12312"); + $this->assertVisible("{$base}summary1"); + */ + } +} + +?> \ No newline at end of file -- cgit v1.2.3