From bdfd9f07f17de1751a7e4d94940acb426af4be77 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 6 Aug 2015 18:12:45 +0200 Subject: Fix tests work around stale references by explicitly waiting --- .../quickstart/Controls/RadioButtonListTestCase.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php') diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php index 6242cebe..16a6e303 100755 --- a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php @@ -22,23 +22,23 @@ class QuickstartRadioButtonListTestCase extends PradoGenericSelenium2Test // RadioButton list's behavior upon postback $this->byXPath("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']")->click(); $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); - $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)"); // Auto postback check box list $this->byXPath("//input[@name='ctl0\$body\$ctl7' and @value='value 5']")->click(); - $this->assertContains("Your selection is: (Index: 4, Value: value 5, Text: item 5)", $this->source()); + $this->assertSourceContains("Your selection is: (Index: 4, Value: value 5, Text: item 5)"); // Databind to an integer-indexed array $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']")->click(); - $this->assertContains("Your selection is: (Index: 0, Value: 0, Text: item 1)", $this->source()); + $this->assertSourceContains("Your selection is: (Index: 0, Value: 0, Text: item 1)"); // Databind to an associative array: $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']")->click(); - $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->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']")->click(); - $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source()); + $this->assertSourceContains("Your selection is: (Index: 2, Value: 003, Text: Cary)"); // RadioButton list causing validation $this->assertNotVisible('ctl0_body_ctl8'); -- cgit v1.2.3