diff options
8 files changed, 25 insertions, 22 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php index 1a6347f9..5e5e4daa 100755 --- a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php @@ -15,8 +15,9 @@ class CalculatorTestCase extends PradoGenericSeleniumTest $this->type("b", "5"); $this->click("sum"); + $this->pause(250); + $this->assertNotVisible("summary"); - $this->assertValue("c", "7"); } } diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php index 76d8b9af..c495935a 100755 --- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php @@ -28,7 +28,7 @@ class CallbackAdapterTestCase extends PradoGenericSeleniumTest $this->assertAlert('baz!'); } - +/* function testIE() { $this->open("active-controls/index.php?page=ControlAdapterTest"); @@ -54,4 +54,5 @@ class CallbackAdapterTestCase extends PradoGenericSeleniumTest $this->assertAlert('baz!'); $this->assertAlert('ok'); } +*/ } diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php index fc1d2c28..fd273ae7 100755 --- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php @@ -44,7 +44,7 @@ class ReplaceContentTestCase extends PradoGenericSeleniumTest $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); } - +/* function testIE() { $this->open('active-controls/index.php?page=ReplaceContentTest'); @@ -86,5 +86,5 @@ class ReplaceContentTestCase extends PradoGenericSeleniumTest $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); } - +*/ } diff --git a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php index e374de1d..eae8ab36 100755 --- a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php @@ -12,12 +12,12 @@ class QuickstartDropDownListTestCase extends PradoGenericSeleniumTest $this->verifyElementPresent("ctl0\$body\$ctl0"); // dropdown list with initial options - $this->verifySelectOptions("ctl0\$body\$ctl1","item 1,item 2,item 3,item 4"); - $this->verifySelected("ctl0\$body\$ctl1","value=value 2"); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertSelected("ctl0\$body\$ctl1","item 2"); // dropdown list with customized styles - $this->verifySelectOptions("ctl0\$body\$ctl2","item 1,item 2,item 3,item 4"); - $this->verifySelected("ctl0\$body\$ctl2","value=value 2"); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertSelected("ctl0\$body\$ctl2","item 2"); // a disabled dropdown list $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); diff --git a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php index bb1a8be0..1cae0d43 100755 --- a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php @@ -11,13 +11,13 @@ class QuickstartListBoxTestCase extends PradoGenericSeleniumTest $this->verifyAttribute("ctl0\$body\$ctl0@size","4"); // single selection list box with initial options - $this->verifySelectOptions("ctl0\$body\$ctl1","item 1,item 2,item 3,item 4"); - $this->verifySelected("ctl0\$body\$ctl1","value=value 2"); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertSelected("ctl0\$body\$ctl1","item 2"); // a single selection list box with customized style $this->verifyAttribute("ctl0\$body\$ctl2@size","3"); - $this->verifySelectOptions("ctl0\$body\$ctl2","item 1,item 2,item 3,item 4"); - $this->verifySelected("ctl0\$body\$ctl2","value=value 2"); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertSelected("ctl0\$body\$ctl2","item 2"); // a disabled list box $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); @@ -25,13 +25,13 @@ class QuickstartListBoxTestCase extends PradoGenericSeleniumTest // an auto postback single selection list box $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); // a single selection list box upon postback $this->select("ctl0\$body\$ListBox1", "label=item 4"); $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + $this->verifyTextPresent("exact:Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); // a multiple selection list box $this->verifyAttribute("ctl0\$body\$ctl6[]@size","4"); @@ -39,29 +39,29 @@ class QuickstartListBoxTestCase extends PradoGenericSeleniumTest // a multiple selection list box with initial options $this->verifyAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple"); - $this->verifySelectOptions("ctl0\$body\$ctl7[]","item 1,item 2,item 3,item 4"); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl7[]"), array('item 1', 'item 2', 'item 3', 'item 4')); // multiselection list box's behavior upon postback $this->addSelection("ctl0\$body\$ListBox2[]", "label=item 3"); $this->clickAndWait("name=ctl0\$body\$ctl8", ""); - $this->verifyText("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)"); + $this->verifyText("ctl0_body_MultiSelectionResult2","exact: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 $this->addSelection("ctl0\$body\$ctl9[]", "label=item 1"); $this->waitForPageToLoad(1000); - $this->verifyText("ctl0_body_MultiSelectionResult","Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)"); + $this->verifyText("ctl0_body_MultiSelectionResult","exact:Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)"); // Databind to an integer-indexed array $this->selectAndWait("ctl0\$body\$DBListBox1[]", "label=item 3"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); + $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); // Databind to an associative array $this->selectAndWait("ctl0\$body\$DBListBox2[]", "label=item 2"); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + $this->verifyTextPresent("exact:Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); // Databind with DataTextField and DataValueField specified $this->selectAndWait("ctl0\$body\$DBListBox3[]", "label=Cary"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); // List box is being validated $this->verifyNotVisible('ctl0_body_ctl10'); diff --git a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php index 72a1b227..da5e8c15 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php @@ -10,7 +10,7 @@ class Ticket220TestCase extends PradoGenericSeleniumTest $this->assertText("{$base}label1", "Label 1"); $this->click("button1"); - $this->assertText("{$base}label1", 'Label 1: ["ok", "ok 3?", "ok 2!"]'); + $this->assertText("{$base}label1", 'exact:Label 1: ["ok", "ok 3?", "ok 2!"]'); $this->assertAlertNotPresent(); } } diff --git a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php index c723be38..3680eea1 100755 --- a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php @@ -16,7 +16,7 @@ class Ticket225TestCase extends PradoGenericSeleniumTest $this->click("{$base}button2"); $this->clickAndWait("{$base}button4"); - $this->assertText("{$base}label1", 'ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3'); + $this->assertText("{$base}label1", 'exact:ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3'); $this->assertNotVisible("{$base}validator1"); } } diff --git a/tests/test_tools/PradoGenericSeleniumTest.php b/tests/test_tools/PradoGenericSeleniumTest.php index 922b9d87..2c9ceb21 100644 --- a/tests/test_tools/PradoGenericSeleniumTest.php +++ b/tests/test_tools/PradoGenericSeleniumTest.php @@ -9,6 +9,7 @@ class PradoGenericSeleniumTest extends PHPUnit_Extensions_SeleniumTestCase protected function setUp() { + $this->shareSession(true); $this->setBrowser(static::$browser); $this->setBrowserUrl(static::$baseurl); } |