summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/issues/tests/Issue516TestCase.php
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
committerctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
commit74b31be9515eddfa63005d6760614badfaba9fea (patch)
tree47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/FunctionalTests/issues/tests/Issue516TestCase.php
parent2b11341614ac4a15be697fa8acad07055154ac54 (diff)
parent0c5026b55cde5c104f10686afd8b441568175d38 (diff)
Merge pull request #530 from pradosoft/prado-3.2.43.2.4prado-3.2
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests/issues/tests/Issue516TestCase.php')
-rw-r--r--tests/FunctionalTests/issues/tests/Issue516TestCase.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/FunctionalTests/issues/tests/Issue516TestCase.php b/tests/FunctionalTests/issues/tests/Issue516TestCase.php
new file mode 100644
index 00000000..363e9f84
--- /dev/null
+++ b/tests/FunctionalTests/issues/tests/Issue516TestCase.php
@@ -0,0 +1,37 @@
+<?php
+
+class Issue516TestCase extends PradoGenericSelenium2Test
+{
+ function test()
+ {
+ $this->url('issues/index.php?page=Issue516');
+ $this->assertContains('Issue 516 Test', $this->source());
+ $base='ctl0_Content_';
+ $row1='DataGrid_ctl1_';
+ $row2='DataGrid_ctl2_';
+
+ // click "edit" and check for textbox
+ $this->byID("{$base}{$row1}ctl3")->click();
+ $this->pause(800);
+ $this->assertElementPresent("{$base}{$row1}TextBox");
+ // click "save" and check for validator
+ $this->byID("{$base}{$row1}ctl3")->click();
+ $this->pause(800);
+ $this->assertEquals('Please provide a title.', $this->getElement("{$base}{$row1}ctl1")->text());
+ // click "cancel" and ensure validator has disappeared
+ $this->byID("{$base}{$row1}ctl4")->click();
+ $this->pause(800);
+ $this->assertElementNotPresent("{$base}{$row1}ctl1");
+
+ // click "edit" and check for textbox on the second row
+ $this->byID("{$base}{$row2}ctl3")->click();
+ $this->pause(800);
+ $this->assertTrue($this->getElement("{$base}{$row2}TextBox")!==null);
+ // click "save" and ensure bvalidation has been successfull
+ $this->byID("{$base}{$row2}ctl3")->click();
+ $this->pause(800);
+ $this->assertElementNotPresent("{$base}{$row2}ctl1");
+ $this->assertElementNotPresent("{$base}{$row2}TextBox");
+ $this->assertEquals('Edit', $this->getElement("{$base}{$row2}ctl3")->text());
+ }
+}