summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets
diff options
context:
space:
mode:
authorDavid <ottodavid@gmx.net>2015-08-06 18:12:45 +0200
committerDavid <ottodavid@gmx.net>2015-08-06 18:14:04 +0200
commitbdfd9f07f17de1751a7e4d94940acb426af4be77 (patch)
tree093d0e40504e0ece761733780934e0d6f09888fe /tests/FunctionalTests/tickets
parent1feb1e95660fdfeb5b6d9e12c6fe085aa2bec5ad (diff)
Fix tests
work around stale references by explicitly waiting
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Issue120TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Issue216TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket121TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket191TestCase.php1
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket205TestCase.php4
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket21TestCase.php4
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket220TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket225TestCase.php4
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket239TestCase.php60
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket284TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket285TestCase.php4
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket28TestCase.php4
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket477TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket488TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket54TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket586TestCase.php1
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket669TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket700TestCase.php71
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket719TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket72TestCase.php4
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket745TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket876TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket886TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket897TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket900TestCase.php3
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket922TestCase.php1
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket93TestCase.php2
27 files changed, 109 insertions, 92 deletions
diff --git a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php
index 0c6945ba..90076347 100755
--- a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php
@@ -5,7 +5,7 @@ class Issue120TestCase extends PradoGenericSelenium2Test
function test()
{
$this->url('tickets/index.php?page=Issue120');
- $this->assertContains('TActiveDropDownList PromptValue Test', $this->source());
+ $this->assertSourceContains('TActiveDropDownList PromptValue Test');
$this->assertSelectedIndex("ctl0_Content_ddl1", 0);
$this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue');
diff --git a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php
index d71db0e1..819f38aa 100755
--- a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php
@@ -5,7 +5,7 @@ class Issue216TestCase extends PradoGenericSelenium2Test
function test()
{
$this->url('tickets/index.php?page=Issue216');
- $this->assertContains('TTabPanel doesn\'t preserve active tab on callback request', $this->source());
+ $this->assertSourceContains('TTabPanel doesn\'t preserve active tab on callback request');
$this->assertVisible('ctl0_Content_tab1');
diff --git a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
index 547ffb38..58bb6784 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
@@ -12,6 +12,6 @@ class Ticket121TestCase extends PradoGenericSelenium2Test
$this->type("ctl0\$Content\$FooTextBox", "content");
$this->byXPath("//input[@type='image' and @id='ctl0_Content_ctl0']")->click();
$this->assertNotVisible('ctl0_Content_ctl1');
- $this->assertContains("clicked at", $this->source());
+ $this->assertSourceContains("clicked at");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php
index c0bccaa9..77f70262 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php
@@ -7,6 +7,7 @@ class Ticket191TestCase extends PradoGenericSelenium2Test
$this->url('tickets/index.php?page=Ticket191');
$this->type("ctl0\$Content\$TextBox2", "test");
$this->byName("ctl0\$Content\$ctl0")->click();
+ $this->pause(50);
$this->type("ctl0\$Content\$TextBox", "test");
$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 35274e6f..0c3b93b0 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
@@ -13,6 +13,7 @@ class Ticket205TestCase extends PradoGenericSelenium2Test
$this->type("{$base}textbox1", "test");
$this->byId("{$base}button1")->click();
+ $this->pause(50);
$this->assertEquals("error", $this->alertText());
$this->acceptAlert();
@@ -23,7 +24,6 @@ class Ticket205TestCase extends PradoGenericSelenium2Test
$this->typeSpecial("{$base}textbox1", "Prado");
$this->byId("{$base}button1")->click();
- $validator=$this->byId("{$base}validator1");
- $this->assertFalse($validator->displayed());
+ $this->assertNotVisible("${base}validator1");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php
index b9a0f0c9..08286020 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php
@@ -7,8 +7,8 @@ class Ticket21TestCase extends PradoGenericSelenium2Test
$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->assertSourceContains("Radio button clicks: 1");
$this->byId("ctl0_Content_button1")->click();
- $this->assertContains("Radio button clicks: 1", $this->source());
+ $this->assertSourceContains("Radio button clicks: 1");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
index 3b31b23d..c1b4b5db 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
@@ -6,7 +6,7 @@ class Ticket220TestCase extends PradoGenericSelenium2Test
{
$base="ctl0_Content_";
$this->url('tickets/index.php?page=Ticket220');
- $this->assertContains('ClientScript Test', $this->source());
+ $this->assertSourceContains('ClientScript Test');
$this->assertText("{$base}label1", "Label 1");
$this->byId("button1")->click();
diff --git a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php
index 74ad6505..7cb8ce05 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php
@@ -6,7 +6,7 @@ class Ticket225TestCase extends PradoGenericSelenium2Test
{
$base="ctl0_Content_";
$this->url('tickets/index.php?page=Ticket225');
- $this->assertContains('RadioButton Group Tests', $this->source());
+ $this->assertSourceContains('RadioButton Group Tests');
$this->assertText("{$base}label1", "Label 1");
$this->assertNotVisible("{$base}validator1");
@@ -16,7 +16,7 @@ class Ticket225TestCase extends PradoGenericSelenium2Test
$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");
+ $this->assertText("{$base}label1", 'ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
index e5595a13..1199131d 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->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());
+ $this->assertSourceContains('view1 is activated');
+ $this->assertSourceNotContains('view1 is deactivated');
+ $this->assertSourceNotContains('view2 is activated');
+ $this->assertSourceNotContains('view2 is deactivated');
+ $this->assertSourceNotContains('view3 is activated');
+ $this->assertSourceNotContains('view3 is deactivated');
// goto view2
$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());
+ $this->assertSourceNotContains('view1 is activated');
+ $this->assertSourceContains('view1 is deactivated');
+ $this->assertSourceContains('view2 is activated');
+ $this->assertSourceNotContains('view2 is deactivated');
+ $this->assertSourceNotContains('view3 is activated');
+ $this->assertSourceNotContains('view3 is deactivated');
// goto view3
$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());
+ $this->assertSourceNotContains('view1 is activated');
+ $this->assertSourceNotContains('view1 is deactivated');
+ $this->assertSourceNotContains('view2 is activated');
+ $this->assertSourceContains('view2 is deactivated');
+ $this->assertSourceContains('view3 is activated');
+ $this->assertSourceNotContains('view3 is deactivated');
// goto view2
$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());
+ $this->assertSourceNotContains('view1 is activated');
+ $this->assertSourceNotContains('view1 is deactivated');
+ $this->assertSourceContains('view2 is activated');
+ $this->assertSourceNotContains('view2 is deactivated');
+ $this->assertSourceNotContains('view3 is activated');
+ $this->assertSourceContains('view3 is deactivated');
// goto view1
$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());
+ $this->assertSourceContains('view1 is activated');
+ $this->assertSourceNotContains('view1 is deactivated');
+ $this->assertSourceNotContains('view2 is activated');
+ $this->assertSourceContains('view2 is deactivated');
+ $this->assertSourceNotContains('view3 is activated');
+ $this->assertSourceNotContains('view3 is deactivated');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php
index b4a32c19..c6f1ee4c 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php
@@ -5,7 +5,7 @@ class Ticket284TestCase extends PradoGenericSelenium2Test
function test()
{
$this->url('tickets/index.php?page=Ticket284');
- $this->assertContains('Verifying Ticket 284', $this->source());
+ $this->assertSourceContains('Verifying Ticket 284');
$this->byId('ctl0_Content_ctl1')->click();
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
index 04a451df..9aee012e 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->assertContains('350.00', $this->source());
- $this->assertContains('349.99', $this->source());
+ $this->assertSourceContains('350.00');
+ $this->assertSourceContains('349.99');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php
index 92bf1eb9..8926887c 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->assertContains('Label 1', $this->source());
+ $this->assertSourceContains('Label 1');
$this->byLinkText("Click Me")->click();
- $this->assertContains('Link Button 1 Clicked!', $this->source());
+ $this->assertSourceContains('Link Button 1 Clicked!');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php
index 7f9bc58c..c4486dbc 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php
@@ -11,8 +11,8 @@ class Ticket477TestCase extends PradoGenericSelenium2Test
$this->assertNotVisible("{$base}validator2");
$this->byId("{$base}list1_c1")->click();
- $this->assertVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
+ $this->assertVisible("{$base}validator1");
$this->byId("{$base}list2_c1")->click();
diff --git a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php
index e4b72aaf..191ef21b 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php
@@ -6,7 +6,7 @@ class Ticket488TestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url('active-controls/index.php?page=CustomValidatorByPass');
- $this->assertContains('Custom Login', $this->source());
+ $this->assertSourceContains('Custom Login');
$this->assertNotVisible('loginBox');
$this->byId("showLogin")->click();
$this->assertVisible("loginBox");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php
index cf1433b6..89a2e721 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->assertContains("|A|a|B|b|C|", $this->source());
+ $this->assertSourceContains("|A|a|B|b|C|");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php
index 5fd47f86..2522786b 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php
@@ -10,6 +10,7 @@ class Ticket586TestCase extends PradoGenericSelenium2Test
$this->assertText("{$base}label1", "Status");
$this->byId("{$base}button1")->click();
+ $this->pause(50);
$this->assertText("{$base}label1", "Button 1 Clicked!");
$this->type("{$base}text1", "testing");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php
index 8b5a0166..9657f28d 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php
@@ -7,7 +7,7 @@ class Ticket669TestCase extends PradoGenericSelenium2Test
$this->url('tickets/index.php?page=Ticket669');
$this->assertEquals($this->title(), "Verifying Ticket 669");
- $this->assertContains('1 - Test without callback', $this->source());
+ $this->assertSourceContains('1 - Test without callback');
$this->assertValue($base.'tb1', 'ActiveTextBox');
$this->assertValue($base.'tb2', 'TextBox in ActivePanel');
@@ -18,7 +18,7 @@ class Ticket669TestCase extends PradoGenericSelenium2Test
$this->byId($base.'ctl1')->click();
$this->pause(800);
- $this->assertContains('2 - Test callback with 2nd ActivePanel', $this->source());
+ $this->assertSourceContains('2 - Test callback with 2nd ActivePanel');
$this->assertValue($base.'tb3', 'ActiveTextBox');
$this->assertValue($base.'tb4', 'TextBox in ActivePanel');
$this->assertValue($base.'tb5', 'TextBox in ActivePanel');
@@ -32,7 +32,7 @@ class Ticket669TestCase extends PradoGenericSelenium2Test
$this->byId($base.'ctl2')->click();
$this->pause(800);
- $this->assertContains('3 - Test callback without 2nd ActivePanel', $this->source());
+ $this->assertSourceContains('3 - Test callback without 2nd ActivePanel');
$this->assertValue($base.'tb6', 'ActiveTextBox');
$this->assertValue($base.'tb7', 'TextBox in Panel');
diff --git a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
index d10529ce..ec6d7783 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
@@ -6,66 +6,77 @@ class Ticket700TestCase extends PradoGenericSelenium2Test
// page: Home
$this->url('tickets/index700.php');
$this->byId('ctl0_Logout')->click();
+ $this->pause(50);
$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());
+ $this->assertTitleEquals('Home');
+ $this->assertSourceContains('|Param1: Set at app config|');
+ $this->assertSourceContains('|Param2: Set at root|');
+ $this->assertSourceContains('|Param3: default 3|');
+ $this->assertSourceContains('|Param4: default 4|');
+ $this->assertSourceContains('|Param5: Set at root|');
// page: admin.Home
$this->byId('pageAdminHome')->click();
- $this->assertEquals($this->title(), 'UserLogin');
+ $this->assertTitleEquals('UserLogin');
$this->type('ctl0_Main_Username','AdminUser');
$this->type('ctl0_Main_Password','demo');
$this->byId('ctl0_Main_LoginButton')->click();
+ $this->pause(50);
$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());
+ $this->assertTitleEquals('admin.Home');
+ $this->assertSourceContains('|Param1: Set at app config|');
+ $this->assertSourceContains('|Param2: Set at admin|');
+ $this->assertSourceContains('|Param3: Set at admin|');
+ $this->assertSourceContains('|Param4: Set at app config|');
+ $this->assertSourceContains('|Param5: Set at app config|');
// page: admin.Home2
$this->byId('pageAdminHome2')->click();
- $this->assertEquals($this->title(), 'admin.Home2');
+ $this->assertTitleEquals('admin.Home2');
$this->byId('ctl0_Logout')->click();
+ $this->pause(50);
$this->byId('pageAdminHome2')->click();
- $this->assertEquals($this->title(), 'admin.Home2');
+ $this->assertTitleEquals('admin.Home2');
// page: admin.users.Home
$this->byId('pageAdminUsersHome')->click();
- $this->assertEquals($this->title(), 'UserLogin');
+ $this->assertTitleEquals('UserLogin');
$this->type('ctl0_Main_Username','NormalUser');
$this->type('ctl0_Main_Password','demo');
$this->byId('ctl0_Main_LoginButton')->click();
+ $this->pause(50);
$this->byId('pageAdminUsersHome')->click();
- $this->assertEquals($this->title(), 'UserLogin');
+ $this->assertTitleEquals('UserLogin');
$this->type('ctl0_Main_Username','AdminUser');
$this->type('ctl0_Main_Password','demo');
$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());
+ $this->assertTitleEquals('admin.users.Home');
+ $this->assertSourceContains('|Param1: Set at admin|');
+ $this->assertSourceContains('|Param2: Set at admin.users|');
+ $this->assertSourceContains('|Param3: default 3|');
+ $this->assertSourceContains('|Param4: Set at admin|');
+ $this->assertSourceContains('|Param5: Set at app config|');
// page: admin.users.Home2
$this->byId('pageAdminUsersHome2')->click();
- $this->assertEquals($this->title(), 'admin.users.Home2');
+ $this->assertTitleEquals('admin.users.Home2');
// page: content.Home
$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->assertTitleEquals('content.Home');
+ $this->assertSourceContains('|Param1: Set at app config|');
+ $this->assertSourceContains('|Param2: Set at root|');
+ $this->assertSourceContains('|Param3: default 3|');
+ $this->assertSourceContains('|Param4: default 4|');
+ $this->assertSourceContains('|Param5: Set at app config|');
$this->byId('ctl0_Logout')->click();
}
+
+ public function assertTitleEquals($title)
+ {
+ $this->pause(50);
+ $this->assertEquals($this->title(), $title);
+ }
+
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
index 7c4a1d67..73ecaecc 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
@@ -5,7 +5,7 @@ class Ticket719TestCase extends PradoGenericSelenium2Test
function test()
{
$this->url("tickets/index.php?page=Ticket719");
- $this->assertContains("Verifying Ticket 719", $this->source());
+ $this->assertSourceContains("Verifying Ticket 719");
$base="ctl0_Content_";
@@ -18,15 +18,15 @@ class Ticket719TestCase extends PradoGenericSelenium2Test
$this->keys('f');
$this->pause(500);
- $this->assertContains('Finland', $this->source());
+ $this->assertSourceContains('Finland');
$this->keys('r');
$this->pause(500);
- $this->assertContains('French', $this->source());
+ $this->assertSourceContains('French');
$this->keys('a');
$this->pause(500);
- $this->assertContains('France', $this->source());
+ $this->assertSourceContains('France');
$this->byCssSelector("#${base}autocomplete_result ul li")->click();
$this->pause(800);
diff --git a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php
index 91fc9420..b1c576be 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php
@@ -8,7 +8,7 @@ class Ticket72TestCase extends PradoGenericSelenium2Test
$this->type("ctl0\$Content\$K1", "abc");
$this->type("ctl0\$Content\$K2", "efg");
$this->byXPath("//input[@type='submit' and @value='Send']")->click();
- $this->assertContains("efg", $this->source());
- $this->assertNotContains("abcefg", $this->source());
+ $this->assertSourceContains("efg");
+ $this->assertSourceNotContains("abcefg");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php
index 690df8a1..367ee2fe 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php
@@ -10,7 +10,7 @@ class Ticket745TestCase extends PradoGenericSelenium2Test
$this->select($base.'Wizard1_DropDownList1', 'Green');
$this->byId($base.'Wizard1_ctl4_ctl1')->click();
$this->pause(800);
- $this->assertContains('Step 3 of 3', $this->source());
+ $this->assertSourceContains('Step 3 of 3');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php
index 361235fc..a34dd695 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php
@@ -15,7 +15,7 @@ class Ticket876TestCase extends PradoGenericSelenium2Test {
$this->select($base.'Date_day', 22);
$this->byId($base.'SendButton')->click();
- $this->assertContains('2008-10-22', $this->source());*/
+ $this->assertSourceContains('2008-10-22');*/
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php
index 7f9c23f3..4eaf9c6b 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php
@@ -8,7 +8,7 @@ class Ticket886TestCase extends PradoGenericSelenium2Test
$this->assertEquals($this->title(), "Verifying Ticket 886");
$base = 'ctl0_Content_';
$this->byId($base.'SendButton')->click();
- $this->assertContains(date('Y').'-01-01', $this->source());
+ $this->assertSourceContains(date('Y').'-01-01');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php
index e3bac037..f3a8c14d 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php
@@ -12,7 +12,7 @@ class Ticket897TestCase extends PradoGenericSelenium2Test
$this->select($base.'Date_day', 22);
$this->byId($base.'SendButton')->click();
- $this->assertContains(date('Y').'-10-22', $this->source());
+ $this->assertSourceContains(date('Y').'-10-22');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
index fc0bcc01..53e8e048 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
@@ -9,9 +9,12 @@ class Ticket900TestCase extends PradoGenericSelenium2Test
$base = 'ctl0_Content_';
$this->byName('ctl0$Content$DataGrid$ctl1$ctl3')->click();
+ $this->pause(50);
$this->type($base.'DataGrid_ctl1_TextBox', '');
$this->byId($base.'DataGrid_ctl1_ctl3')->click();
+ $this->pause(50);
$this->byName('ctl0$Content$DataGrid$ctl1$ctl4')->click();
+ $this->pause(50);
$this->assertText($base.'CommandName', 'cancel');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
index f03f980e..ddc01d28 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
@@ -10,6 +10,7 @@ class Ticket922TestCase extends PradoGenericSelenium2Test
$this->type($base.'Text', 'two words');
$this->byName('ctl0$Content$ctl0')->click();
+ $this->pause(50);
$this->assertText($base.'Result','two words');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php
index 538860d4..fa08d396 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->assertContains("ValidationGroups without any inputs with grouping", $this->source());
+ $this->assertSourceContains("ValidationGroups without any inputs with grouping");
}
}