summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
committerctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
commit74b31be9515eddfa63005d6760614badfaba9fea (patch)
tree47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
parent2b11341614ac4a15be697fa8acad07055154ac54 (diff)
parent0c5026b55cde5c104f10686afd8b441568175d38 (diff)
Merge pull request #530 from pradosoft/prado-3.2.43.2.4prado-3.2
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests/tickets/tests/Ticket700TestCase.php')
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket700TestCase.php96
1 files changed, 48 insertions, 48 deletions
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