blob: 7eba93176c98f6a13dd2a325c7ec990bdfa4bbc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
class CheckBox extends TPage
{
protected function onLoad($param)
{
if(!$this->IsPostBack)
$this->dataBind();
}
}
class CheckBoxTestCase extends SeleniumTestCase
{
function setup()
{
$this->open(Prado::getApplication()->getTestPage(__FILE__));
}
function testValidator()
{
$this->verifyTitle("An AutoPostBack CheckBox");
//test checkbox 2 should fire the validator
$this->assertNotVisible("ctl0_Content_validator1");
$this->click("ctl0_Content_checkbox2");
$this->pause(100);
$this->assertVisible("ctl0_Content_validator1");
//write some text, and see what it
$this->type('ctl0_Content_TextBox', "hello");
$this->pause(100);
$this->assertNotVisible("ctl0_Content_validator1");
$this->clickAndWait("ctl0_Content_checkbox2"); //submit
$this->assertNotVisible("ctl0_Content_validator1");
}
}
?>
|