summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.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/ListBoxTestCase.php
parent1feb1e95660fdfeb5b6d9e12c6fe085aa2bec5ad (diff)
Fix tests
work around stale references by explicitly waiting
Diffstat (limited to 'tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php')
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php
index 11910ba5..a61bd5e2 100755
--- a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php
@@ -25,13 +25,13 @@ class QuickstartListBoxTestCase extends PradoGenericSelenium2Test
// an auto postback single selection list box
$this->assertNotContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
$this->selectAndWait("ctl0\$body\$ctl4", "item 3");
- $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
+ $this->assertSourceContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)");
// a single selection list box upon postback
$this->select("ctl0\$body\$ListBox1", "item 4");
$this->assertNotContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source());
$this->byXPath("//input[@type='submit' and @value='Submit']")->click();
- $this->assertContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source());
+ $this->assertSourceContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)");
// a multiple selection list box
$this->assertAttribute("ctl0\$body\$ctl6[]@size","4");
@@ -44,6 +44,7 @@ class QuickstartListBoxTestCase extends PradoGenericSelenium2Test
// multiselection list box's behavior upon postback
$this->addSelection("ctl0\$body\$ListBox2[]", "item 3");
$this->byName("ctl0\$body\$ctl8")->click();
+ $this->pause(50);
$this->assertText("ctl0_body_MultiSelectionResult2","Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)");
// Auto postback multiselection list box
@@ -52,15 +53,15 @@ class QuickstartListBoxTestCase extends PradoGenericSelenium2Test
// Databind to an integer-indexed array
$this->selectAndWait("ctl0\$body\$DBListBox1[]", "item 3");
- $this->assertContains("Your selection is: (Index: 2, Value: 2, Text: item 3)", $this->source());
+ $this->assertSourceContains("Your selection is: (Index: 2, Value: 2, Text: item 3)");
// Databind to an associative array
$this->selectAndWait("ctl0\$body\$DBListBox2[]", "item 2");
- $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source());
+ $this->assertSourceContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)");
// Databind with DataTextField and DataValueField specified
$this->selectAndWait("ctl0\$body\$DBListBox3[]", "Cary");
- $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source());
+ $this->assertSourceContains("Your selection is: (Index: 2, Value: 003, Text: Cary)");
// List box is being validated
$this->assertNotVisible('ctl0_body_ctl10');