diff options
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket828.page | 80 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket828TestCase.php | 41 |
2 files changed, 121 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket828.page b/tests/FunctionalTests/tickets/protected/pages/Ticket828.page new file mode 100644 index 00000000..528a28d1 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket828.page @@ -0,0 +1,80 @@ +<com:TContent ID="Content"> +<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; + } + .required + { + border: 1px solid red; + background-color: pink; + } + /*]]>*/ + </style> +<div> + <div class="lista"> + <com:TCheckBoxList ID="list1" RepeatLayout="Raw"> + <com:TListItem Value="1" Text="One" /> + <com:TListItem Value="2" Text="Two" /> + <com:TListItem Value="3" Text="Three" /> + <com:TListItem Value="4" Text="Four" /> + </com:TCheckBoxList> + <com:TListControlValidator + ID="validator1" + ControlToValidate="list1" + ErrorMessage="Must select at least 1 and no more than 3" + ControlCssClass="required" + MinSelection="1" + MaxSelection="3" /> + + </div> + <div> + <com:TListBox ID="list2" SelectionMode="Multiple" Rows="5" Style="width:10em;"> + <com:TListItem Value="1" Text="One" /> + <com:TListItem Value="2" Text="Two" /> + <com:TListItem Value="3" Text="Three" /> + <com:TListItem Value="4" Text="Four" /> + <com:TListItem Value="5" Text="Five" /> + </com:TListBox> + <com:TListControlValidator + ID="validator2" + ControlToValidate="list2" + ErrorMessage='Must select at least 2 and no more than 3 and value "two"' + MinSelection="2" + MaxSelection="3" + ControlCssClass="required" + RequiredSelections="2" /> + </div> + + <div class="lista"> + <com:TRadioButtonList ID="list3" RepeatLayout="Raw"> + <com:TListItem Value="1" Text="One" /> + <com:TListItem Value="2" Text="Two" /> + <com:TListItem Value="3" Text="Three" /> + <com:TListItem Value="4" Text="Four" /> + </com:TRadioButtonList> + <com:TListControlValidator + ID="validator3" + ControlToValidate="list3" + ErrorMessage="Must select at least 1" + ControlCssClass="required" + MinSelection="1"/> + + </div> + + + <com:TButton ID="submit1" Text="Test" /> +</div> + +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php new file mode 100644 index 00000000..0c753a63 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php @@ -0,0 +1,41 @@ +<?php +class Ticket828TestCase extends SeleniumTestCase +{ + + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $base = "ctl0_Content_"; + $this->open("tickets/index.php?page=Ticket828"); + $this->click("{$base}submit1"); + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + $this->click("{$base}list1_c0"); + $this->addSelection("{$base}list2", "label=One"); + $this->addSelection("{$base}list2", "label=Two"); + $this->click("{$base}list3_c3"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->click("{$base}list1_c1"); + $this->click("{$base}list1_c2"); + $this->click("{$base}list1_c3"); + $this->addSelection("{$base}list2", "label=Two"); + $this->click("{$base}list1_c3"); + $this->clickAndWait("{$base}submit1"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + $this->click("{$base}list3_c3"); + $this->clickAndWait("{$base}submit1"); + $this->pause(200); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + } +} +?>
\ No newline at end of file |