summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
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/quickstart/Controls/PagerTestCase.php
parent1feb1e95660fdfeb5b6d9e12c6fe085aa2bec5ad (diff)
Fix tests
work around stale references by explicitly waiting
Diffstat (limited to 'tests/FunctionalTests/quickstart/Controls/PagerTestCase.php')
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/PagerTestCase.php62
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
index 7e4a6627..c8daeff5 100755
--- a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
@@ -7,50 +7,50 @@ class QuickstartPagerTestCase extends PradoGenericSelenium2Test
$this->url("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&amp;notheme=true&amp;lang=en");
// verify datalist content
- $this->assertContains('ITN001', $this->source());
- $this->assertContains('ITN002', $this->source());
- $this->assertNotContains('ITN003', $this->source());
+ $this->assertSourceContains('ITN001');
+ $this->assertSourceContains('ITN002');
+ $this->assertSourceNotContains('ITN003');
// verify numeric paging
$this->byId("ctl0_body_Pager_ctl1")->click(); // 2nd page
- $this->assertContains('ITN003', $this->source());
- $this->assertContains('ITN004', $this->source());
- $this->assertNotContains('ITN002', $this->source());
- $this->assertNotContains('ITN005', $this->source());
+ $this->assertSourceContains('ITN003');
+ $this->assertSourceContains('ITN004');
+ $this->assertSourceNotContains('ITN002');
+ $this->assertSourceNotContains('ITN005');
$this->byId("ctl0_body_Pager_ctl3")->click(); // 4rd page
- $this->assertContains('ITN007', $this->source());
- $this->assertContains('ITN008', $this->source());
- $this->assertNotContains('ITN006', $this->source());
- $this->assertNotContains('ITN009', $this->source());
+ $this->assertSourceContains('ITN007');
+ $this->assertSourceContains('ITN008');
+ $this->assertSourceNotContains('ITN006');
+ $this->assertSourceNotContains('ITN009');
$this->byId("ctl0_body_Pager_ctl6")->click(); // last page
- $this->assertContains('ITN019', $this->source());
- $this->assertNotContains('ITN018', $this->source());
- $this->assertNotContains('ITN001', $this->source());
+ $this->assertSourceContains('ITN019');
+ $this->assertSourceNotContains('ITN018');
+ $this->assertSourceNotContains('ITN001');
// verify next-prev paging
$this->byId("ctl0_body_Pager2_ctl1")->click(); // prev page
- $this->assertContains('ITN017', $this->source());
- $this->assertContains('ITN018', $this->source());
- $this->assertNotContains('ITN019', $this->source());
- $this->assertNotContains('ITN016', $this->source());
+ $this->assertSourceContains('ITN017');
+ $this->assertSourceContains('ITN018');
+ $this->assertSourceNotContains('ITN019');
+ $this->assertSourceNotContains('ITN016');
$this->byId("ctl0_body_Pager2_ctl0")->click(); // first page
- $this->assertContains('ITN001', $this->source());
- $this->assertContains('ITN002', $this->source());
- $this->assertNotContains('ITN003', $this->source());
+ $this->assertSourceContains('ITN001');
+ $this->assertSourceContains('ITN002');
+ $this->assertSourceNotContains('ITN003');
$this->byId("ctl0_body_Pager2_ctl2")->click(); // next page
- $this->assertContains('ITN003', $this->source());
- $this->assertContains('ITN004', $this->source());
- $this->assertNotContains('ITN002', $this->source());
- $this->assertNotContains('ITN005', $this->source());
+ $this->assertSourceContains('ITN003');
+ $this->assertSourceContains('ITN004');
+ $this->assertSourceNotContains('ITN002');
+ $this->assertSourceNotContains('ITN005');
$this->assertSelected("ctl0_body_Pager3_ctl0","2");
$this->selectAndWait("ctl0_body_Pager3_ctl0", "5");
- $this->assertContains('ITN009', $this->source());
- $this->assertContains('ITN010', $this->source());
- $this->assertNotContains('ITN008', $this->source());
- $this->assertNotContains('ITN011', $this->source());
+ $this->assertSourceContains('ITN009');
+ $this->assertSourceContains('ITN010');
+ $this->assertSourceNotContains('ITN008');
+ $this->assertSourceNotContains('ITN011');
$this->selectAndWait("ctl0_body_Pager3_ctl0", "10");
- $this->assertContains('ITN019', $this->source());
- $this->assertNotContains('ITN018', $this->source());
+ $this->assertSourceContains('ITN019');
+ $this->assertSourceNotContains('ITN018');
}
}