summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-03-05 23:02:18 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:30:13 +0200
commit94e54d3023ed89281f89125f3ad0553afb9312cb (patch)
tree688470329e8b837252b523b6341fe5e10fe34b95 /tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
parent32dfd8233520261483bdf30f23425e3b50f05d17 (diff)
Started cleaning tests' selenium2 compatibility layer
(cherry picked from commit 4ce02f6973aa40c313364b5ff7990f2244309790) Conflicts: tests/FunctionalTests/tickets/tests/Ticket220TestCase.php tests/FunctionalTests/tickets/tests/Ticket719TestCase.php tests/FunctionalTests/tickets/tests/Ticket769TestCase.php tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php tests/FunctionalTests/validators/tests/DatePickerTestCase.php
Diffstat (limited to 'tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php')
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
index 1b7aca5e..cb01e948 100755
--- a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
@@ -6,7 +6,7 @@ class QuickstartDropDownListTestCase extends PradoGenericSelenium2Test
{
$this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// dropdown list with default settings
$this->assertElementPresent("ctl0\$body\$ctl0");
@@ -20,46 +20,46 @@ class QuickstartDropDownListTestCase extends PradoGenericSelenium2Test
$this->assertSelected("ctl0\$body\$ctl2","item 2");
// a disabled dropdown list
- $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
+ $this->assertAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
// an auto postback dropdown list
- $this->assertTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
- $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3");
- $this->assertTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
+ $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());
// a single selection list box upon postback
- $this->select("ctl0\$body\$DropDownList1", "label=item 4");
- $this->assertTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->assertTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
+ $this->select("ctl0\$body\$DropDownList1", "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());
// Databind to an integer-indexed array
- $this->selectAndWait("ctl0\$body\$DBDropDownList1", "label=item 3");
- $this->assertTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", "");
+ $this->selectAndWait("ctl0\$body\$DBDropDownList1", "item 3");
+ $this->assertContains("Your selection is: (Index: 2, Value: 2, Text: item 3)", $this->source());
// Databind to an associative array
- $this->selectAndWait("ctl0\$body\$DBDropDownList2", "label=item 2");
- $this->assertTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
+ $this->selectAndWait("ctl0\$body\$DBDropDownList2", "item 2");
+ $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source());
// Databind with DataTextField and DataValueField specified
- $this->selectAndWait("ctl0\$body\$DBDropDownList3", "label=Cary");
- $this->assertTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
+ $this->selectAndWait("ctl0\$body\$DBDropDownList3", "Cary");
+ $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source());
// dropdown list is being validated
$this->assertNotVisible('ctl0_body_ctl6');
- $this->click("id=ctl0_body_ctl7", "");
+ $this->byId("ctl0_body_ctl7")->click();
$this->assertVisible('ctl0_body_ctl6');
- $this->select("ctl0\$body\$VDropDownList1", "label=item 2");
- $this->clickAndWait("id=ctl0_body_ctl7", "");
+ $this->select("ctl0\$body\$VDropDownList1", "item 2");
+ $this->byId("ctl0_body_ctl7")->click();
$this->assertNotVisible('ctl0_body_ctl6');
// dropdown list causing validation
$this->assertNotVisible('ctl0_body_ctl8');
- $this->select("ctl0\$body\$VDropDownList2", "label=Disagree");
+ $this->select("ctl0\$body\$VDropDownList2", "Disagree");
$this->pause(1000);
$this->assertVisible('ctl0_body_ctl8');
$this->type("ctl0\$body\$TextBox", "test");
- $this->selectAndWait("ctl0\$body\$VDropDownList2", "label=Agree");
+ $this->selectAndWait("ctl0\$body\$VDropDownList2", "Agree");
$this->assertNotVisible('ctl0_body_ctl8');
}
}