summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page1
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.php15
-rw-r--r--tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php6
3 files changed, 18 insertions, 4 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page
index 8b8962a8..49b18520 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page
@@ -19,6 +19,7 @@
<com:TActiveButton ID="button1" Text="Select Index 3" OnClick="select_index_3" />
<com:TActiveButton ID="button2" Text="Clear selection" OnClick="clear_selections" />
<com:TActiveButton ID="button3" Text="Select Value 'value 2'" OnClick="select_value_2" />
+ <com:TActiveButton ID="button4" Text="Select Item 3 And Sub Item 3" OnClick="select_index_3_plus" />
</div>
<com:TJavascriptLogger />
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.php
index 7060d84b..10541885 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.php
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.php
@@ -4,7 +4,7 @@ class ActiveDropDownList extends TPage
{
function list1_changed($sender)
{
- $this->label1->setText("Selection 1: ".$sender->getSelectedValue());
+ $this->label1->setText("Selection 1: ".$sender->getSelectedValue());
$this->addOptionsToList2($sender->getSelectedValue());
}
@@ -19,21 +19,28 @@ class ActiveDropDownList extends TPage
{
$this->label1->setText("Selection 2: ".$sender->getSelectedValue());
}
-
+
function select_index_3()
{
$this->list1->setSelectedIndex(3);
}
-
+
function clear_selections()
{
$this->list1->clearSelection();
}
-
+
function select_value_2()
{
$this->list1->setSelectedValue("value 2");
}
+
+ function select_index_3_plus()
+ {
+ $this->list1->setSelectedValue("value 3");
+ $this->list1_changed($this->list1);
+ $this->list2->setSelectedValue("value 3 - item 3");
+ }
}
?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
index 9d3ad9c3..44435199 100644
--- a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
@@ -35,6 +35,12 @@ class ActiveDropDownListTestCase extends SeleniumTestCase
$this->pause(800);
$this->assertText("label1", "Selection 2: value 3 - item 5");
+ $this->click('button4');
+ $this->pause(800);
+ $this->assertSelected('list1', 'item 3');
+ $this->pause(300);
+ $this->assertSelected('list2', 'value 3 - item 3');
+
}
}