diff options
Diffstat (limited to 'tests')
19 files changed, 283 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/TestHtmlArea.php b/tests/FunctionalTests/tickets/protected/pages/TestHtmlArea.php new file mode 100644 index 00000000..13a4189b --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/TestHtmlArea.php @@ -0,0 +1,8 @@ +<?php + +class TestHtmlArea extends THtmlArea +{ + +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket121.page b/tests/FunctionalTests/tickets/protected/pages/Ticket121.page new file mode 100644 index 00000000..9c9633d3 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket121.page @@ -0,0 +1,16 @@ +<com:TContent ID="Content">
+
+<com:TImageButton
+ ImageUrl="http://www.pradosoft.com/images/powered.gif"
+ Text="Foo"
+ ValidationGroup="Foo"
+ OnClick="buttonClicked" />
+<com:TTextBox ID="FooTextBox" Text="sometext" />
+<com:TRequiredFieldValidator
+ ValidationGroup="Foo"
+ ControlToValidate="FooTextBox"
+ Text="Field required." />
+
+<com:TLabel ID="Result" />
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket121.php b/tests/FunctionalTests/tickets/protected/pages/Ticket121.php new file mode 100644 index 00000000..1a625d83 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket121.php @@ -0,0 +1,11 @@ +<?php
+
+class Ticket121 extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->Result->Text="clicked at ({$param->X},{$param->Y})";
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket163.page b/tests/FunctionalTests/tickets/protected/pages/Ticket163.page new file mode 100644 index 00000000..aa05e601 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket163.page @@ -0,0 +1,9 @@ +<com:TContent ID="Content"> + <h1>Test Ticket #163</h1> + <h2>Missing currency sign in TNumberFormat if Value is 0</h2> + <com:TNumberFormat Type="currency" Culture="no" Currency="NOK" Value="100"/> + <hr /> + <com:TNumberFormat Type="currency" Culture="no" Currency="NOK" Value="0"/> + <hr /> + <com:TNumberFormat Type="currency" Culture="no" Currency="NOK" Value="-100"/> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket169.page b/tests/FunctionalTests/tickets/protected/pages/Ticket169.page new file mode 100644 index 00000000..24c447d5 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket169.page @@ -0,0 +1,8 @@ +<com:TContent ID="Content"> + <com:Application.pages.TestHtmlArea ID="test1"/> + <com:TRequiredFieldValidator + ID="validator1" + ControlToValidate="test1" + ErrorMessage="required" /> + <com:TButton Text="Click Me" /> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.page b/tests/FunctionalTests/tickets/protected/pages/Ticket191.page new file mode 100644 index 00000000..2d673b8d --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.page @@ -0,0 +1,19 @@ +<com:TContent ID="Content">
+
+Global state:
+<com:TTextBox ID="TextBox2" />
+<com:TButton Text="Submit" OnClick="updateGlobal" />
+
+<br/>
+
+Your input:
+<com:TTextBox ID="TextBox" />
+<com:TButton Text="Submit" ValidationGroup="Foo" OnClick="buttonClicked" />
+<com:TCustomValidator
+ ValidationGroup="Foo"
+ ControlToValidate="TextBox"
+ Text="Your input must match the global state."
+ OnServerValidate="customValidation" />
+<br/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.php b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php new file mode 100644 index 00000000..61c2a253 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php @@ -0,0 +1,22 @@ +<?php
+
+class Ticket191 extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ if($this->IsValid)
+ $this->Application->clearGlobalState('ticket190');
+ }
+
+ public function customValidation($sender,$param)
+ {
+ $param->IsValid=$this->Application->getGlobalState('ticket190')===$this->TextBox->Text;
+ }
+
+ public function updateGlobal($sender,$param)
+ {
+ $this->Application->setGlobalState('ticket190',$this->TextBox2->Text);
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket28.page b/tests/FunctionalTests/tickets/protected/pages/Ticket28.page new file mode 100644 index 00000000..056e9985 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket28.page @@ -0,0 +1,6 @@ +<com:TContent ID="Content"> + + <h2>Safari LinkButton Test</h2> + <com:TLinkButton ID="linkButton1" Text="Click Me" OnClick="linkButton1_Clicked" /> + <com:TLabel ID="label1" Text="Label 1" /> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket28.php b/tests/FunctionalTests/tickets/protected/pages/Ticket28.php new file mode 100644 index 00000000..7980119e --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket28.php @@ -0,0 +1,12 @@ +<?php + +class Ticket28 extends TPage +{ + function linkButton1_Clicked() + { + $this->label1->setText("Link Button 1 Clicked!"); + } +} + + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket93.page b/tests/FunctionalTests/tickets/protected/pages/Ticket93.page new file mode 100644 index 00000000..2217ab15 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket93.page @@ -0,0 +1,61 @@ +<com:TContent ID="Content">
+
+<h2>ValidationGroups without any inputs with grouping</h2>
+<p>This test can not be tested using automation.</p>
+<com:TImageMap ImageUrl=<%~hotspot.jpg%> AlternateText="Navigate buttons" OnClick="buttonClicked" >
+
+<com:TRectangleHotSpot
+ hotspotmode="Navigate"
+ NavigateUrl="navigate1.htm"
+ alternatetext="Button 1"
+ top="30"
+ left="175"
+ bottom="110"
+ right="355" />
+
+<com:TRectangleHotSpot
+ hotspotmode="PostBack"
+ PostBackValue="test1"
+ CausesValidation="true"
+ ValidationGroup="Group1"
+ alternatetext="Button 2"
+ top="155"
+ left="175"
+ bottom="240"
+ right="355" />
+
+<com:TRectangleHotSpot
+ hotspotmode="PostBack"
+ PostBackValue="test2"
+ CausesValidation="true"
+ alternatetext="Button 3"
+ ValidationGroup="Group2"
+ top="285"
+ left="175"
+ bottom="365"
+ right="355" />
+
+</com:TImageMap>
+<div>
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ValidationGroup="Group1"
+ EnableClientScript="true"
+ ControlToValidate="TextBox"
+ Text="textbox 1 required" />
+
+<com:TTextBox ID="TextBox2" />
+<com:TRequiredFieldValidator
+ ValidationGroup="Group2"
+ EnableClientScript="false"
+ ControlToValidate="TextBox2"
+ Text="textbox 2 required" />
+
+<com:TRequiredFieldValidator
+ ValidationGroup=""
+ EnableClientScript="true"
+ ControlToValidate="TextBox2"
+ Text="No one is required" />
+</div>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket93.php b/tests/FunctionalTests/tickets/protected/pages/Ticket93.php new file mode 100644 index 00000000..dbdf2cab --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket93.php @@ -0,0 +1,14 @@ +<?php
+/*
+ * Created on 13/04/2006
+ */
+
+class Ticket93 extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ echo 'postback triggered with value '.$param->PostBackValue;
+ }
+}
+
+?>
diff --git a/tests/FunctionalTests/tickets/protected/pages/config.xml b/tests/FunctionalTests/tickets/protected/pages/config.xml index 83bb5791..48a0114c 100644 --- a/tests/FunctionalTests/tickets/protected/pages/config.xml +++ b/tests/FunctionalTests/tickets/protected/pages/config.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?>
<configuration>
+ <paths>
+ <using namespace="System.I18N.*" />
+ </paths>
<pages MasterClass="Application.pages.Layout" />
</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/hotspot.jpg b/tests/FunctionalTests/tickets/protected/pages/hotspot.jpg Binary files differnew file mode 100644 index 00000000..3491813f --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/hotspot.jpg diff --git a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php new file mode 100644 index 00000000..7453aeef --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php @@ -0,0 +1,19 @@ +<?php
+
+class Ticket121TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket121');
+ $this->type("ctl0\$Content\$FooTextBox", "");
+ $this->verifyNotVisible('ctl0_Content_ctl1');
+ $this->click("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
+ $this->verifyVisible('ctl0_Content_ctl1');
+ $this->type("ctl0\$Content\$FooTextBox", "content");
+ $this->clickAndWait("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
+ $this->verifyNotVisible('ctl0_Content_ctl1');
+ $this->verifyTextPresent("clicked at", "");
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php new file mode 100644 index 00000000..cc78c466 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php @@ -0,0 +1,14 @@ +<?php + +class Ticket163TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket163'); + $this->assertTextPresent('kr 100,00'); + $this->assertTextPresent('kr 0,00'); + $this->assertTextPresent('-kr 100,00'); + } +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php new file mode 100644 index 00000000..30bbc92d --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php @@ -0,0 +1,14 @@ +<?php + +class Ticket169TestCase extends SeleniumTestCase +{ + function test() + { + $this->open('tickets/index.php?page=Ticket169'); + $this->assertNotVisible('ctl0_Content_validator1'); + $this->click('ctl0_Content_ctl0'); + $this->assertVisible('ctl0_Content_validator1'); + } +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php new file mode 100644 index 00000000..cc4c1571 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php @@ -0,0 +1,16 @@ +<?php
+
+class Ticket191TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket191');
+ $this->type("ctl0\$Content\$TextBox2", "test");
+ $this->clickAndWait("//input[@type='submit' and @name='ctl0\$Content\$ctl0']", "");
+ $this->type("ctl0\$Content\$TextBox", "test");
+ $this->clickAndWait("//input[@type='submit' and @name='ctl0\$Content\$ctl1']", "");
+ $this->verifyNotVisible('ctl0_Content_ctl2');
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php new file mode 100644 index 00000000..960dd2d8 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php @@ -0,0 +1,15 @@ +<?php + +class Ticket28TestCase extends SeleniumTestCase +{ + + function test() + { + $this->open('tickets/index.php?page=Ticket28'); + $this->assertTextPresent('Label 1'); + $this->clickAndWait('link=Click Me'); + $this->assertTextPresent('Link Button 1 Clicked!'); + } +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php new file mode 100644 index 00000000..6a286ffe --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php @@ -0,0 +1,16 @@ +<?php
+/*
+ * Created on 13/04/2006
+ *
+ */
+
+class Ticket93TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket93');
+ $this->verifyTextPresent("ValidationGroups without any inputs with grouping");
+ }
+
+}
+?>
|