summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorxue <>2006-09-04 19:15:47 +0000
committerxue <>2006-09-04 19:15:47 +0000
commit56fee292c37e162c03fab9eeadd6a8b9ab85c251 (patch)
tree923510b93c707868098ae4e5f404eb3766a59553 /tests
parentb107cad91733d4a2a80f42cdbaab41a4f7b41c9d (diff)
merge from 3.0 branch till 1387
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php26
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket273.page13
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket273.php11
3 files changed, 37 insertions, 13 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php
index f44432dd..ddb1bd24 100644
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php
@@ -10,40 +10,40 @@ class DataGrid3TestCase extends SeleniumTestCase
$this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", "");
$this->verifyTextPresent("Addison-Wesley Professional", "");
$this->verifyTextPresent("$47.04", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl1@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl1@disabled','regexp:true|disabled');
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl7@checked','regexp:true|checked');
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl7@disabled','regexp:true|disabled');
//$this->verifyElementPresent("//img[@src='images/star5.gif']",'');
// edit the 2nd row
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl2", "");
- $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl1", "Design Pattern: Elements of Reusable Object-Oriented Software");
- $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl2", "Addison Wesley Professional");
- $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl3", "\$57.04");
- $this->click("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl4']", "");
- $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl5", "label=1");
+ $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl8", "");
+ $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl7", "Design Pattern: Elements of Reusable Object-Oriented Software");
+ $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl8", "Addison Wesley Professional");
+ $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl9", "\$57.04");
+ $this->click("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl10']", "");
+ $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl11", "label=1");
$this->clickAndWait("link=Save", "");
// verify the 2nd row is saved
$this->verifyTextPresent("Design Pattern: Elements of Reusable Object-Oriented Software", "");
$this->verifyTextPresent("Addison Wesley Professional", "");
$this->verifyTextPresent("$57.04", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl1@checked','regexp:false|null');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl1@disabled','regexp:true|disabled');
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl7@checked','regexp:false|null');
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl7@disabled','regexp:true|disabled');
//$this->verifyElementPresent("//img[@src='images/star1.gif']",'');
// verify cancel editting the 3rd row
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl2", "");
+ $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl8", "");
$this->clickAndWait("link=Cancel", "");
$this->verifyTextPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", "");
// verify deleting
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl3", "");
+ $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl9", "");
$this->verifyConfirmation("Are you sure?");
$this->verifyTextNotPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", "");
$this->verifyTextPresent("Extreme Programming Explained : Embrace Change",'');
$this->chooseCancelOnNextConfirmation();
- $this->click("id=ctl0_body_DataGrid_ctl6_ctl3", "");
+ $this->click("id=ctl0_body_DataGrid_ctl6_ctl9", "");
$this->verifyConfirmation("Are you sure?");
$this->verifyTextPresent("Extreme Programming Explained : Embrace Change",'');
}
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket273.page b/tests/FunctionalTests/tickets/protected/pages/Ticket273.page
new file mode 100644
index 00000000..02c1a48f
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket273.page
@@ -0,0 +1,13 @@
+<com:TContent ID="Content">
+ <com:TPanel ID="panel1" DefaultButton="button1">
+ Panel 1:
+ <com:TTextBox ID="textbox1" />
+ <com:TButton ID="button1" Text="Button 1" OnClick="button_clicked" />
+ </com:TPanel>
+ <com:TPanel ID="panel2" DefaultButton="button2">
+ Panel 2:
+ <com:TTextBox ID="textbox2" />
+ <com:TButton ID="button2" Text="Button 2" OnClick="button_clicked" />
+ </com:TPanel>
+ <com:TLabel ID="label1" Text="Label 1" />
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket273.php b/tests/FunctionalTests/tickets/protected/pages/Ticket273.php
new file mode 100644
index 00000000..8dca86c9
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket273.php
@@ -0,0 +1,11 @@
+<?php
+
+class Ticket273 extends TPage
+{
+ function button_clicked($sender, $param)
+ {
+ $this->label1->Text = $sender->Text . ' Clicked!';
+ }
+}
+
+?> \ No newline at end of file