summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/tests/ButtonTestCase.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/validators/tests/ButtonTestCase.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/validators/tests/ButtonTestCase.php')
-rwxr-xr-xtests/FunctionalTests/validators/tests/ButtonTestCase.php72
1 files changed, 36 insertions, 36 deletions
diff --git a/tests/FunctionalTests/validators/tests/ButtonTestCase.php b/tests/FunctionalTests/validators/tests/ButtonTestCase.php
index 58001322..90265156 100755
--- a/tests/FunctionalTests/validators/tests/ButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ButtonTestCase.php
@@ -1,63 +1,63 @@
<?php
-class ButtonTestCase extends PradoGenericSeleniumTest
+class ButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('validators/index.php?page=Button');
+ $this->url('validators/index.php?page=Button');
// verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}