diff options
Diffstat (limited to 'tests/FunctionalTests/tickets')
69 files changed, 317 insertions, 308 deletions
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/tests/Issue120TestCase.php b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php index 8587415e..0c6945ba 100755 --- a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php @@ -5,12 +5,12 @@ class Issue120TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Issue120'); - $this->assertTextPresent('TActiveDropDownList PromptValue Test'); + $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 bb1daa6b..d71db0e1 100755 --- a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php @@ -5,21 +5,21 @@ class Issue216TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Issue216'); - $this->assertTextPresent('TTabPanel doesn\'t preserve active tab on callback request'); + $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 3fea580a..547ffb38 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php @@ -7,11 +7,11 @@ class Ticket121TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket121'); $this->type("ctl0\$Content\$FooTextBox", ""); $this->assertNotVisible('ctl0_Content_ctl1'); - $this->click("//input[@type='image' and @id='ctl0_Content_ctl0']", ""); + $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->byXPath("//input[@type='image' and @id='ctl0_Content_ctl0']")->click(); $this->assertNotVisible('ctl0_Content_ctl1'); - $this->assertTextPresent("clicked at", ""); + $this->assertContains("clicked at", $this->source()); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php index ffd95d86..20d9c645 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php @@ -5,8 +5,8 @@ class Ticket163TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket163'); - $this->assertTextPresent('kr 100,00'); - $this->assertTextPresent('kr 0,00'); - $this->assertTextPresent('-kr 100,00'); + $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 a9c006f9..47bb380b 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php @@ -6,7 +6,7 @@ class Ticket169TestCase extends PradoGenericSelenium2Test { $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 2b2b1a41..c0bccaa9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php @@ -6,9 +6,9 @@ class Ticket191TestCase extends PradoGenericSelenium2Test { $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->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 53761d14..57b0c95b 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php @@ -10,12 +10,15 @@ class Ticket205TestCase extends PradoGenericSelenium2Test $this->assertNotVisible("{$base}validator1"); $this->type("{$base}textbox1", "test"); - $this->click("{$base}button1"); - $this->assertAlert("error"); + $this->byId("{$base}button1")->click(); + + $this->assertEquals("error", $this->alertText()); + $this->acceptAlert(); + $this->assertVisible("{$base}validator1"); $this->type("{$base}textbox1", "Prado"); - $this->clickAndWait("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->assertNotVisible("{$base}validator1"); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php index f7cbe814..cc993192 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php @@ -10,8 +10,11 @@ class Ticket207TestCase extends PradoGenericSelenium2Test $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"); @@ -19,7 +22,7 @@ class Ticket207TestCase extends PradoGenericSelenium2Test $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 PradoGenericSelenium2Test $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 7a245111..b9a0f0c9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php @@ -6,9 +6,9 @@ class Ticket21TestCase extends PradoGenericSelenium2Test { $this->url('tickets/index.php?page=Ticket21'); $this->assertEquals($this->title(), "Verifying Ticket 21"); - $this->clickAndWait("ctl0_Content_button1"); - $this->assertTextPresent("Radio button clicks: 1", ""); - $this->click("ctl0_Content_button1"); - $this->assertTextPresent("Radio button clicks: 1", ""); + $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 2e6da431..3b31b23d 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php @@ -6,10 +6,10 @@ class Ticket220TestCase extends PradoGenericSelenium2Test { $base="ctl0_Content_"; $this->url('tickets/index.php?page=Ticket220'); - $this->assertTextPresent('ClientScript Test'); + $this->assertContains('ClientScript Test', $this->source()); $this->assertText("{$base}label1", "Label 1"); - $this->click("button1"); + $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 d17a9555..74ad6505 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php @@ -6,15 +6,15 @@ class Ticket225TestCase extends PradoGenericSelenium2Test { $base="ctl0_Content_"; $this->url('tickets/index.php?page=Ticket225'); - $this->assertTextPresent('RadioButton Group Tests'); + $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", 'ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3'); $this->assertNotVisible("{$base}validator1"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php index 6f5f0ed9..e5595a13 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php @@ -7,47 +7,47 @@ class Ticket239TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket239'); // view1 - $this->assertTextPresent('view1 is activated',''); - $this->assertTextNotPresent('view1 is deactivated',''); - $this->assertTextNotPresent('view2 is activated',''); - $this->assertTextNotPresent('view2 is deactivated',''); - $this->assertTextNotPresent('view3 is activated',''); - $this->assertTextNotPresent('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->assertTextNotPresent('view1 is activated',''); - $this->assertTextPresent('view1 is deactivated',''); - $this->assertTextPresent('view2 is activated',''); - $this->assertTextNotPresent('view2 is deactivated',''); - $this->assertTextNotPresent('view3 is activated',''); - $this->assertTextNotPresent('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->assertTextNotPresent('view1 is activated',''); - $this->assertTextNotPresent('view1 is deactivated',''); - $this->assertTextNotPresent('view2 is activated',''); - $this->assertTextPresent('view2 is deactivated',''); - $this->assertTextPresent('view3 is activated',''); - $this->assertTextNotPresent('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->assertTextNotPresent('view1 is activated',''); - $this->assertTextNotPresent('view1 is deactivated',''); - $this->assertTextPresent('view2 is activated',''); - $this->assertTextNotPresent('view2 is deactivated',''); - $this->assertTextNotPresent('view3 is activated',''); - $this->assertTextPresent('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->assertTextPresent('view1 is activated',''); - $this->assertTextNotPresent('view1 is deactivated',''); - $this->assertTextNotPresent('view2 is activated',''); - $this->assertTextPresent('view2 is deactivated',''); - $this->assertTextNotPresent('view3 is activated',''); - $this->assertTextNotPresent('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/Ticket274TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php index 6da15a47..ebb60ca9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php @@ -10,12 +10,12 @@ class Ticket274TestCase extends PradoGenericSelenium2Test $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 2b1d4c09..ca11f626 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php @@ -11,18 +11,18 @@ class Ticket278TestCase extends PradoGenericSelenium2Test $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 PradoGenericSelenium2Test $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 a57d83a6..bc478895 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php @@ -5,12 +5,12 @@ class Ticket27TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket27'); - $this->verifyTitle("Verifying Ticket 27", ""); - $this->click("//input[@value='Agree']", ""); - $this->assertVisible("ctl0_Content_validator1", ""); + $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 08c0338c..b4a32c19 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php @@ -5,8 +5,8 @@ class Ticket284TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket284'); - $this->assertTextPresent('Verifying Ticket 284'); - $this->click('ctl0_Content_ctl1'); + $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 76f1c271..04a451df 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php @@ -5,7 +5,7 @@ class Ticket285TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket285'); - $this->assertTextPresent('350.00'); - $this->assertTextPresent('349.99'); + $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 c0364ce6..92bf1eb9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php @@ -6,8 +6,8 @@ class Ticket28TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket28'); - $this->assertTextPresent('Label 1'); - $this->clickAndWait('link=Click Me'); - $this->assertTextPresent('Link Button 1 Clicked!'); + $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 0dc95e87..8116e753 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php @@ -16,7 +16,7 @@ class Ticket290TestCase extends PradoGenericSelenium2Test $this->type("{$base}textbox1", "test"); - $this->click("{$base}textbox1"); + $this->byId("{$base}textbox1")->click(); $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER); $this->pause(800); diff --git a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php index b1f7ed00..aae4ee21 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php @@ -9,7 +9,7 @@ class Ticket433TestCase extends PradoGenericSelenium2Test $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 e7991cd6..f586a6c9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php @@ -7,7 +7,7 @@ class Ticket439TestCase extends PradoGenericSelenium2Test $base = 'ctl0_Content_'; $this->url('tickets/index.php?page=Ticket439'); $this->assertEquals($this->title(), "Verifying Ticket 439"); - $this->click("{$base}button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); $this->assertEquals($this->title(), "Verifying Home"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php index 1901ae50..14f00970 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php @@ -5,7 +5,7 @@ class Ticket463TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket463'); - $this->verifyTitle("Verifying Ticket 463", ""); - $this->assertTextPresent('May 1, 2005 12:00:00 AM'); + $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 6c40927a..a3e25e85 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php @@ -6,26 +6,26 @@ class Ticket470TestCase extends PradoGenericSelenium2Test { $base = 'ctl0_Content_'; $this->url('tickets/index.php?page=Ticket470'); - $this->verifyTitle("Verifying Ticket 470"); + $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 PradoGenericSelenium2Test $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 13f2740a..7f9bc58c 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php @@ -10,12 +10,12 @@ class Ticket477TestCase extends PradoGenericSelenium2Test $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 7940338f..e4b72aaf 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php @@ -6,14 +6,14 @@ class Ticket488TestCase extends PradoGenericSelenium2Test { $base='ctl0_Content_'; $this->url('active-controls/index.php?page=CustomValidatorByPass'); - $this->assertTextPresent('Custom Login'); + $this->assertContains('Custom Login', $this->source()); $this->assertNotVisible('loginBox'); - $this->click("showLogin"); + $this->byId("showLogin")->click(); $this->assertVisible("loginBox"); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); - $this->click("{$base}checkLogin"); + $this->byId("{$base}checkLogin")->click(); $this->pause(800); $this->assertVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); @@ -21,13 +21,13 @@ class Ticket488TestCase extends PradoGenericSelenium2Test $this->type("{$base}Username", 'tea'); $this->type("{$base}Password", 'mmama'); - $this->click("{$base}checkLogin"); + $this->byId("{$base}checkLogin")->click(); $this->pause(800); $this->assertNotVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); $this->type("{$base}Password", 'test'); - $this->click("{$base}checkLogin"); + $this->byId("{$base}checkLogin")->click(); $this->pause(800); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php index 7ffa7428..f3bdd0a9 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php @@ -6,7 +6,7 @@ class Ticket504TestCase extends PradoGenericSelenium2Test { $base = 'ctl0_Content_'; $this->url('tickets/index.php?page=Ticket504'); - $this->verifyTitle("Verifying Ticket 504", ""); + $this->assertEquals("Verifying Ticket 504", $this->title()); $this->assertText("status", ""); @@ -15,7 +15,7 @@ class Ticket504TestCase extends PradoGenericSelenium2Test $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 PradoGenericSelenium2Test $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 PradoGenericSelenium2Test $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 PradoGenericSelenium2Test $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 0b90749b..68c94b03 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php @@ -6,11 +6,11 @@ class Ticket507TestCase extends PradoGenericSelenium2Test { $base='ctl0_Content_'; $this->url('tickets/index.php?page=Ticket507'); - $this->verifyTitle("Verifying Ticket 507", ""); + $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 dfc81a3d..71457b58 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php @@ -9,7 +9,7 @@ class Ticket521TestCase extends PradoGenericSelenium2Test $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 6a7ee693..c8659002 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php @@ -6,11 +6,11 @@ class Ticket526TestCase extends PradoGenericSelenium2Test { $base="ctl0_Content_"; $this->url('tickets/index.php?page=Ticket526'); - $this->verifyTitle("Verifying Ticket 526", ""); + $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/Ticket535TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php index 6634ed93..eebd2336 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php @@ -10,23 +10,23 @@ class Ticket535TestCase extends PradoGenericSelenium2Test $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", '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", '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", '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", 'bad_radio1 checked:{} bad_radio2 checked:{1}'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php index edec5750..2970837f 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php @@ -6,12 +6,12 @@ class Ticket538TestCase extends PradoGenericSelenium2Test { $base="ctl0_Content_"; $this->url('tickets/index.php?page=Ticket538'); - $this->verifyTitle("Verifying Ticket 538", ""); + $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 PradoGenericSelenium2Test $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 86923010..cf1433b6 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php @@ -5,6 +5,6 @@ class Ticket54TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket54'); - $this->assertTextPresent("|A|a|B|b|C|", ""); + $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 1f9461be..cccdbaf3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php @@ -5,7 +5,7 @@ class Ticket573TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket573'); - $this->verifyTitle("Verifying Ticket 573", ""); + $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 ae0c991b..3adb107c 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php @@ -6,16 +6,16 @@ class Ticket578TestCase extends PradoGenericSelenium2Test { $base = 'ctl0_Content_'; $this->url('tickets/index.php?page=Ticket578'); - $this->verifyTitle("Verifying Ticket 578", ""); + $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 :"); $text="helloworld"; $this->runScript("tinyMCE.get('{$base}text1').setContent('{$text}')"); - $this->click("{$base}button1", ""); + $this->byId("{$base}button1")->click(); $this->pause(800); $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 5a9dd8d4..58b42c33 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php @@ -6,18 +6,18 @@ class Ticket585TestCase extends PradoGenericSelenium2Test { $base = 'ctl0_Content_'; $this->url('tickets/index.php?page=Ticket585'); - $this->verifyTitle("Verifying Ticket 585", ""); + $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 50efd50a..5fd47f86 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php @@ -6,10 +6,10 @@ class Ticket586TestCase extends PradoGenericSelenium2Test { $base = 'ctl0_Content_'; $this->url('tickets/index.php?page=Ticket586'); - $this->verifyTitle("Verifying Ticket 586", ""); + $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 b4ddc287..bc2c34bc 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php @@ -36,7 +36,7 @@ class Ticket587TestCase extends PradoGenericSelenium2Test $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 14467952..692e2451 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php @@ -10,33 +10,33 @@ class Ticket592TestCase extends PradoGenericSelenium2Test $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", '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", '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", '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", 'bad_radio1 checked:{} bad_radio2 checked:{1}'); - $this->click("{$base}bad_radio3"); - $this->click("{$base}button3"); + $this->byId("{$base}bad_radio3")->click(); + $this->byId("{$base}button3")->click(); $this->pause(800); $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", 'bad_radio3 checked:{} bad_radio4 checked:{1}'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php index 0781b506..27d57a91 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php @@ -8,30 +8,30 @@ class Ticket595TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket595'); $this->assertEquals($this->title(), "Verifying Ticket 595"); - $this->click($base.'ctl2'); - $this->verifyAttribute($base.'A@class','errorclassA'); + $this->byId($base.'ctl2')->click(); + $this->assertAttribute($base.'A@class','errorclassA'); $this->type($base.'A', 'Prado'); - $this->click($base.'ctl2'); - $this->verifyAttribute($base.'A@class','errorclassA'); + $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->verifyAttribute($base.'A@class',''); + $this->assertAttribute($base.'A@class',''); - $this->click($base.'ctl5'); + $this->byId($base.'ctl5')->click(); $this->pause(800); - $this->verifyAttribute($base.'B@class',' 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->verifyAttribute($base.'B@class',' 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->verifyAttribute($base.'B@class',''); + $this->assertAttribute($base.'B@class',''); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php index e26da1f1..672a1d18 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php @@ -8,10 +8,10 @@ class Ticket622TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket622'); $this->assertEquals($this->title(), "Verifying Ticket 622"); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->pause(800); - $this->verifyAttribute($base.'ALB@style',''); - $this->verifyAttribute('css=span#acb span@style', ''); - $this->verifyAttribute('css=span#arb span@style', ''); + $this->assertAttribute($base.'ALB@style',''); + $this->assertAttribute('css=span#acb span@style', ''); + $this->assertAttribute('css=span#arb span@style', ''); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php index fbf569bb..09987387 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php @@ -6,7 +6,7 @@ class Ticket653TestCase extends PradoGenericSelenium2Test { // Open with 'Friendly URL' $this->url('tickets/index.php/ticket653'); - $this->verifyTitle("Verifying Ticket 653", ""); + $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 af0c8f02..174b096b 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php @@ -8,7 +8,7 @@ class Ticket656TestCase extends PradoGenericSelenium2Test $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")); @@ -17,7 +17,7 @@ class Ticket656TestCase extends PradoGenericSelenium2Test $this->select($base."datePicker_day",20); $this->select($base."datePicker_month", 10); $this->select($base."datePicker_year", $year); - $this->click($base."btnUpdate"); + $this->byId($base."btnUpdate")->click(); $this->pause(800); $this->assertText($base."lblStatus",date("d-m-Y", mktime(0,0,0,10,20,$year))); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php index bb1a021d..d5d73bc8 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php @@ -8,13 +8,13 @@ class Ticket659TestCase extends PradoGenericSelenium2Test // Normal component (working) $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->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 f77e5fac..86f03442 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php @@ -7,18 +7,18 @@ class Ticket660TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket660'); $this->assertEquals($this->title(), "Verifying Ticket 660"); - $this->click($base.'PB'); + $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 6afb1072..8b5a0166 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php @@ -7,36 +7,36 @@ class Ticket669TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket669'); $this->assertEquals($this->title(), "Verifying Ticket 669"); - $this->assertTextPresent('1 - Test without callback'); + $this->assertContains('1 - Test without callback', $this->source()); $this->assertValue($base.'tb1', 'ActiveTextBox'); $this->assertValue($base.'tb2', 'TextBox in ActivePanel'); - $this->click($base.'ctl4'); + $this->byId($base.'ctl4')->click(); $this->pause(800); $this->assertValue($base.'tb1', 'ActiveTextBox +1'); $this->assertValue($base.'tb2', 'TextBox in ActivePanel +1'); - $this->click($base.'ctl1'); + $this->byId($base.'ctl1')->click(); $this->pause(800); - $this->assertTextPresent('2 - Test callback with 2nd ActivePanel'); + $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->click($base.'ctl6'); + $this->byId($base.'ctl6')->click(); $this->pause(800); $this->assertValue($base.'tb3', 'ActiveTextBox +1'); $this->assertValue($base.'tb4', 'TextBox in ActivePanel +1'); $this->assertValue($base.'tb5', 'TextBox in ActivePanel +1'); - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); $this->pause(800); - $this->assertTextPresent('3 - Test callback without 2nd ActivePanel'); + $this->assertContains('3 - Test callback without 2nd ActivePanel', $this->source()); $this->assertValue($base.'tb6', 'ActiveTextBox'); $this->assertValue($base.'tb7', 'TextBox in Panel'); - $this->click($base.'ctl8'); + $this->byId($base.'ctl8')->click(); $this->pause(800); $this->assertValue($base.'tb6', 'ActiveTextBox +1'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php index f0387746..a88b689c 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php @@ -10,9 +10,9 @@ class Ticket670TestCase extends PradoGenericSelenium2Test $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'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php index 53330ca4..4e6409af 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php @@ -9,7 +9,7 @@ class Ticket671TestCase extends PradoGenericSelenium2Test $this->assertNotVisible($base.'ctl0'); // Click submit - $this->click($base.'ctl1'); + $this->byId($base.'ctl1')->click(); $this->pause(800); $this->assertText($base.'ctl0', 'Please Select Test 3'); $this->assertVisible($base.'ctl0'); @@ -21,18 +21,18 @@ class Ticket671TestCase extends PradoGenericSelenium2Test $this->pause(800); $this->assertNotVisible($base.'ctl0'); $this->assertText($base."lblResult", "You have selected 'Test 3'."); - $this->click($base.'ctl1'); + $this->byId($base.'ctl1')->click(); $this->pause(800); $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->assertVisible($base.'ctl2'); $this->type($base.'testTextBox',"Prado"); $this->pause(800); - $this->click($base.'ctl3'); + $this->byId($base.'ctl3')->click(); $this->pause(800); $this->assertNotVisible($base.'ctl2'); $this->assertText($base.'lblResult2', 'Thanks !'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php b/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php index 02201075..a3394bca 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php @@ -9,27 +9,27 @@ class Ticket671_reopenedTestCase extends PradoGenericSelenium2Test $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', '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', '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', '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'); @@ -37,7 +37,7 @@ class Ticket671_reopenedTestCase extends PradoGenericSelenium2Test // 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'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php index af957fa3..2891a386 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php @@ -8,7 +8,7 @@ class Ticket679TestCase extends PradoGenericSelenium2Test $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->assertVisible($base."myLabel"); @@ -17,19 +17,19 @@ class Ticket679TestCase extends PradoGenericSelenium2Test $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->assertVisible($base."myLabel"); // Second part of ticket : ARB bug - $this->assertNotChecked($base."myRadioButton"); - $this->click($base."ctl1"); + $this->assertFalse($this->byId("{$base}myRadioButton")->selected()); + $this->byId($base."ctl1")->click(); $this->pause(800); - $this->assertChecked($base."myRadioButton"); - $this->click($base."ctl2"); + $this->assertTrue($this->byId("{$base}myRadioButton")->selected()); + $this->byId($base."ctl2")->click(); $this->pause(800); - $this->assertNotChecked($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 ae6cd7d3..d014f2f4 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php @@ -7,7 +7,7 @@ class Ticket691TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket691'); $this->assertEquals($this->title(), "Verifying Ticket 691"); - $this->click("//input[@id='{$base}List_c2']/../.."); + $this->byXPath("//input[@id='{$base}List_c2']/../..")->click(); $this->pause(800); $this->assertText("{$base}Title", "Thanks"); $this->assertText("{$base}Result", "You vote 3"); diff --git a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php index 5c8c46aa..8aa9cb4e 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php @@ -7,11 +7,11 @@ class Ticket698TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket698'); $this->assertEquals($this->title(), "Verifying Ticket 698"); - $this->click($base."switchContentTypeButton"); + $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 d14823bf..d10529ce 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php @@ -5,67 +5,67 @@ class Ticket700TestCase extends PradoGenericSelenium2Test { // page: Home $this->url('tickets/index700.php'); - $this->clickAndWait('ctl0_Logout'); - $this->clickAndWait('pageHome'); + $this->byId('ctl0_Logout')->click(); + $this->byId('pageHome')->click(); $this->assertEquals($this->title(), "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->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->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->byId('ctl0_Main_LoginButton')->click(); + $this->byId('pageAdminHome')->click(); $this->assertEquals($this->title(), '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->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->byId('pageAdminHome2')->click(); $this->assertEquals($this->title(), 'admin.Home2'); - $this->clickAndWait('ctl0_Logout'); - $this->clickAndWait('pageAdminHome2'); + $this->byId('ctl0_Logout')->click(); + $this->byId('pageAdminHome2')->click(); $this->assertEquals($this->title(), 'admin.Home2'); // page: admin.users.Home - $this->clickAndWait('pageAdminUsersHome'); + $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->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->byId('ctl0_Main_LoginButton')->click(); + $this->byId('pageAdminUsersHome')->click(); $this->assertEquals($this->title(), '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->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->byId('pageAdminUsersHome2')->click(); $this->assertEquals($this->title(), 'admin.users.Home2'); // page: content.Home - $this->clickAndWait('pageContentHome'); + $this->byId('pageContentHome')->click(); $this->assertEquals($this->title(), '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->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 3b278557..46c240b1 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php @@ -7,19 +7,20 @@ class Ticket703TestCase extends PradoGenericSelenium2Test $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 b10b070a..ab8780f6 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php @@ -7,19 +7,19 @@ class Ticket708TestCase extends PradoGenericSelenium2Test $this->url('tickets/index.php?page=Ticket708'); $this->assertEquals($this->title(), "Verifying Ticket 708"); - $this->click($base."grid_ctl1_RadioButton"); + $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 a984ee43..633820d2 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php @@ -5,11 +5,11 @@ class Ticket719TestCase extends PradoGenericSelenium2Test function test() { $this->url("tickets/index.php?page=Ticket719"); - $this->assertTextPresent("Verifying Ticket 719"); + $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'); @@ -17,26 +17,26 @@ class Ticket719TestCase extends PradoGenericSelenium2Test $this->type("${base}autocomplete", 'f'); $this->runScript("Prado.Registry['${base}autocomplete'].onKeyPress({})"); $this->pause(500); - $this->assertTextPresent('Finland'); + $this->assertContains('Finland', $this->source()); $this->type("${base}autocomplete", 'fr'); $this->runScript("Prado.Registry['${base}autocomplete'].onKeyPress({})"); $this->pause(500); - $this->assertTextPresent('French'); + $this->assertContains('French', $this->source()); $this->type("${base}autocomplete", 'fra'); $this->runScript("Prado.Registry['${base}autocomplete'].onKeyPress({})"); $this->pause(500); - $this->assertTextPresent('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->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 f98214cc..268a3df4 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php @@ -8,17 +8,17 @@ class Ticket722TestCase extends PradoGenericSelenium2Test $this->assertEquals($this->title(), "Verifying Ticket 722"); $this->assertText($base.'InPlaceTextBox__label', 'Editable Text'); - $this->click($base.'InPlaceTextBox__label'); + $this->byId($base.'InPlaceTextBox__label')->click(); $this->pause(800); $this->assertVisible($base.'InPlaceTextBox'); $this->type($base.'InPlaceTextBox',"Prado"); $this->pause(800); $this->assertNotVisible($base.'InPlaceTextBox'); $this->assertText($base.'InPlaceTextBox__label', 'Prado'); - $this->click($base.'ctl0'); + $this->byId($base.'ctl0')->click(); $this->pause(800); $this->assertText($base.'InPlaceTextBox__label', 'Prado [Read Only]'); - $this->click($base.'InPlaceTextBox__label'); + $this->byId($base.'InPlaceTextBox__label')->click(); $this->pause(800); $this->assertNotVisible($base.'InPlaceTextBox'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php index 1a236ffa..91fc9420 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php @@ -7,8 +7,8 @@ class Ticket72TestCase extends PradoGenericSelenium2Test $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->assertTextPresent("efg", ""); - $this->assertTextNotPresent("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 c23aa900..690df8a1 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php @@ -8,10 +8,9 @@ class Ticket745TestCase extends PradoGenericSelenium2Test $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 b335d148..03816667 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php @@ -8,26 +8,26 @@ class Ticket769TestCase extends PradoGenericSelenium2Test $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->assertValue($base.'ctl0', 'T1 clicked' ); - $this->click($base.'ctl2'); + $this->byId($base.'ctl2')->click(); $this->pause(800); $this->assertText($base.'B', 'This is B'); - $this->click($base.'ctl3'); + $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->assertValue($base.'ctl0', 'T1 clicked clicked' ); diff --git a/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php index 7b8e7dd0..c20f29a3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php @@ -14,18 +14,18 @@ class Ticket785TestCase extends PradoGenericSelenium2Test $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->byCssSelector("body")->click(); $this->assertText('selDate2', '12/05/2006'); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php index f4d3676e..9a44a5ec 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php @@ -6,29 +6,29 @@ class Ticket828TestCase extends PradoGenericSelenium2Test { $base = "ctl0_Content_"; $this->url("tickets/index.php?page=Ticket828"); - $this->click("{$base}submit1"); + $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 afd826f5..e354b126 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php @@ -7,9 +7,9 @@ class Ticket849TestCase extends PradoGenericSelenium2Test $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 8d64d60d..29d4d6c6 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php @@ -8,14 +8,14 @@ class Ticket876TestCase extends PradoGenericSelenium2Test { $base = 'ctl0_Content_'; $this->assertElementPresent('xpath=//link[@rel="stylesheet"]'); - $this->clickAndWait($base.'Button'); + $this->byId($base.'Button')->click(); $this->assertElementNotPresent('xpath=//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 820e0170..7f9c23f3 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php @@ -7,8 +7,8 @@ class Ticket886TestCase extends PradoGenericSelenium2Test $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 6c49276f..e3bac037 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php @@ -11,8 +11,8 @@ class Ticket897TestCase extends PradoGenericSelenium2Test $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 a6f823bc..fc0bcc01 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php @@ -8,10 +8,10 @@ class Ticket900TestCase extends PradoGenericSelenium2Test $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 64490f1f..f03f980e 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php @@ -9,7 +9,7 @@ class Ticket922TestCase extends PradoGenericSelenium2Test $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 51d5b582..538860d4 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php @@ -9,7 +9,7 @@ class Ticket93TestCase extends PradoGenericSelenium2Test function test() { $this->url('tickets/index.php?page=Ticket93'); - $this->assertTextPresent("ValidationGroups without any inputs with grouping"); + $this->assertContains("ValidationGroups without any inputs with grouping", $this->source()); } } |