From 32dfd8233520261483bdf30f23425e3b50f05d17 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 28 Feb 2014 10:39:25 +0100 Subject: Ported all tests from Selenium1 (RC) to Selenium2 (WebDriver) using a compatibility layer (cherry picked from commit 82774aa0a41562a325f31c901584ec01c8238573) Conflicts: tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php tests/FunctionalTests/tickets/tests/Ticket220TestCase.php tests/FunctionalTests/tickets/tests/Ticket719TestCase.php tests/FunctionalTests/tickets/tests/Ticket769TestCase.php tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php --- .../quickstart/Controls/DropDownListTestCase.php | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php') diff --git a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php index eae8ab36..1b7aca5e 100755 --- a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php @@ -1,65 +1,65 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&notheme=true&lang=en"); $this->verifyTitle("PRADO QuickStart Sample", ""); // dropdown list with default settings - $this->verifyElementPresent("ctl0\$body\$ctl0"); + $this->assertElementPresent("ctl0\$body\$ctl0"); // dropdown list with initial options - $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); + $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->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); + $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"); // an auto postback dropdown list - $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->assertTextNotPresent("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->assertTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); // a single selection list box upon postback $this->select("ctl0\$body\$DropDownList1", "label=item 4"); - $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + $this->assertTextNotPresent("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->assertTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); // Databind to an integer-indexed array $this->selectAndWait("ctl0\$body\$DBDropDownList1", "label=item 3"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); + $this->assertTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); // Databind to an associative array $this->selectAndWait("ctl0\$body\$DBDropDownList2", "label=item 2"); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + $this->assertTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); // Databind with DataTextField and DataValueField specified $this->selectAndWait("ctl0\$body\$DBDropDownList3", "label=Cary"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + $this->assertTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); // dropdown list is being validated - $this->verifyNotVisible('ctl0_body_ctl6'); + $this->assertNotVisible('ctl0_body_ctl6'); $this->click("id=ctl0_body_ctl7", ""); - $this->verifyVisible('ctl0_body_ctl6'); + $this->assertVisible('ctl0_body_ctl6'); $this->select("ctl0\$body\$VDropDownList1", "label=item 2"); $this->clickAndWait("id=ctl0_body_ctl7", ""); - $this->verifyNotVisible('ctl0_body_ctl6'); + $this->assertNotVisible('ctl0_body_ctl6'); // dropdown list causing validation - $this->verifyNotVisible('ctl0_body_ctl8'); + $this->assertNotVisible('ctl0_body_ctl8'); $this->select("ctl0\$body\$VDropDownList2", "label=Disagree"); $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl8'); + $this->assertVisible('ctl0_body_ctl8'); $this->type("ctl0\$body\$TextBox", "test"); $this->selectAndWait("ctl0\$body\$VDropDownList2", "label=Agree"); - $this->verifyNotVisible('ctl0_body_ctl8'); + $this->assertNotVisible('ctl0_body_ctl8'); } } -- cgit v1.2.3