diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
commit | 74b31be9515eddfa63005d6760614badfaba9fea (patch) | |
tree | 47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/FunctionalTests/tickets | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests/tickets')
84 files changed, 713 insertions, 698 deletions
diff --git a/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php b/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php index 9aecda84..0165edac 100755 --- a/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php +++ b/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php @@ -6,7 +6,6 @@ * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2007, CERAM Sophia Antipolis * @license url nameoflicense - * @version $Id: ToggleImageButton.php 2043 2007-06-30 15:07:50Z xue $ * */ diff --git a/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php b/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php index 934efcef..7bc53ba3 100755 --- a/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php +++ b/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php @@ -1,16 +1,15 @@ <?php /** * - * + * * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2007, CERAM Sophia Antipolis * @license url nameoflicense - * @version $Id: ExtendedToggleImageButton.php 2039 2007-06-28 08:41:57Z tof $ - * + * */ prado::using ('Application.controls.ToggleImageButton'); class ExtendedToggleImageButton extends ToggleImageButton { - + }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl index bf2f8fab..b245a50d 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Layout.tpl +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl @@ -1,7 +1,7 @@ -<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<com:THead Title="PRADO Functional Tests">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
@@ -30,7 +30,6 @@ <com:TContentPlaceHolder ID="Content" />
<hr style="margin-top: 2em" />
-<com:TJavascriptLogger />
</com:TForm>
<div class="w3c">
<a href="http://validator.w3.org/check?uri=referer">
@@ -38,7 +37,7 @@ </a>
<a href="?page=ViewSource&path=<%= str_replace('.','/', $this->Request->ServiceParameter) %>.page"
style="margin: 0 1em;"
- onclick="window.open(this.href); return false;"
+ onclick="window.open(this.href); return false;"
onkeypress="window.open(this.href); return false;">View Source</a>
</div>
</body>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page index e4c8fa95..395657ec 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page @@ -21,10 +21,10 @@ { element = $("<%= $this->label1->ClientID %>"); if(element) - element.innerHTML = "Label 1: "+inspect(ClientScriptInfo); + element.innerHTML = "Label 1: "+ClientScriptInfo.join('; '); else alert("failed"); }); </com:TClientScript> -</com:TContent>
\ No newline at end of file +</com:TContent> diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page index e9d40b92..3d4bf647 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page @@ -1,18 +1,17 @@ <com:TContent ID="Content"> - <h3>Needs manual testing</h3> <com:TPanel ID="panel1" DefaultButton="button2" Style="border:1px solid #ccc; padding:2em"> <com:TTextBox ID="textbox1" /> - + <com:TCustomValidator ControlToValidate="textbox1" OnServerValidate="customValidate" ValidationGroup="group1" ErrorMessage="required" /> - - <com:TButton ID="button1" Text="Button 1" + + <com:TButton ID="button1" Text="Button 1" ValidationGroup="group1" OnClick="button_clicked" /> - <com:TButton ID="button2" Text="Button 2 (default)" + <com:TButton ID="button2" Text="Button 2 (default)" ValidationGroup="group1" OnClick="button_clicked" /> <com:TLabel ID="label1" Text="Label 1" /> diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket586.page b/tests/FunctionalTests/tickets/protected/pages/Ticket586.page index 29751cab..31bc7237 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket586.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket586.page @@ -1,5 +1,4 @@ <com:TContent ID="Content">
-<h3>Needs manual testing</h3>
<com:TPanel DefaultButton="button2" Style="border:1px solid #ccc; padding:2em;">
<com:TTextBox ID="text1" />
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl index bf2f8fab..b245a50d 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl @@ -1,7 +1,7 @@ -<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<com:THead Title="PRADO Functional Tests">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
@@ -30,7 +30,6 @@ <com:TContentPlaceHolder ID="Content" />
<hr style="margin-top: 2em" />
-<com:TJavascriptLogger />
</com:TForm>
<div class="w3c">
<a href="http://validator.w3.org/check?uri=referer">
@@ -38,7 +37,7 @@ </a>
<a href="?page=ViewSource&path=<%= str_replace('.','/', $this->Request->ServiceParameter) %>.page"
style="margin: 0 1em;"
- onclick="window.open(this.href); return false;"
+ onclick="window.open(this.href); return false;"
onkeypress="window.open(this.href); return false;">View Source</a>
</div>
</body>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket659.php b/tests/FunctionalTests/tickets/protected/pages/Ticket659.php index cb266fd7..85b87d55 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket659.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket659.php @@ -1,12 +1,11 @@ <?php /** * - * + * * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2007, CERAM Sophia Antipolis * @license url nameoflicense - * @version $Id: Ticket659.php 2039 2007-06-28 08:41:57Z tof $ - * + * */ prado::using ('Application.pages.ExtendedToggleImageButton'); diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php index adf71837..f254cf6d 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php @@ -6,24 +6,24 @@ class Ticket703 extends TPage { parent::onLoad($param); if (!$this->isPostBack && !$this->isCallback) { - $this->refreshLog(); + $this->clearLog(null, null); } } - + public function refreshLog () { $this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt')); } - + public function clearLog ($sender, $param) { $file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'); file_put_contents($file, ''); $this->refreshLog(); } - + public function addLog($sender,$param) { - prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); + prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket719.page b/tests/FunctionalTests/tickets/protected/pages/Ticket719.page index b36d2d66..3f2bc17b 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket719.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket719.page @@ -1,5 +1,4 @@ <com:TContent id="Content"> -<h3>Needs manual testing</h3> <style> .autocomplete { @@ -45,7 +44,7 @@ ul.different OnSuggest="suggestCountries" Separator=", " OnSuggestionSelected="suggestion_selected" ResultPanel.CssClass="autocomplete" CausesValidation="false" /> - + </p> <p> <com:TButton OnClick="validForm" Text="Validate Form" /><br/> diff --git a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page index 0d633657..0d633657 100644..100755 --- a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page +++ b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page diff --git a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php index 73a2cc57..98492ffb 100644..100755 --- a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php +++ b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php @@ -1,12 +1,11 @@ <?php /** * - * + * * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2007, CERAM Sophia Antipolis * @license url nameoflicense - * @version $Id: ToggleTest.php 2039 2007-06-28 08:41:57Z tof $ - * + * */ prado::using ('Application.controls.ToggleImageButton'); @@ -15,5 +14,4 @@ class ToggleTest extends TPage { public function clickToggleButton ($sender, $param) { $this->lbl->Text=$sender->State; } -} -?>
\ No newline at end of file +}
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php index 20a4096b..0c6945ba 100755 --- a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php @@ -1,16 +1,16 @@ <?php -class Issue120TestCase extends PradoGenericSeleniumTest +class Issue120TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Issue120'); - $this->assertTextPresent('TActiveDropDownList PromptValue Test'); - + $this->url('tickets/index.php?page=Issue120'); + $this->assertContains('TActiveDropDownList PromptValue Test', $this->source()); + $this->assertSelectedIndex("ctl0_Content_ddl1", 0); $this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue'); - - $this->click("ctl0_Content_btn1"); + + $this->byId("ctl0_Content_btn1")->click(); $this->pause(800); $this->assertSelectedIndex("ctl0_Content_ddl1", 0); diff --git a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php index 375f90a7..d71db0e1 100755 --- a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php @@ -1,25 +1,25 @@ <?php -class Issue216TestCase extends PradoGenericSeleniumTest +class Issue216TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Issue216'); - $this->assertTextPresent('TTabPanel doesn\'t preserve active tab on callback request'); - + $this->url('tickets/index.php?page=Issue216'); + $this->assertContains('TTabPanel doesn\'t preserve active tab on callback request', $this->source()); + $this->assertVisible('ctl0_Content_tab1'); - $this->click("ctl0_Content_btn1"); + $this->byId("ctl0_Content_btn1")->click(); $this->pause(800); $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 0"); - $this->click("ctl0_Content_tab2_0"); + $this->byId("ctl0_Content_tab2_0")->click(); $this->pause(800); $this->assertVisible('ctl0_Content_tab2'); - $this->click("ctl0_Content_btn1"); + $this->byId("ctl0_Content_btn1")->click(); $this->pause(800); $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 1"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php index 905a31a4..547ffb38 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php @@ -1,17 +1,17 @@ <?php -class Ticket121TestCase extends PradoGenericSeleniumTest +class Ticket121TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket121'); + $this->url('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->assertNotVisible('ctl0_Content_ctl1'); + $this->byXPath("//input[@type='image' and @id='ctl0_Content_ctl0']")->click(); + $this->assertVisible('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", ""); + $this->byXPath("//input[@type='image' and @id='ctl0_Content_ctl0']")->click(); + $this->assertNotVisible('ctl0_Content_ctl1'); + $this->assertContains("clicked at", $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php index 1727ac40..20d9c645 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket163TestCase extends PradoGenericSeleniumTest +class Ticket163TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket163'); - $this->assertTextPresent('kr 100,00'); - $this->assertTextPresent('kr 0,00'); - $this->assertTextPresent('-kr 100,00'); + $this->url('tickets/index.php?page=Ticket163'); + $this->assertContains('kr 100,00', $this->source()); + $this->assertContains('kr 0,00', $this->source()); + $this->assertContains('-kr 100,00', $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php index 9889ea50..47bb380b 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket169TestCase extends PradoGenericSeleniumTest +class Ticket169TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket169'); + $this->url('tickets/index.php?page=Ticket169'); $this->assertNotVisible('ctl0_Content_validator1'); - $this->click('ctl0_Content_ctl0'); + $this->byId('ctl0_Content_ctl0')->click(); $this->assertVisible('ctl0_Content_validator1'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php index 88de08cc..c0bccaa9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php @@ -1,14 +1,14 @@ <?php -class Ticket191TestCase extends PradoGenericSeleniumTest +class Ticket191TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket191'); + $this->url('tickets/index.php?page=Ticket191'); $this->type("ctl0\$Content\$TextBox2", "test"); - $this->clickAndWait("name=ctl0\$Content\$ctl0"); + $this->byName("ctl0\$Content\$ctl0")->click(); $this->type("ctl0\$Content\$TextBox", "test"); - $this->clickAndWait("name=ctl0\$Content\$ctl1"); - $this->verifyNotVisible('ctl0_Content_ctl2'); + $this->byName("ctl0\$Content\$ctl1")->click(); + $this->assertNotVisible('ctl0_Content_ctl2'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php index 86768354..35274e6f 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php @@ -1,21 +1,29 @@ <?php -class Ticket205TestCase extends PradoGenericSeleniumTest +class Ticket205TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open("tickets/index.php?page=Ticket205"); - $this->assertTitle("Verifying Ticket 205"); - $this->assertNotVisible("{$base}validator1"); + $this->url("tickets/index.php?page=Ticket205"); + $this->assertEquals($this->title(), "Verifying Ticket 205"); + + $validator=$this->byId("{$base}validator1"); + $this->assertFalse($validator->displayed()); $this->type("{$base}textbox1", "test"); - $this->click("{$base}button1"); - $this->assertAlert("error"); - $this->assertVisible("{$base}validator1"); + $this->byId("{$base}button1")->click(); + + $this->assertEquals("error", $this->alertText()); + $this->acceptAlert(); + + $this->assertTrue($validator->displayed()); + + // type() calls clear() that triggers a focus change and thus a second alert + $this->typeSpecial("{$base}textbox1", "Prado"); - $this->type("{$base}textbox1", "Prado"); - $this->clickAndWait("{$base}button1"); - $this->assertNotVisible("{$base}validator1"); + $this->byId("{$base}button1")->click(); + $validator=$this->byId("{$base}validator1"); + $this->assertFalse($validator->displayed()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php index cd618a5d..cc993192 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php @@ -1,25 +1,28 @@ <?php -class Ticket207TestCase extends PradoGenericSeleniumTest +class Ticket207TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket207'); - $this->assertTitle("Verifying Ticket 207"); + $this->url('tickets/index.php?page=Ticket207'); + $this->assertEquals($this->title(), "Verifying Ticket 207"); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); - - $this->click("{$base}button1"); - $this->assertAlert('error on text1 fired'); + + $this->byId("{$base}button1")->click(); + + $this->assertEquals('error on text1 fired', $this->alertText()); + $this->acceptAlert(); + $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); - + $this->type("{$base}text1", 'test'); $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->assertNotVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); @@ -27,8 +30,11 @@ class Ticket207TestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); - $this->click("{$base}button1"); - $this->assertAlert('error on text1 fired'); + $this->byId("{$base}button1")->click(); + + $this->assertEquals('error on text1 fired', $this->alertText()); + $this->acceptAlert(); + $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php index 5e48ff2d..b9a0f0c9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php @@ -1,14 +1,14 @@ <?php -class Ticket21TestCase extends PradoGenericSeleniumTest +class Ticket21TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket21'); - $this->assertTitle("Verifying Ticket 21"); - $this->clickAndWait("ctl0_Content_button1"); - $this->verifyTextPresent("Radio button clicks: 1", ""); - $this->click("ctl0_Content_button1"); - $this->verifyTextPresent("Radio button clicks: 1", ""); + $this->url('tickets/index.php?page=Ticket21'); + $this->assertEquals($this->title(), "Verifying Ticket 21"); + $this->byId("ctl0_Content_button1")->click(); + $this->assertContains("Radio button clicks: 1", $this->source()); + $this->byId("ctl0_Content_button1")->click(); + $this->assertContains("Radio button clicks: 1", $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php index da5e8c15..0ef67933 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php @@ -1,16 +1,16 @@ <?php -class Ticket220TestCase extends PradoGenericSeleniumTest +class Ticket220TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket220'); - $this->assertTextPresent('ClientScript Test'); + $this->url('tickets/index.php?page=Ticket220'); + $this->assertContains('ClientScript Test', $this->source()); $this->assertText("{$base}label1", "Label 1"); - $this->click("button1"); - $this->assertText("{$base}label1", 'exact:Label 1: ["ok", "ok 3?", "ok 2!"]'); + $this->byId("button1")->click(); + $this->assertText("{$base}label1", 'Label 1: ok; ok 3?; ok 2!'); $this->assertAlertNotPresent(); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php index 3680eea1..74ad6505 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php @@ -1,22 +1,22 @@ <?php -class Ticket225TestCase extends PradoGenericSeleniumTest +class Ticket225TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket225'); - $this->assertTextPresent('RadioButton Group Tests'); + $this->url('tickets/index.php?page=Ticket225'); + $this->assertContains('RadioButton Group Tests', $this->source()); $this->assertText("{$base}label1", "Label 1"); $this->assertNotVisible("{$base}validator1"); - $this->click("{$base}button4"); + $this->byId("{$base}button4")->click(); $this->assertVisible("{$base}validator1"); - $this->click("{$base}button2"); - $this->clickAndWait("{$base}button4"); + $this->byId("{$base}button2")->click(); + $this->byId("{$base}button4")->click(); - $this->assertText("{$base}label1", 'exact:ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3'); + $this->assertText("{$base}label1", 'ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3'); $this->assertNotVisible("{$base}validator1"); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php index 1f1c0fb9..3defa014 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php @@ -1,10 +1,10 @@ <?php -class Ticket227TestCase extends PradoGenericSeleniumTest +class Ticket227TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket227'); - $this->assertTitle('Verifying Ticket 227'); + $this->url('tickets/index.php?page=Ticket227'); + $this->assertEquals($this->title(), 'Verifying Ticket 227'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php index 57251d23..e5595a13 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php @@ -1,53 +1,53 @@ <?php -class Ticket239TestCase extends PradoGenericSeleniumTest +class Ticket239TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket239'); + $this->url('tickets/index.php?page=Ticket239'); // view1 - $this->verifyTextPresent('view1 is activated',''); - $this->verifyTextNotPresent('view1 is deactivated',''); - $this->verifyTextNotPresent('view2 is activated',''); - $this->verifyTextNotPresent('view2 is deactivated',''); - $this->verifyTextNotPresent('view3 is activated',''); - $this->verifyTextNotPresent('view3 is deactivated',''); + $this->assertContains('view1 is activated', $this->source()); + $this->assertNotContains('view1 is deactivated', $this->source()); + $this->assertNotContains('view2 is activated', $this->source()); + $this->assertNotContains('view2 is deactivated', $this->source()); + $this->assertNotContains('view3 is activated', $this->source()); + $this->assertNotContains('view3 is deactivated', $this->source()); // goto view2 - $this->clickAndWait('name=ctl0$Content$ctl1'); - $this->verifyTextNotPresent('view1 is activated',''); - $this->verifyTextPresent('view1 is deactivated',''); - $this->verifyTextPresent('view2 is activated',''); - $this->verifyTextNotPresent('view2 is deactivated',''); - $this->verifyTextNotPresent('view3 is activated',''); - $this->verifyTextNotPresent('view3 is deactivated',''); + $this->byName('ctl0$Content$ctl1')->click(); + $this->assertNotContains('view1 is activated', $this->source()); + $this->assertContains('view1 is deactivated', $this->source()); + $this->assertContains('view2 is activated', $this->source()); + $this->assertNotContains('view2 is deactivated', $this->source()); + $this->assertNotContains('view3 is activated', $this->source()); + $this->assertNotContains('view3 is deactivated', $this->source()); // goto view3 - $this->clickAndWait('name=ctl0$Content$ctl3'); - $this->verifyTextNotPresent('view1 is activated',''); - $this->verifyTextNotPresent('view1 is deactivated',''); - $this->verifyTextNotPresent('view2 is activated',''); - $this->verifyTextPresent('view2 is deactivated',''); - $this->verifyTextPresent('view3 is activated',''); - $this->verifyTextNotPresent('view3 is deactivated',''); + $this->byName('ctl0$Content$ctl3')->click(); + $this->assertNotContains('view1 is activated', $this->source()); + $this->assertNotContains('view1 is deactivated', $this->source()); + $this->assertNotContains('view2 is activated', $this->source()); + $this->assertContains('view2 is deactivated', $this->source()); + $this->assertContains('view3 is activated', $this->source()); + $this->assertNotContains('view3 is deactivated', $this->source()); // goto view2 - $this->clickAndWait('name=ctl0$Content$ctl4'); - $this->verifyTextNotPresent('view1 is activated',''); - $this->verifyTextNotPresent('view1 is deactivated',''); - $this->verifyTextPresent('view2 is activated',''); - $this->verifyTextNotPresent('view2 is deactivated',''); - $this->verifyTextNotPresent('view3 is activated',''); - $this->verifyTextPresent('view3 is deactivated',''); + $this->byName('ctl0$Content$ctl4')->click(); + $this->assertNotContains('view1 is activated', $this->source()); + $this->assertNotContains('view1 is deactivated', $this->source()); + $this->assertContains('view2 is activated', $this->source()); + $this->assertNotContains('view2 is deactivated', $this->source()); + $this->assertNotContains('view3 is activated', $this->source()); + $this->assertContains('view3 is deactivated', $this->source()); // goto view1 - $this->clickAndWait('name=ctl0$Content$ctl2'); - $this->verifyTextPresent('view1 is activated',''); - $this->verifyTextNotPresent('view1 is deactivated',''); - $this->verifyTextNotPresent('view2 is activated',''); - $this->verifyTextPresent('view2 is deactivated',''); - $this->verifyTextNotPresent('view3 is activated',''); - $this->verifyTextNotPresent('view3 is deactivated',''); + $this->byName('ctl0$Content$ctl2')->click(); + $this->assertContains('view1 is activated', $this->source()); + $this->assertNotContains('view1 is deactivated', $this->source()); + $this->assertNotContains('view2 is activated', $this->source()); + $this->assertContains('view2 is deactivated', $this->source()); + $this->assertNotContains('view3 is activated', $this->source()); + $this->assertNotContains('view3 is deactivated', $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php index bedd6e2c..7c4fe364 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php @@ -1,10 +1,10 @@ <?php -class Ticket246TestCase extends PradoGenericSeleniumTest +class Ticket246TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket246'); - $this->assertTitle('Verifying Ticket 246'); + $this->url('tickets/index.php?page=Ticket246'); + $this->assertEquals($this->title(), 'Verifying Ticket 246'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php index b2b17de7..ebb60ca9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php @@ -1,21 +1,21 @@ <?php -class Ticket274TestCase extends PradoGenericSeleniumTest +class Ticket274TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket274'); - $this->assertTitle('Verifying Ticket 274'); + $this->url('tickets/index.php?page=Ticket274'); + $this->assertEquals($this->title(), 'Verifying Ticket 274'); $this->assertNotVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); - $this->clickAndWait($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); $this->type($base.'MyDate', 'asd'); - $this->clickAndWait($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertNotVisible($base.'validator1'); $this->assertVisible($base.'validator2'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php index 4bfffede..ca11f626 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php @@ -1,28 +1,28 @@ <?php -class Ticket278TestCase extends PradoGenericSeleniumTest +class Ticket278TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket278'); - $this->assertTitle('Verifying Ticket 278'); + $this->url('tickets/index.php?page=Ticket278'); + $this->assertEquals($this->title(), 'Verifying Ticket 278'); $this->assertNotVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); $this->assertNotVisible($base.'panel1'); - $this->click($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); $this->type($base.'text1', 'asd'); - $this->clickAndWait($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertNotVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); $this->assertNotVisible($base.'panel1'); - $this->click($base.'check1'); - $this->click($base.'button1'); + $this->byId($base.'check1')->click(); + $this->byId($base.'button1')->click(); $this->assertNotVisible($base.'validator1'); $this->assertVisible($base.'validator2'); $this->assertVisible($base.'panel1'); @@ -30,21 +30,21 @@ class Ticket278TestCase extends PradoGenericSeleniumTest $this->type($base.'text1', ''); $this->type($base.'text2', 'asd'); - $this->click($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); $this->assertVisible($base.'panel1'); $this->type($base.'text1', 'asd'); - $this->clickAndWait($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertNotVisible($base.'validator1'); $this->assertNotVisible($base.'validator2'); $this->assertVisible($base.'panel1'); $this->type($base.'text1', ''); $this->type($base.'text2', ''); - $this->click($base.'button1'); + $this->byId($base.'button1')->click(); $this->assertVisible($base.'validator1'); $this->assertVisible($base.'validator2'); $this->assertVisible($base.'panel1'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php index 7defd7ae..bc478895 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php @@ -1,16 +1,16 @@ <?php -class Ticket27TestCase extends PradoGenericSeleniumTest +class Ticket27TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket27'); - $this->verifyTitle("Verifying Ticket 27", ""); - $this->click("//input[@value='Agree']", ""); - $this->assertVisible("ctl0_Content_validator1", ""); + $this->url('tickets/index.php?page=Ticket27'); + $this->assertEquals("Verifying Ticket 27", $this->title()); + $this->byXPath("//input[@value='Agree']")->click(); + $this->assertVisible("ctl0_Content_validator1"); $this->type("ctl0_Content_TextBox", "122"); - $this->assertNotVisible("ctl0_Content_validator1", ""); - $this->clickAndWait("//input[@value='Disagree']", ""); - $this->assertNotVisible("ctl0_Content_validator1", ""); + $this->assertNotVisible("ctl0_Content_validator1"); + $this->byXPath("//input[@value='Disagree']")->click(); + $this->assertNotVisible("ctl0_Content_validator1"); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php index d28ea771..b4a32c19 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket284TestCase extends PradoGenericSeleniumTest +class Ticket284TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket284'); - $this->assertTextPresent('Verifying Ticket 284'); - $this->click('ctl0_Content_ctl1'); - + $this->url('tickets/index.php?page=Ticket284'); + $this->assertContains('Verifying Ticket 284', $this->source()); + $this->byId('ctl0_Content_ctl1')->click(); + } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php index 8b996964..04a451df 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php @@ -1,11 +1,11 @@ <?php -class Ticket285TestCase extends PradoGenericSeleniumTest +class Ticket285TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket285'); - $this->assertTextPresent('350.00'); - $this->assertTextPresent('349.99'); + $this->url('tickets/index.php?page=Ticket285'); + $this->assertContains('350.00', $this->source()); + $this->assertContains('349.99', $this->source()); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php index 1f64b3f9..92bf1eb9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php @@ -1,13 +1,13 @@ <?php -class Ticket28TestCase extends PradoGenericSeleniumTest +class Ticket28TestCase extends PradoGenericSelenium2Test { - + function test() { - $this->open('tickets/index.php?page=Ticket28'); - $this->assertTextPresent('Label 1'); - $this->clickAndWait('link=Click Me'); - $this->assertTextPresent('Link Button 1 Clicked!'); + $this->url('tickets/index.php?page=Ticket28'); + $this->assertContains('Label 1', $this->source()); + $this->byLinkText("Click Me")->click(); + $this->assertContains('Link Button 1 Clicked!', $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php index f541d63d..8116e753 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php @@ -1,28 +1,27 @@ <?php /** -* +* */ -class Ticket290TestCase extends PradoGenericSeleniumTest +class Ticket290TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket290'); - $this->assertTitle("Verifying Ticket 290"); - + $this->url('tickets/index.php?page=Ticket290'); + $this->assertEquals($this->title(), "Verifying Ticket 290"); + $this->assertText("{$base}label1", "Label 1"); $this->assertText("{$base}label2", "Label 2"); $this->type("{$base}textbox1", "test"); - // bad hack to simulate enter key.. - $this->submit('ctl0_ctl1'); + + $this->byId("{$base}textbox1")->click(); + $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER); $this->pause(800); - - $this->assertText("{$base}label1", "Doing Validation"); - // this can't work properly without manual testing - //$this->assertText("{$base}label2", "Button 2 (default) Clicked!"); + $this->assertText("{$base}label1", "Doing Validation"); + $this->assertText("{$base}label2", "Button 2 (default) Clicked!"); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php index b8462988..aae4ee21 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php @@ -1,15 +1,15 @@ <?php -class Ticket433TestCase extends PradoGenericSeleniumTest +class Ticket433TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket433'); - $this->assertTitle("Verifying Ticket 433"); + $this->url('tickets/index.php?page=Ticket433'); + $this->assertEquals($this->title(), "Verifying Ticket 433"); $this->assertText("{$base}VoteClick", "BEFORE click"); - $this->click("{$base}VoteClick"); + $this->byId("{$base}VoteClick")->click(); $this->pause(800); $this->assertText("{$base}VoteClick", "AFTER click CALLBACK DONE"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php index c393de91..f586a6c9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php @@ -1,15 +1,14 @@ <?php -class Ticket439TestCase extends PradoGenericSeleniumTest +class Ticket439TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket439'); - $this->assertTitle("Verifying Ticket 439"); - $this->click("{$base}button1"); - $this->waitForPageToLoad(3000); + $this->url('tickets/index.php?page=Ticket439'); + $this->assertEquals($this->title(), "Verifying Ticket 439"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertTitle("Verifying Home"); + $this->assertEquals($this->title(), "Verifying Home"); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php index 34ffb8fd..14f00970 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php @@ -1,11 +1,11 @@ <?php -class Ticket463TestCase extends PradoGenericSeleniumTest +class Ticket463TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket463'); - $this->verifyTitle("Verifying Ticket 463", ""); - $this->assertTextPresent('May 1, 2005 12:00:00 AM'); + $this->url('tickets/index.php?page=Ticket463'); + $this->assertEquals("Verifying Ticket 463", $this->title()); + $this->assertContains('May 1, 2005 12:00:00 AM', $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php index 4a2804ea..a3e25e85 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php @@ -1,31 +1,31 @@ <?php -class Ticket470TestCase extends PradoGenericSeleniumTest +class Ticket470TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket470'); - $this->verifyTitle("Verifying Ticket 470"); + $this->url('tickets/index.php?page=Ticket470'); + $this->assertEquals("Verifying Ticket 470", $this->title()); $this->assertText("{$base}counter", "0"); $this->assertText("{$base}Results", ""); $this->assertNotVisible("{$base}validator1"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("{$base}counter", "0"); $this->assertText("{$base}Results", ""); $this->assertVisible("{$base}validator1"); $this->type("{$base}TextBox", "hello"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("{$base}counter", "0"); $this->assertText("{$base}Results", "OK!!!"); $this->assertNotVisible("{$base}validator1"); //reload - $this->click("{$base}reloadButton"); + $this->byId("{$base}reloadButton")->click(); $this->pause(800); $this->assertValue("{$base}TextBox", "hello"); $this->assertText("{$base}counter", "1"); @@ -33,14 +33,14 @@ class Ticket470TestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}validator1"); $this->type("{$base}TextBox", ""); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("{$base}counter", "1"); $this->assertText("{$base}Results", ""); $this->assertVisible("{$base}validator1"); - + $this->type("{$base}TextBox", "test"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("{$base}counter", "1"); $this->assertText("{$base}Results", "OK!!!"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php index 16ebc56e..7f9bc58c 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php @@ -1,21 +1,21 @@ <?php -class Ticket477TestCase extends PradoGenericSeleniumTest +class Ticket477TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket477'); - $this->assertTitle("Verifying Ticket 477"); + $this->url('tickets/index.php?page=Ticket477'); + $this->assertEquals($this->title(), "Verifying Ticket 477"); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); - $this->clickAndWait("{$base}list1_c1"); + $this->byId("{$base}list1_c1")->click(); $this->assertVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); - $this->clickAndWait("{$base}list2_c1"); + $this->byId("{$base}list2_c1")->click(); $this->assertNotVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php index c3b2f43f..e4b72aaf 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php @@ -1,40 +1,41 @@ <?php -class Ticket488TestCase extends PradoGenericSeleniumTest +class Ticket488TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('active-controls/index.php?page=CustomValidatorByPass'); - $this->assertTextPresent('Custom Login'); + $base='ctl0_Content_'; + $this->url('active-controls/index.php?page=CustomValidatorByPass'); + $this->assertContains('Custom Login', $this->source()); $this->assertNotVisible('loginBox'); - $this->click("showLogin"); + $this->byId("showLogin")->click(); $this->assertVisible("loginBox"); - $this->assertNotVisible("validator1"); - $this->assertNotVisible("validator2"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); - $this->click("checkLogin"); + $this->byId("{$base}checkLogin")->click(); $this->pause(800); - $this->assertVisible("validator1"); - $this->assertNotVisible("validator2"); + $this->assertVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); - $this->type('Username', 'tea'); - $this->type('Password', 'mmama'); + $this->type("{$base}Username", 'tea'); + $this->type("{$base}Password", 'mmama'); - $this->click("checkLogin"); + $this->byId("{$base}checkLogin")->click(); $this->pause(800); - $this->assertNotVisible("validator1"); - $this->assertVisible("validator2"); + $this->assertNotVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); - $this->type('Password', 'test'); - $this->click("checkLogin"); + $this->type("{$base}Password", 'test'); + $this->byId("{$base}checkLogin")->click(); $this->pause(800); - $this->assertNotVisible("validator1"); - $this->assertNotVisible("validator2"); + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); } function test_more() { - $this->open('tickets/index.php?page=Ticket488'); + $this->url('tickets/index.php?page=Ticket488'); //add test assertions here. } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php index 63ecfe2f..f3bdd0a9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket504TestCase extends PradoGenericSeleniumTest +class Ticket504TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket504'); - $this->verifyTitle("Verifying Ticket 504", ""); + $this->url('tickets/index.php?page=Ticket504'); + $this->assertEquals("Verifying Ticket 504", $this->title()); $this->assertText("status", ""); @@ -15,7 +15,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest $this->assertVisible("{$base}panelC"); $this->assertVisible("{$base}panelD"); - $this->click("{$base}linka"); + $this->byId("{$base}linka")->click(); $this->pause(800); $this->assertVisible("{$base}panelA"); $this->assertNotVisible("{$base}panelB"); @@ -23,7 +23,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}panelD"); $this->assertText("status", "panelA updated"); - $this->click("{$base}linkb"); + $this->byId("{$base}linkb")->click(); $this->pause(800); $this->assertNotVisible("{$base}panelA"); $this->assertVisible("{$base}panelB"); @@ -31,7 +31,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}panelD"); $this->assertText("status", "panelB updated"); - $this->click("{$base}linkc"); + $this->byId("{$base}linkc")->click(); $this->pause(800); $this->assertNotVisible("{$base}panelA"); $this->assertNotVisible("{$base}panelB"); @@ -39,7 +39,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest $this->assertNotVisible("{$base}panelD"); $this->assertText("status", "panelC updated"); - $this->click("{$base}linkd"); + $this->byId("{$base}linkd")->click(); $this->pause(800); $this->assertNotVisible("{$base}panelA"); $this->assertNotVisible("{$base}panelB"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php index 19d54e9b..68c94b03 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php @@ -1,16 +1,16 @@ <?php -class Ticket507TestCase extends PradoGenericSeleniumTest +class Ticket507TestCase extends PradoGenericSelenium2Test { function test() { $base='ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket507'); - $this->verifyTitle("Verifying Ticket 507", ""); + $this->url('tickets/index.php?page=Ticket507'); + $this->assertEquals("Verifying Ticket 507", $this->title()); $this->assertText("{$base}label1", "Label 1"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->select("{$base}list1", "item 1"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php index 2df88612..71457b58 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php @@ -1,15 +1,15 @@ <?php -class Ticket521TestCase extends PradoGenericSeleniumTest +class Ticket521TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open("tickets/index.php?page=Ticket521"); - $this->assertTitle("Verifying Ticket 521"); + $this->url("tickets/index.php?page=Ticket521"); + $this->assertEquals($this->title(), "Verifying Ticket 521"); $this->assertText("{$base}label1", "Label 1"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(1200); $this->assertText("{$base}label1", "Button 1 was clicked on callback"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php index 7476db69..c8659002 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php @@ -1,16 +1,16 @@ <?php -class Ticket526TestCase extends PradoGenericSeleniumTest +class Ticket526TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket526'); - $this->verifyTitle("Verifying Ticket 526", ""); + $this->url('tickets/index.php?page=Ticket526'); + $this->assertEquals("Verifying Ticket 526", $this->title()); $this->assertElementNotPresent("{$base}dpbutton"); - $this->click("{$base}btn"); + $this->byId("{$base}btn")->click(); $this->pause(800); $this->assertElementPresent("{$base}dpbutton"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php index 3903000a..7fb24d04 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket528TestCase extends PradoGenericSeleniumTest +class Ticket528TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket528'); - $this->assertTitle("Verifying Ticket 528"); + $this->url('tickets/index.php?page=Ticket528'); + $this->assertEquals($this->title(), "Verifying Ticket 528"); $this->select("{$base}DDropTurno", "Tarde"); $this->pause(800); diff --git a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php index 26f5a7d7..eebd2336 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php @@ -1,34 +1,34 @@ <?php -class Ticket535TestCase extends PradoGenericSeleniumTest +class Ticket535TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket535'); - $this->assertTitle("Verifying Ticket 535"); + $this->url('tickets/index.php?page=Ticket535'); + $this->assertEquals($this->title(), "Verifying Ticket 535"); $this->assertText("{$base}label1", "Label 1"); - $this->click("{$base}radio1"); - $this->click("{$base}button1"); + $this->byId("{$base}radio1")->click(); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{}'); + $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{}'); - $this->click("{$base}radio2"); - $this->click("{$base}button1"); + $this->byId("{$base}radio2")->click(); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{1}'); + $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{1}'); - $this->click("{$base}bad_radio1"); - $this->click("{$base}button2"); + $this->byId("{$base}bad_radio1")->click(); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{1} bad_radio2 checked:{}'); + $this->assertText("{$base}label1", 'bad_radio1 checked:{1} bad_radio2 checked:{}'); - $this->click("{$base}bad_radio2"); - $this->click("{$base}button2"); + $this->byId("{$base}bad_radio2")->click(); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{} bad_radio2 checked:{1}'); + $this->assertText("{$base}label1", 'bad_radio1 checked:{} bad_radio2 checked:{1}'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php index 16b0f863..2970837f 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php @@ -1,17 +1,17 @@ <?php -class Ticket538TestCase extends PradoGenericSeleniumTest +class Ticket538TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket538'); - $this->verifyTitle("Verifying Ticket 538", ""); + $this->url('tickets/index.php?page=Ticket538'); + $this->assertEquals("Verifying Ticket 538", $this->title()); $this->assertText("{$base}ALLog", 'waiting for response...'); $this->select("{$base}DataViewer", "empty :("); - $this->click("{$base}selectBtn"); + $this->byId("{$base}selectBtn")->click(); $this->pause(800); $this->assertText("{$base}ALLog", '0,'); @@ -21,7 +21,7 @@ class Ticket538TestCase extends PradoGenericSeleniumTest $this->select("{$base}DataViewer", "G1: Steven=>10"); $this->addSelection("{$base}DataViewer", "G2: Kevin=>65"); - $this->click("{$base}selectBtn"); + $this->byId("{$base}selectBtn")->click(); $this->pause(800); $this->assertText("{$base}ALLog", '4- "test1", 10- "test2",'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php index f8e5a469..cf1433b6 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php @@ -1,10 +1,10 @@ <?php -class Ticket54TestCase extends PradoGenericSeleniumTest +class Ticket54TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket54'); - $this->verifyTextPresent("|A|a|B|b|C|", ""); + $this->url('tickets/index.php?page=Ticket54'); + $this->assertContains("|A|a|B|b|C|", $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php index 996d72e9..cccdbaf3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php @@ -1,11 +1,11 @@ <?php -class Ticket573TestCase extends PradoGenericSeleniumTest +class Ticket573TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket573'); - $this->verifyTitle("Verifying Ticket 573", ""); + $this->url('tickets/index.php?page=Ticket573'); + $this->assertEquals("Verifying Ticket 573", $this->title()); $this->assertText('test1', '10.00'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php index 47330326..948d8642 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php @@ -1,22 +1,27 @@ <?php -class Ticket578TestCase extends PradoGenericSeleniumTest +class Ticket578TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket578'); - $this->verifyTitle("Verifying Ticket 578", ""); + $this->url('tickets/index.php?page=Ticket578'); + $this->assertEquals("Verifying Ticket 578", $this->title()); $this->assertText("{$base}label1", "Label 1"); - $this->click("{$base}button1", ""); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("{$base}label1", "Button 1 was clicked : "); + $this->assertText("{$base}label1", "Button 1 was clicked :"); $text="helloworld"; - $this->runScript("tinyMCE.get('{$base}text1').setContent('{$text}')"); - $this->click("{$base}button1", ""); + + $this->execute(array( + 'script' => "tinyMCE.get('{$base}text1').setContent('{$text}')", + 'args' => array() + )); + + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("{$base}label1", "exact:Button 1 was clicked : <p>{$text}</p>"); + $this->assertText("{$base}label1", "Button 1 was clicked : <p>{$text}</p>"); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php index 8b2d36b3..58b42c33 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php @@ -1,23 +1,23 @@ <?php -class Ticket585TestCase extends PradoGenericSeleniumTest +class Ticket585TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket585'); - $this->verifyTitle("Verifying Ticket 585", ""); + $this->url('tickets/index.php?page=Ticket585'); + $this->assertEquals("Verifying Ticket 585", $this->title()); $this->assertText("error", ""); $this->assertNotVisible("{$base}validator1"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("error", "Success"); $this->assertNotVisible("{$base}validator1"); $this->type("{$base}test", "15-03-2007"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertText("error", "Error"); $this->assertVisible("{$base}validator1"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php index 612c086a..5fd47f86 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php @@ -1,15 +1,15 @@ <?php -class Ticket586TestCase extends PradoGenericSeleniumTest +class Ticket586TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket586'); - $this->verifyTitle("Verifying Ticket 586", ""); + $this->url('tickets/index.php?page=Ticket586'); + $this->assertEquals("Verifying Ticket 586", $this->title()); $this->assertText("{$base}label1", "Status"); - $this->clickAndWait("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->assertText("{$base}label1", "Button 1 Clicked!"); $this->type("{$base}text1", "testing"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php index d5064c1e..cb42c343 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket587TestCase extends PradoGenericSeleniumTest +class Ticket587TestCase extends PradoGenericSelenium2Test { function testKeyPress() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket587_reopened'); - $this->assertTitle("Verifying Ticket 587_reopened"); + $this->url('tickets/index.php?page=Ticket587_reopened'); + $this->assertEquals($this->title(), "Verifying Ticket 587_reopened"); $this->assertText($base."label1", "Label 1"); $this->select($base."list1", "item 3"); @@ -16,7 +16,6 @@ class Ticket587TestCase extends PradoGenericSeleniumTest $this->assertText($base."label1", "Selection 2: value 3 - item 4"); $this->type($base.'text1', 't'); - $this->runScript("Prado.Registry.get('{$base}text1').onKeyPress({})"); $this->pause(800); $this->select($base."list2", "asd 3 - item 2"); $this->pause(800); @@ -26,8 +25,8 @@ class Ticket587TestCase extends PradoGenericSeleniumTest function testButtonClick() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket587_reopened'); - $this->assertTitle("Verifying Ticket 587_reopened"); + $this->url('tickets/index.php?page=Ticket587_reopened'); + $this->assertEquals($this->title(), "Verifying Ticket 587_reopened"); $this->assertText($base."label1", "Label 1"); $this->select($base."list1", "item 3"); @@ -36,7 +35,7 @@ class Ticket587TestCase extends PradoGenericSeleniumTest $this->pause(800); $this->assertText($base."label1", "Selection 2: value 3 - item 4"); - $this->click($base.'button6'); + $this->byId($base.'button6')->click(); $this->pause(800); $this->select($base."list2", "asd 3 - item 2"); $this->pause(800); diff --git a/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php index ec8d2284..692e2451 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php @@ -1,45 +1,45 @@ <?php -class Ticket592TestCase extends PradoGenericSeleniumTest +class Ticket592TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket592'); - $this->assertTitle("Verifying Ticket 592"); + $this->url('tickets/index.php?page=Ticket592'); + $this->assertEquals($this->title(), "Verifying Ticket 592"); $this->assertText("{$base}label1", "Label 1"); - $this->click("{$base}radio1"); - $this->click("{$base}button1"); + $this->byId("{$base}radio1")->click(); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{}'); + $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{}'); - $this->click("{$base}radio2"); - $this->click("{$base}button1"); + $this->byId("{$base}radio2")->click(); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{1}'); + $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{1}'); - $this->click("{$base}bad_radio1"); - $this->click("{$base}button2"); + $this->byId("{$base}bad_radio1")->click(); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{1} bad_radio2 checked:{}'); + $this->assertText("{$base}label1", 'bad_radio1 checked:{1} bad_radio2 checked:{}'); - $this->click("{$base}bad_radio2"); - $this->click("{$base}button2"); + $this->byId("{$base}bad_radio2")->click(); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{} bad_radio2 checked:{1}'); - - $this->click("{$base}bad_radio3"); - $this->click("{$base}button3"); + $this->assertText("{$base}label1", 'bad_radio1 checked:{} bad_radio2 checked:{1}'); + + $this->byId("{$base}bad_radio3")->click(); + $this->byId("{$base}button3")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:bad_radio3 checked:{1} bad_radio4 checked:{}'); + $this->assertText("{$base}label1", 'bad_radio3 checked:{1} bad_radio4 checked:{}'); - $this->click("{$base}bad_radio4"); - $this->click("{$base}button3"); + $this->byId("{$base}bad_radio4")->click(); + $this->byId("{$base}button3")->click(); $this->pause(800); - $this->assertText("{$base}label1", 'exact:bad_radio3 checked:{} bad_radio4 checked:{1}'); - + $this->assertText("{$base}label1", 'bad_radio3 checked:{} bad_radio4 checked:{1}'); + } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php index 14b2f985..27d57a91 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php @@ -1,36 +1,36 @@ <?php -class Ticket595TestCase extends PradoGenericSeleniumTest +class Ticket595TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket595'); - $this->assertTitle("Verifying Ticket 595"); - - $this->click($base.'ctl2'); + $this->url('tickets/index.php?page=Ticket595'); + $this->assertEquals($this->title(), "Verifying Ticket 595"); + + $this->byId($base.'ctl2')->click(); $this->assertAttribute($base.'A@class','errorclassA'); - + $this->type($base.'A', 'Prado'); - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); $this->assertAttribute($base.'A@class','errorclassA'); - + $this->type($base.'A', 'test@pradosoft.com'); - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); $this->pause(800); $this->assertAttribute($base.'A@class',''); - $this->click($base.'ctl5'); + $this->byId($base.'ctl5')->click(); $this->pause(800); - $this->assertAttribute($base.'B@class','exact: errorclassB'); - + $this->assertAttribute($base.'B@class',' errorclassB'); + $this->type($base.'B', 'Prado'); - $this->click($base.'ctl5'); + $this->byId($base.'ctl5')->click(); $this->pause(800); - $this->assertAttribute($base.'B@class','exact: errorclassB'); - + $this->assertAttribute($base.'B@class',' errorclassB'); + $this->type($base.'B', 'test@pradosoft.com'); - $this->click($base.'ctl5'); + $this->byId($base.'ctl5')->click(); $this->pause(800); $this->assertAttribute($base.'B@class',''); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php index 0d0fe3d2..b51f55d3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php @@ -1,17 +1,18 @@ <?php -class Ticket622TestCase extends PradoGenericSeleniumTest +class Ticket622TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket622'); - $this->assertTitle("Verifying Ticket 622"); - - $this->click($base.'ctl0'); + $this->url('tickets/index.php?page=Ticket622'); + $this->assertEquals($this->title(), "Verifying Ticket 622"); + + $this->byId($base.'ctl0')->click(); $this->pause(800); - $this->assertAttribute($base.'ALB@style',';'); - $this->assertAttribute('css=span#acb span@style', ';'); - $this->assertAttribute('css=span#arb span@style', ';'); + + $this->assertEquals('', $this->byId($base.'ALB')->attribute('style')); + $this->assertEquals('', $this->byCssSelector('span#acb span')->attribute('style')); + $this->assertEquals('', $this->byCssSelector('span#arb span')->attribute('style')); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php index ec5eceb4..09987387 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket653TestCase extends PradoGenericSeleniumTest +class Ticket653TestCase extends PradoGenericSelenium2Test { function test() { // Open with 'Friendly URL' - $this->open('tickets/index.php/ticket653'); - $this->verifyTitle("Verifying Ticket 653", ""); + $this->url('tickets/index.php/ticket653'); + $this->assertEquals("Verifying Ticket 653", $this->title()); $this->assertText('textspan', 'This is the page for Ticket653'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php index ff167b0e..174b096b 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php @@ -1,24 +1,25 @@ <?php -class Ticket656TestCase extends PradoGenericSeleniumTest +class Ticket656TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket656'); - $this->assertTitle("Verifying Ticket 656"); - + $this->url('tickets/index.php?page=Ticket656'); + $this->assertEquals($this->title(), "Verifying Ticket 656"); + // First test, current date - $this->click($base."btnUpdate"); + $this->byId($base."btnUpdate")->click(); $this->pause(800); $this->assertText($base."lblStatus",date("d-m-Y")); - + // Then, set another date + $year=date('Y')-2; $this->select($base."datePicker_day",20); $this->select($base."datePicker_month", 10); - $this->select($base."datePicker_year", 2008); - $this->click($base."btnUpdate"); + $this->select($base."datePicker_year", $year); + $this->byId($base."btnUpdate")->click(); $this->pause(800); - $this->assertText($base."lblStatus",date("d-m-Y", mktime(0,0,0,10,20,2008))); + $this->assertText($base."lblStatus",date("d-m-Y", mktime(0,0,0,10,20,$year))); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php index 91326e9d..d5d73bc8 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php @@ -1,20 +1,20 @@ <?php -class Ticket659TestCase extends PradoGenericSeleniumTest +class Ticket659TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; // Normal component (working) - $this->open('tickets/index.php?page=ToggleTest'); + $this->url('tickets/index.php?page=ToggleTest'); $this->assertText("${base}lbl", "Down"); - $this->click("${base}btn", ""); + $this->byId("${base}btn")->click(); $this->pause(800); $this->assertText("${base}lbl", "Up"); // Extended component (not working) - $this->open('tickets/index.php?page=Ticket659'); + $this->url('tickets/index.php?page=Ticket659'); $this->assertText("${base}lbl", "Down"); - $this->click("${base}btn", ""); + $this->byId("${base}btn")->click(); $this->pause(800); $this->assertText("${base}lbl", "Up"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php index e0c97e53..86f03442 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php @@ -1,24 +1,24 @@ <?php -class Ticket660TestCase extends PradoGenericSeleniumTest +class Ticket660TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket660'); - $this->assertTitle("Verifying Ticket 660"); - - $this->click($base.'PB'); + $this->url('tickets/index.php?page=Ticket660'); + $this->assertEquals($this->title(), "Verifying Ticket 660"); + + $this->byId($base.'PB')->click(); $this->pause(800); $this->assertText($base.'A','ÄÖÜ äöü'); $this->type($base.'T', 'äää'); - $this->click($base.'PB'); + $this->byId($base.'PB')->click(); $this->pause(800); $this->assertText($base.'A','äääÄÖÜ äöü'); /* // CALLBACK CURRENTLY CAN'T WORK ON NON-UTF8 strings $this->type($base.'T', 'ööö'); - $this->click($base.'CB'); + $this->byId($base.'CB')->click(); $this->pause(800); $this->assertText($base.'A','öööÄÖÜ äöü'); */ diff --git a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php index b6931808..8b5a0166 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php @@ -1,47 +1,47 @@ <?php -class Ticket669TestCase extends PradoGenericSeleniumTest +class Ticket669TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket669'); - $this->assertTitle("Verifying Ticket 669"); - - $this->assertTextPresent('1 - Test without callback'); - $this->assertValue($base.'tb1', 'exact:ActiveTextBox'); - $this->assertValue($base.'tb2', 'exact:TextBox in ActivePanel'); - - $this->click($base.'ctl4'); + $this->url('tickets/index.php?page=Ticket669'); + $this->assertEquals($this->title(), "Verifying Ticket 669"); + + $this->assertContains('1 - Test without callback', $this->source()); + $this->assertValue($base.'tb1', 'ActiveTextBox'); + $this->assertValue($base.'tb2', 'TextBox in ActivePanel'); + + $this->byId($base.'ctl4')->click(); $this->pause(800); - $this->assertValue($base.'tb1', 'exact:ActiveTextBox +1'); - $this->assertValue($base.'tb2', 'exact:TextBox in ActivePanel +1'); - - $this->click($base.'ctl1'); + $this->assertValue($base.'tb1', 'ActiveTextBox +1'); + $this->assertValue($base.'tb2', 'TextBox in ActivePanel +1'); + + $this->byId($base.'ctl1')->click(); $this->pause(800); - $this->assertTextPresent('2 - Test callback with 2nd ActivePanel'); - $this->assertValue($base.'tb3', 'exact:ActiveTextBox'); - $this->assertValue($base.'tb4', 'exact:TextBox in ActivePanel'); - $this->assertValue($base.'tb5', 'exact:TextBox in ActivePanel'); - - $this->click($base.'ctl6'); + $this->assertContains('2 - Test callback with 2nd ActivePanel', $this->source()); + $this->assertValue($base.'tb3', 'ActiveTextBox'); + $this->assertValue($base.'tb4', 'TextBox in ActivePanel'); + $this->assertValue($base.'tb5', 'TextBox in ActivePanel'); + + $this->byId($base.'ctl6')->click(); $this->pause(800); - - $this->assertValue($base.'tb3', 'exact:ActiveTextBox +1'); - $this->assertValue($base.'tb4', 'exact:TextBox in ActivePanel +1'); - $this->assertValue($base.'tb5', 'exact:TextBox in ActivePanel +1'); - - $this->click($base.'ctl2'); + + $this->assertValue($base.'tb3', 'ActiveTextBox +1'); + $this->assertValue($base.'tb4', 'TextBox in ActivePanel +1'); + $this->assertValue($base.'tb5', 'TextBox in ActivePanel +1'); + + $this->byId($base.'ctl2')->click(); $this->pause(800); - $this->assertTextPresent('3 - Test callback without 2nd ActivePanel'); - $this->assertValue($base.'tb6', 'exact:ActiveTextBox'); - $this->assertValue($base.'tb7', 'exact:TextBox in Panel'); - - $this->click($base.'ctl8'); + $this->assertContains('3 - Test callback without 2nd ActivePanel', $this->source()); + $this->assertValue($base.'tb6', 'ActiveTextBox'); + $this->assertValue($base.'tb7', 'TextBox in Panel'); + + $this->byId($base.'ctl8')->click(); $this->pause(800); - - $this->assertValue($base.'tb6', 'exact:ActiveTextBox +1'); - $this->assertValue($base.'tb7', 'exact:TextBox in Panel +1'); - + + $this->assertValue($base.'tb6', 'ActiveTextBox +1'); + $this->assertValue($base.'tb7', 'TextBox in Panel +1'); + } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php index 33e45b49..a88b689c 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php @@ -1,21 +1,21 @@ <?php -class Ticket670TestCase extends PradoGenericSeleniumTest +class Ticket670TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket670'); - $this->assertTitle("Verifying Ticket 670"); - + $this->url('tickets/index.php?page=Ticket670'); + $this->assertEquals($this->title(), "Verifying Ticket 670"); + $this->type($base."datePicker", '07-07-2003'); $this->pause(800); //$this->assertText($base."datePicker",'07-07-2003'); - $this->click($base."datePickerbutton"); + $this->byId($base."datePickerbutton")->click(); $this->pause(800); - $this->click($base."ok"); + $this->byId($base."ok")->click(); $this->pause(800); $this->assertText($base."lbl",'07-07-2007'); - + } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php index 031dc991..4e6409af 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php @@ -1,41 +1,41 @@ <?php -class Ticket671TestCase extends PradoGenericSeleniumTest +class Ticket671TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket671'); - $this->assertTitle("Verifying Ticket 671"); - - $this->verifyNotVisible($base.'ctl0'); + $this->url('tickets/index.php?page=Ticket671'); + $this->assertEquals($this->title(), "Verifying Ticket 671"); + + $this->assertNotVisible($base.'ctl0'); // Click submit - $this->click($base.'ctl1'); + $this->byId($base.'ctl1')->click(); $this->pause(800); - $this->verifyText($base.'ctl0', 'Please Select Test 3'); - $this->verifyVisible($base.'ctl0'); + $this->assertText($base.'ctl0', 'Please Select Test 3'); + $this->assertVisible($base.'ctl0'); $this->select($base.'addl', 'Test 2'); $this->pause(800); - $this->verifyVisible($base.'ctl0'); - $this->verifyText($base."lblResult", "You have selected 'Test 2'. But this is not valid !"); + $this->assertVisible($base.'ctl0'); + $this->assertText($base."lblResult", "You have selected 'Test 2'. But this is not valid !"); $this->select($base.'addl', 'Test 3'); $this->pause(800); - $this->verifyNotVisible($base.'ctl0'); - $this->verifyText($base."lblResult", "You have selected 'Test 3'."); - $this->click($base.'ctl1'); + $this->assertNotVisible($base.'ctl0'); + $this->assertText($base."lblResult", "You have selected 'Test 3'."); + $this->byId($base.'ctl1')->click(); $this->pause(800); - $this->verifyText($base."lblResult", "You have successfully validated the form"); - + $this->assertText($base."lblResult", "You have successfully validated the form"); + $this->type($base.'testTextBox', 'test'); $this->pause(800); - $this->click($base.'ctl3'); + $this->byId($base.'ctl3')->click(); $this->pause(800); - $this->verifyVisible($base.'ctl2'); + $this->assertVisible($base.'ctl2'); $this->type($base.'testTextBox',"Prado"); $this->pause(800); - $this->click($base.'ctl3'); + $this->byId($base.'ctl3')->click(); $this->pause(800); - $this->verifyNotVisible($base.'ctl2'); - $this->verifyText($base.'lblResult2', 'Thanks !'); + $this->assertNotVisible($base.'ctl2'); + $this->assertText($base.'lblResult2', 'Thanks !'); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php b/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php index 7ba24dcc..a3394bca 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php @@ -1,46 +1,46 @@ <?php -class Ticket671_reopenedTestCase extends PradoGenericSeleniumTest +class Ticket671_reopenedTestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket671_reopened'); - $this->assertTitle("Verifying Ticket 671_reopened"); + $this->url('tickets/index.php?page=Ticket671_reopened'); + $this->assertEquals($this->title(), "Verifying Ticket 671_reopened"); // Type wrong value $this->type($base.'testField', 'abcd'); - $this->click($base.'ctl4'); + $this->byId($base.'ctl4')->click(); $this->pause(800); $this->assertVisible($base.'ctl2'); - $this->assertText($base.'Result', 'exact:Check callback called (1) --- Save callback called DATA NOK'); - + $this->assertText($base.'Result', 'Check callback called (1) --- Save callback called DATA NOK'); + // Reclick, should not have any callback - $this->click($base.'ctl4'); + $this->byId($base.'ctl4')->click(); $this->pause(800); $this->assertVisible($base.'ctl2'); - $this->assertText($base.'Result', 'exact:Check callback called (2) --- Save callback called DATA NOK'); - + $this->assertText($base.'Result', 'Check callback called (2) --- Save callback called DATA NOK'); + // Type right value $this->type($base.'testField', 'Test'); - $this->click($base.'ctl4'); + $this->byId($base.'ctl4')->click(); $this->pause(800); $this->assertNotVisible($base.'ctl2'); - $this->assertText($base.'Result', 'exact:Check callback called (3) --- Save callback called DATA OK'); - + $this->assertText($base.'Result', 'Check callback called (3) --- Save callback called DATA OK'); + // Type empty value $this->type($base.'testField', ''); - $this->click($base.'ctl4'); + $this->byId($base.'ctl4')->click(); $this->pause(800); $this->assertVisible($base.'ctl1'); $this->assertNotVisible($base.'ctl2'); - $this->assertText($base.'Result', 'exact:Check callback called (3) --- Save callback called DATA OK'); - + $this->assertText($base.'Result', 'Check callback called (3) --- Save callback called DATA OK'); + // Type right value $this->type($base.'testField', 'Test'); - $this->click($base.'ctl4'); + $this->byId($base.'ctl4')->click(); $this->pause(800); $this->assertNotVisible($base.'ctl1'); $this->assertNotVisible($base.'ctl2'); - $this->assertText($base.'Result', 'exact:Check callback called (4) --- Save callback called DATA OK'); + $this->assertText($base.'Result', 'Check callback called (4) --- Save callback called DATA OK'); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php index 4ee22c20..2891a386 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php @@ -1,35 +1,35 @@ <?php -class Ticket679TestCase extends PradoGenericSeleniumTest +class Ticket679TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket679'); - $this->assertTitle("Verifying Ticket 679"); - + $this->url('tickets/index.php?page=Ticket679'); + $this->assertEquals($this->title(), "Verifying Ticket 679"); + // First part of ticket : Repeater bug - $this->click($base."ctl0"); + $this->byId($base."ctl0")->click(); $this->pause(800); $this->assertText($base."myLabel",'outside'); - $this->verifyVisible($base."myLabel"); - + $this->assertVisible($base."myLabel"); + // Reload completly the page $this->refresh(); $this->pause(800); - $this->click($base."Repeater_ctl0_ctl0"); + $this->byId($base."Repeater_ctl0_ctl0")->click(); $this->pause(800); $this->assertText($base."myLabel",'inside'); - $this->verifyVisible($base."myLabel"); - + $this->assertVisible($base."myLabel"); + // Second part of ticket : ARB bug - $this->verifyNotChecked($base."myRadioButton"); - $this->click($base."ctl1"); + $this->assertFalse($this->byId("{$base}myRadioButton")->selected()); + $this->byId($base."ctl1")->click(); $this->pause(800); - $this->verifyChecked($base."myRadioButton"); - $this->click($base."ctl2"); + $this->assertTrue($this->byId("{$base}myRadioButton")->selected()); + $this->byId($base."ctl2")->click(); $this->pause(800); - $this->verifyNotChecked($base."myRadioButton"); + $this->assertFalse($this->byId("{$base}myRadioButton")->selected()); $this->pause(800); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php index a441f82c..d014f2f4 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php @@ -1,16 +1,16 @@ <?php -class Ticket691TestCase extends PradoGenericSeleniumTest +class Ticket691TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket691'); - $this->assertTitle("Verifying Ticket 691"); - - $this->click($base."List_c2"); + $this->url('tickets/index.php?page=Ticket691'); + $this->assertEquals($this->title(), "Verifying Ticket 691"); + + $this->byXPath("//input[@id='{$base}List_c2']/../..")->click(); $this->pause(800); - $this->assertText($base."Title", "Thanks"); - $this->assertText($base."Result", "You vote 3"); + $this->assertText("{$base}Title", "Thanks"); + $this->assertText("{$base}Result", "You vote 3"); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php index 8f58a320..8aa9cb4e 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php @@ -1,17 +1,17 @@ <?php -class Ticket698TestCase extends PradoGenericSeleniumTest +class Ticket698TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket698'); - $this->assertTitle("Verifying Ticket 698"); - - $this->click($base."switchContentTypeButton"); + $this->url('tickets/index.php?page=Ticket698'); + $this->assertEquals($this->title(), "Verifying Ticket 698"); + + $this->byId($base."switchContentTypeButton")->click(); $this->pause(800); $this->assertVisible($base."EditHtmlTextBox"); $this->pause(800); - $this->click($base."switchContentTypeButton"); + $this->byId($base."switchContentTypeButton")->click(); $this->pause(1000); $this->assertNotVisible($base."EditHtmlTextBox"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php index 0366c2fc..d10529ce 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php @@ -1,71 +1,71 @@ <?php -class Ticket700TestCase extends PradoGenericSeleniumTest +class Ticket700TestCase extends PradoGenericSelenium2Test { function test() { // page: Home - $this->open('tickets/index700.php'); - $this->clickAndWait('ctl0_Logout'); - $this->clickAndWait('pageHome'); - $this->assertTitle("Home"); - $this->assertTextPresent('|Param1: Set at app config|'); - $this->assertTextPresent('|Param2: Set at root|'); - $this->assertTextPresent('|Param3: default 3|'); - $this->assertTextPresent('|Param4: default 4|'); - $this->assertTextPresent('|Param5: Set at root|'); + $this->url('tickets/index700.php'); + $this->byId('ctl0_Logout')->click(); + $this->byId('pageHome')->click(); + $this->assertEquals($this->title(), "Home"); + $this->assertContains('|Param1: Set at app config|', $this->source()); + $this->assertContains('|Param2: Set at root|', $this->source()); + $this->assertContains('|Param3: default 3|', $this->source()); + $this->assertContains('|Param4: default 4|', $this->source()); + $this->assertContains('|Param5: Set at root|', $this->source()); // page: admin.Home - $this->clickAndWait('pageAdminHome'); - $this->assertTitle('UserLogin'); + $this->byId('pageAdminHome')->click(); + $this->assertEquals($this->title(), 'UserLogin'); $this->type('ctl0_Main_Username','AdminUser'); $this->type('ctl0_Main_Password','demo'); - $this->clickAndWait('ctl0_Main_LoginButton'); - $this->clickAndWait('pageAdminHome'); - $this->assertTitle('admin.Home'); - $this->assertTextPresent('|Param1: Set at app config|'); - $this->assertTextPresent('|Param2: Set at admin|'); - $this->assertTextPresent('|Param3: Set at admin|'); - $this->assertTextPresent('|Param4: Set at app config|'); - $this->assertTextPresent('|Param5: Set at app config|'); + $this->byId('ctl0_Main_LoginButton')->click(); + $this->byId('pageAdminHome')->click(); + $this->assertEquals($this->title(), 'admin.Home'); + $this->assertContains('|Param1: Set at app config|', $this->source()); + $this->assertContains('|Param2: Set at admin|', $this->source()); + $this->assertContains('|Param3: Set at admin|', $this->source()); + $this->assertContains('|Param4: Set at app config|', $this->source()); + $this->assertContains('|Param5: Set at app config|', $this->source()); // page: admin.Home2 - $this->clickAndWait('pageAdminHome2'); - $this->assertTitle('admin.Home2'); - $this->clickAndWait('ctl0_Logout'); - $this->clickAndWait('pageAdminHome2'); - $this->assertTitle('admin.Home2'); + $this->byId('pageAdminHome2')->click(); + $this->assertEquals($this->title(), 'admin.Home2'); + $this->byId('ctl0_Logout')->click(); + $this->byId('pageAdminHome2')->click(); + $this->assertEquals($this->title(), 'admin.Home2'); // page: admin.users.Home - $this->clickAndWait('pageAdminUsersHome'); - $this->assertTitle('UserLogin'); + $this->byId('pageAdminUsersHome')->click(); + $this->assertEquals($this->title(), 'UserLogin'); $this->type('ctl0_Main_Username','NormalUser'); $this->type('ctl0_Main_Password','demo'); - $this->clickAndWait('ctl0_Main_LoginButton'); - $this->clickAndWait('pageAdminUsersHome'); - $this->assertTitle('UserLogin'); + $this->byId('ctl0_Main_LoginButton')->click(); + $this->byId('pageAdminUsersHome')->click(); + $this->assertEquals($this->title(), 'UserLogin'); $this->type('ctl0_Main_Username','AdminUser'); $this->type('ctl0_Main_Password','demo'); - $this->clickAndWait('ctl0_Main_LoginButton'); - $this->clickAndWait('pageAdminUsersHome'); - $this->assertTitle('admin.users.Home'); - $this->assertTextPresent('|Param1: Set at admin|'); - $this->assertTextPresent('|Param2: Set at admin.users|'); - $this->assertTextPresent('|Param3: default 3|'); - $this->assertTextPresent('|Param4: Set at admin|'); - $this->assertTextPresent('|Param5: Set at app config|'); + $this->byId('ctl0_Main_LoginButton')->click(); + $this->byId('pageAdminUsersHome')->click(); + $this->assertEquals($this->title(), 'admin.users.Home'); + $this->assertContains('|Param1: Set at admin|', $this->source()); + $this->assertContains('|Param2: Set at admin.users|', $this->source()); + $this->assertContains('|Param3: default 3|', $this->source()); + $this->assertContains('|Param4: Set at admin|', $this->source()); + $this->assertContains('|Param5: Set at app config|', $this->source()); // page: admin.users.Home2 - $this->clickAndWait('pageAdminUsersHome2'); - $this->assertTitle('admin.users.Home2'); + $this->byId('pageAdminUsersHome2')->click(); + $this->assertEquals($this->title(), 'admin.users.Home2'); // page: content.Home - $this->clickAndWait('pageContentHome'); - $this->assertTitle('content.Home'); - $this->assertTextPresent('|Param1: Set at app config|'); - $this->assertTextPresent('|Param2: Set at root|'); - $this->assertTextPresent('|Param3: default 3|'); - $this->assertTextPresent('|Param4: default 4|'); - $this->assertTextPresent('|Param5: Set at app config|'); - $this->clickAndWait('ctl0_Logout'); + $this->byId('pageContentHome')->click(); + $this->assertEquals($this->title(), 'content.Home'); + $this->assertContains('|Param1: Set at app config|', $this->source()); + $this->assertContains('|Param2: Set at root|', $this->source()); + $this->assertContains('|Param3: default 3|', $this->source()); + $this->assertContains('|Param4: default 4|', $this->source()); + $this->assertContains('|Param5: Set at app config|', $this->source()); + $this->byId('ctl0_Logout')->click(); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php index dedb491f..46c240b1 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php @@ -1,25 +1,26 @@ <?php -class Ticket703TestCase extends PradoGenericSeleniumTest +class Ticket703TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket703.Ticket703'); - $this->assertTitle("Verifying Ticket703.Ticket703 703.703"); + $this->url('tickets/index.php?page=Ticket703.Ticket703'); + $this->assertEquals($this->title(), "Verifying Ticket703.Ticket703 703.703"); // Start with an empty log - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); // Wait for callback to be lanched $this->pause(1000); $this->assertText($base.'logBox', ""); $this->type($base.'logMessage', "Test of prado logging system"); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->pause(800); - $this->click($base.'ctl1'); - $this->assertTextPresent($base.'logBox', "Test of prado logging system"); + $this->byId($base.'ctl1')->click(); + $this->pause(1000); + $this->assertContains("Test of prado logging system", $this->byId($base.'logBox')->value()); // Clean log for next run - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); // Wait for callback to be lanched $this->pause(1000); $this->assertText($base.'logBox', ""); diff --git a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php index 87509b29..ab8780f6 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php @@ -1,25 +1,25 @@ <?php -class Ticket708TestCase extends PradoGenericSeleniumTest +class Ticket708TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket708'); - $this->assertTitle("Verifying Ticket 708"); - - $this->click($base."grid_ctl1_RadioButton"); + $this->url('tickets/index.php?page=Ticket708'); + $this->assertEquals($this->title(), "Verifying Ticket 708"); + + $this->byId($base."grid_ctl1_RadioButton")->click(); $this->pause(800); $this->assertText($base."Result", "You have selected Radio Button #1"); - - $this->click($base."grid_ctl2_RadioButton"); + + $this->byId($base."grid_ctl2_RadioButton")->click(); $this->pause(800); $this->assertText($base."Result", "You have selected Radio Button #2"); - - $this->click($base."grid_ctl3_RadioButton"); + + $this->byId($base."grid_ctl3_RadioButton")->click(); $this->pause(800); $this->assertText($base."Result", "You have selected Radio Button #3"); - - $this->click($base."grid_ctl4_RadioButton"); + + $this->byId($base."grid_ctl4_RadioButton")->click(); $this->pause(800); $this->assertText($base."Result", "You have selected Radio Button #4"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php index c71cb0a8..46346ca1 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php @@ -1,42 +1,45 @@ <?php -class Ticket719TestCase extends PradoGenericSeleniumTest +class Ticket719TestCase extends PradoGenericSelenium2Test { function test() { - $this->open("tickets/index.php?page=Ticket719"); - $this->verifyTextPresent("Verifying Ticket 719"); + $this->url("tickets/index.php?page=Ticket719"); + $this->assertContains("Verifying Ticket 719", $this->source()); $base="ctl0_Content_"; - $this->click("${base}ctl2"); + $this->byId("${base}ctl2")->click(); $this->pause(800); $this->assertVisible("${base}ctl0", 'Required'); $this->assertVisible("${base}ctl1", 'Required'); - $this->type("${base}autocomplete", 'f'); - $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})"); + $this->byId("${base}autocomplete")->click(); + + $this->keys('f'); $this->pause(500); - $this->verifyTextPresent('Finland'); + $this->assertContains('Finland', $this->source()); - $this->type("${base}autocomplete", 'fr'); - $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})"); + $this->keys('r'); $this->pause(500); - $this->verifyTextPresent('French'); + $this->assertContains('French', $this->source()); - $this->type("${base}autocomplete", 'fra'); - $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})"); + $this->keys('a'); $this->pause(500); - $this->verifyTextPresent('France'); + $this->assertContains('France', $this->source()); - $this->click("css=#${base}autocomplete_result ul li"); + $this->byCssSelector("#${base}autocomplete_result ul li")->click(); $this->pause(800); $this->assertNotVisible("${base}ctl1"); - $this->type("${base}textbox", "Prado"); + $this->byId("${base}textbox")->clear(); + $this->byId("${base}textbox")->value('Prado'); + // trigger onblur() event + $this->byCssSelector('body')->click(); + $this->assertNotVisible("${base}ctl0"); - $this->click("${base}ctl2"); + $this->byId("${base}ctl2")->click(); $this->pause(800); $this->assertText("${base}Result", "TextBox Content : Prado -- Autocomplete Content :France"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php index 90711162..dfa93089 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php @@ -1,28 +1,32 @@ <?php -class Ticket722TestCase extends PradoGenericSeleniumTest +class Ticket722TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket722'); - $this->assertTitle("Verifying Ticket 722"); - - $this->assertText($base.'InPlaceTextBox__label', 'Editable Text'); - $this->click($base.'InPlaceTextBox__label'); + $this->url('tickets/index.php?page=Ticket722'); + $this->assertEquals($this->title(), "Verifying Ticket 722"); + + $label = $this->byID("{$base}InPlaceTextBox__label"); + $this->assertEquals('Editable Text', $label->text()); + $label->click(); $this->pause(800); - $this->assertVisible($base.'InPlaceTextBox'); + + $textbox = $this->byID("{$base}InPlaceTextBox"); + $this->assertTrue($textbox->displayed()); + $this->type($base.'InPlaceTextBox',"Prado"); - $this->fireEvent($base.'InPlaceTextBox', 'blur'); // Release textbox $this->pause(800); - $this->assertNotVisible($base.'InPlaceTextBox'); - $this->assertText($base.'InPlaceTextBox__label', 'Prado'); - $this->click($base.'ctl0'); + $this->assertFalse($textbox->displayed()); + $this->assertEquals('Prado', $label->text()); + + $this->byId("{$base}ctl0")->click(); $this->pause(800); - $this->assertText($base.'InPlaceTextBox__label', 'exact:Prado [Read Only]'); - $this->click($base.'InPlaceTextBox__label'); + $this->assertEquals('Prado [Read Only]', $label->text()); + + $label->click(); $this->pause(800); - $this->assertNotVisible($base.'InPlaceTextBox'); - + $this->assertFalse($textbox->displayed()); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php index 111b7583..91fc9420 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php @@ -1,14 +1,14 @@ <?php -class Ticket72TestCase extends PradoGenericSeleniumTest +class Ticket72TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket72'); + $this->url('tickets/index.php?page=Ticket72'); $this->type("ctl0\$Content\$K1", "abc"); $this->type("ctl0\$Content\$K2", "efg"); - $this->clickAndWait("//input[@type='submit' and @value='Send']", ""); - $this->verifyTextPresent("efg", ""); - $this->verifyTextNotPresent("abcefg", ""); + $this->byXPath("//input[@type='submit' and @value='Send']")->click(); + $this->assertContains("efg", $this->source()); + $this->assertNotContains("abcefg", $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php index f822e37f..690df8a1 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php @@ -1,17 +1,16 @@ <?php -class Ticket745TestCase extends PradoGenericSeleniumTest +class Ticket745TestCase extends PradoGenericSelenium2Test { function test() { $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket745'); - $this->assertTitle("Verifying Ticket 745"); - + $this->url('tickets/index.php?page=Ticket745'); + $this->assertEquals($this->title(), "Verifying Ticket 745"); + $this->select($base.'Wizard1_DropDownList1', 'Green'); - $this->click($base.'Wizard1_ctl4_ctl1'); + $this->byId($base.'Wizard1_ctl4_ctl1')->click(); $this->pause(800); - $this->assertTextPresent ('Step 3 of 3'); - + $this->assertContains('Step 3 of 3', $this->source()); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php index 468342a5..6968a1d5 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php @@ -1,36 +1,35 @@ <?php -class Ticket769TestCase extends PradoGenericSeleniumTest +class Ticket769TestCase extends PradoGenericSelenium2Test { function test() { $base="ctl0_Content_"; - $this->open('tickets/index.php?page=Ticket769'); - $this->assertTitle("Verifying Ticket 769"); + $this->url('tickets/index.php?page=Ticket769'); + $this->assertEquals($this->title(), "Verifying Ticket 769"); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->assertVisible($base.'ctl1'); $this->type($base.'T1', 'Prado'); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->pause(800); $this->assertNotVisible($base.'ctl1'); - $this->verifyTextPresent($base.'ctl0', 'T1 clicked' ); + $this->assertValue($base.'ctl0', 'T1 clicked' ); - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); $this->pause(800); - $this->verifyTextPresent($base.'B', 'This is B'); - $this->click($base.'ctl3'); + $this->assertText($base.'B', 'This is B'); + $this->byId($base.'ctl3')->click(); $this->pause(800); $this->type($base.'T1', ''); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->assertVisible($base.'ctl1'); $this->type($base.'T1', 'Prado'); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->pause(800); $this->assertNotVisible($base.'ctl1'); - $this->verifyTextPresent($base.'ctl0', 'T1 clicked clicked' ); - + $this->assertValue($base.'ctl0', 'T1 clicked clicked' ); } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php index 229a68eb..c20f29a3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php @@ -1,33 +1,33 @@ <?php -class Ticket785TestCase extends PradoGenericSeleniumTest +class Ticket785TestCase extends PradoGenericSelenium2Test { function test() { $year=date('Y')-1; $base = 'ctl0_Content_'; - $this->open('tickets/index.php?page=Ticket785'); - $this->assertTitle("Verifying Ticket 785"); - + $this->url('tickets/index.php?page=Ticket785'); + $this->assertEquals($this->title(), "Verifying Ticket 785"); + $this->assertText('selDate', ''); $this->select($base."datePicker_year", $year); $this->pause(800); $expectedDate=date("d-m").'-'.$year; $this->assertText('selDate', $expectedDate); - - $this->click($base."datePickerbutton"); + + $this->byId($base."datePickerbutton")->click(); $this->pause(800); - $this->click("css=input.todayButton"); + $this->byCssSelector("input.todayButton")->click(); $this->pause(800); - $this->clickAt("css=body","0,0"); // Hide calendar + $this->byCssSelector("body")->click(); // Hide calendar $expectedDate=date("d-m-Y"); $this->assertText('selDate', $expectedDate); - + $this->assertText('selDate2', ''); $this->type($base.'datePicker2', '12/05/2006'); $this->pause(800); - $this->clickAt("css=body","0,0"); - $this->assertText('selDate2', '12/05/2006'); - + $this->byCssSelector("body")->click(); + $this->assertText('selDate2', '12/05/2006'); + } }
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php index 11e363ba..163eb541 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php @@ -1,12 +1,12 @@ <?php -class Ticket823TestCase extends PradoGenericSeleniumTest { +class Ticket823TestCase extends PradoGenericSelenium2Test { public function test() { - $this->open('tickets/index.php?page=Ticket823'); - $this->assertTitle("Verifying Ticket 823"); + $this->url('tickets/index.php?page=Ticket823'); + $this->assertEquals($this->title(), "Verifying Ticket 823"); $base = 'ctl0_Content_'; - $this->assertElementPresent('xpath=//option[@value="Choose..."]'); + $this->assertElementPresent('//option[@value="Choose..."]'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php index bbe185ad..9a44a5ec 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php @@ -1,34 +1,34 @@ <?php -class Ticket828TestCase extends PradoGenericSeleniumTest +class Ticket828TestCase extends PradoGenericSelenium2Test { function test() { $base = "ctl0_Content_"; - $this->open("tickets/index.php?page=Ticket828"); - $this->click("{$base}submit1"); + $this->url("tickets/index.php?page=Ticket828"); + $this->byId("{$base}submit1")->click(); $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->byId("{$base}list1_c0")->click(); + $this->addSelection("{$base}list2", "One"); + $this->addSelection("{$base}list2", "Two"); + $this->byId("{$base}list3_c3")->click(); + $this->byId("{$base}submit1")->click(); $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->byId("{$base}list1_c1")->click(); + $this->byId("{$base}list1_c2")->click(); + $this->byId("{$base}list1_c3")->click(); + $this->addSelection("{$base}list2", "Two"); + $this->byId("{$base}list1_c3")->click(); + $this->byId("{$base}submit1")->click(); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); $this->assertNotVisible("{$base}validator3"); - $this->click("{$base}list3_c3"); - $this->clickAndWait("{$base}submit1"); + $this->byId("{$base}list3_c3")->click(); + $this->byId("{$base}submit1")->click(); $this->pause(200); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php index fef9ac31..e354b126 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php @@ -1,15 +1,15 @@ <?php -class Ticket849TestCase extends PradoGenericSeleniumTest +class Ticket849TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket849'); - $this->assertTitle("Verifying Ticket 849"); + $this->url('tickets/index.php?page=Ticket849'); + $this->assertEquals($this->title(), "Verifying Ticket 849"); $base='ctl0_Content_'; - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->pause(800); - $this->click('css=td.date.today.selected'); + $this->byCssSelector('td.date.today.selected')->click(); $this->pause(1000); $this->assertValue($base.'ctl0', date('m-d-Y')); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php index 8006dd09..361235fc 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php @@ -1,22 +1,22 @@ <?php -class Ticket876TestCase extends PradoGenericSeleniumTest { +class Ticket876TestCase extends PradoGenericSelenium2Test { public function test() { - $this->open('tickets/index.php?page=Ticket876'); - $this->assertTitle("Verifying Ticket 876"); + $this->url('tickets/index.php?page=Ticket876'); + $this->assertEquals($this->title(), "Verifying Ticket 876"); $base = 'ctl0_Content_'; - - $this->assertElementPresent('xpath=//link[@rel="stylesheet"]'); - $this->clickAndWait($base.'Button'); - $this->assertElementNotPresent('xpath=//link[@rel="stylesheet"]'); - + + $this->assertElementPresent('//link[@rel="stylesheet"]'); + $this->byId($base.'Button')->click(); + $this->assertElementNotPresent('//link[@rel="stylesheet"]'); + /*$this->select($base.'Date_month', 10); $this->select($base.'Date_day', 22); - - $this->clickAndWait($base.'SendButton'); - $this->assertTextPresent('2008-10-22');*/ + + $this->byId($base.'SendButton')->click(); + $this->assertContains('2008-10-22', $this->source());*/ } - + } diff --git a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php index 99990ebf..7f9c23f3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php @@ -1,14 +1,14 @@ <?php -class Ticket886TestCase extends PradoGenericSeleniumTest +class Ticket886TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket886'); - $this->assertTitle("Verifying Ticket 886"); + $this->url('tickets/index.php?page=Ticket886'); + $this->assertEquals($this->title(), "Verifying Ticket 886"); $base = 'ctl0_Content_'; - $this->clickAndWait($base.'SendButton'); - $this->assertTextPresent(date('Y').'-01-01'); + $this->byId($base.'SendButton')->click(); + $this->assertContains(date('Y').'-01-01', $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php index 67d1f1f2..e3bac037 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php @@ -1,18 +1,18 @@ <?php -class Ticket897TestCase extends PradoGenericSeleniumTest +class Ticket897TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket897'); - $this->assertTitle("Verifying Ticket 897"); + $this->url('tickets/index.php?page=Ticket897'); + $this->assertEquals($this->title(), "Verifying Ticket 897"); $base = 'ctl0_Content_'; - + $this->select($base.'Date_month', 10); $this->select($base.'Date_day', 22); - - $this->clickAndWait($base.'SendButton'); - $this->assertTextPresent(date('Y').'-10-22'); + + $this->byId($base.'SendButton')->click(); + $this->assertContains(date('Y').'-10-22', $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php index 3ec69873..fc0bcc01 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php @@ -1,17 +1,17 @@ <?php -class Ticket900TestCase extends PradoGenericSeleniumTest +class Ticket900TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket900'); - $this->assertTitle("Verifying Ticket 900"); + $this->url('tickets/index.php?page=Ticket900'); + $this->assertEquals($this->title(), "Verifying Ticket 900"); $base = 'ctl0_Content_'; - - $this->clickAndWait('ctl0$Content$DataGrid$ctl1$ctl3'); + + $this->byName('ctl0$Content$DataGrid$ctl1$ctl3')->click(); $this->type($base.'DataGrid_ctl1_TextBox', ''); - $this->click($base.'DataGrid_ctl1_ctl3'); - $this->clickAndWait('ctl0$Content$DataGrid$ctl1$ctl4'); + $this->byId($base.'DataGrid_ctl1_ctl3')->click(); + $this->byName('ctl0$Content$DataGrid$ctl1$ctl4')->click(); $this->assertText($base.'CommandName', 'cancel'); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php index 208bd1d0..f03f980e 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php @@ -1,15 +1,15 @@ <?php -class Ticket922TestCase extends PradoGenericSeleniumTest +class Ticket922TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket922'); - $this->assertTitle("Verifying Ticket 922"); + $this->url('tickets/index.php?page=Ticket922'); + $this->assertEquals($this->title(), "Verifying Ticket 922"); $base = 'ctl0_Content_'; - + $this->type($base.'Text', 'two words'); - $this->clickAndWait('ctl0$Content$ctl0'); + $this->byName('ctl0$Content$ctl0')->click(); $this->assertText($base.'Result','two words'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php index a56925a8..538860d4 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php @@ -4,12 +4,12 @@ * */ -class Ticket93TestCase extends PradoGenericSeleniumTest +class Ticket93TestCase extends PradoGenericSelenium2Test { function test() { - $this->open('tickets/index.php?page=Ticket93'); - $this->verifyTextPresent("ValidationGroups without any inputs with grouping"); + $this->url('tickets/index.php?page=Ticket93'); + $this->assertContains("ValidationGroups without any inputs with grouping", $this->source()); } - + } |