blob: 41372b93bbd79a55bd69a77a428e495d43210923 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<?php
class RequiredFieldTestCase extends SeleniumTestCase
{
function test()
{
$base = "ctl0_Content_";
$this->open("validators/index.php?page=RequiredFieldValidator");
$this->assertTextPresent("RequiredFieldValidator Tests");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->click("{$base}submit1");
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "testing");
$this->click("{$base}submit1");
$this->assertNotVisible("{$base}validator1");
$this->click("{$base}submit2");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
$this->assertVisible("{$base}validator4");
$this->type("{$base}text2", "testing2");
$this->click("{$base}submit2");
$this->assertNotVisible("{$base}validator3");
$this->click("{$base}submit3");
$this->assertVisible("{$base}summary3");
$this->clickAndWait("{$base}submit4");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
$this->assertNotVisible("{$base}validator4");
$this->click("{$base}submit1");
$this->assertVisible("{$base}validator2");
$this->click("{$base}check1");
$this->click("{$base}submit2");
$this->assertVisible("{$base}validator4");
$this->clickAndWait("{$base}submit1");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1");
$this->click("{$base}check1");
$this->click("{$base}submit1");
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->click("{$base}check2");
$this->clickAndWait("{$base}submit2");
$this->type("{$base}text1", "Hello");
$this->click("{$base}check1");
$this->click("{$base}submit2");
$this->assertNotVisible("{$base}validator5");
$this->assertNotVisible("{$base}validator6");
$this->assertNotVisible("{$base}validator7");
$this->assertNotVisible("{$base}validator8");
$this->type("{$base}text1");
$this->type("{$base}text2");
$this->click("{$base}check1");
$this->click("{$base}check2");
$this->click("{$base}submit3");
$this->assertVisible("{$base}validator5");
$this->assertVisible("{$base}validator6");
$this->assertVisible("{$base}validator7");
$this->assertVisible("{$base}validator8");
$this->clickAndWait("{$base}submit4");
$this->assertNotVisible("{$base}validator5");
$this->assertNotVisible("{$base}validator6");
$this->assertNotVisible("{$base}validator7");
$this->assertNotVisible("{$base}validator8");
}
function testInitialValue()
{
$base = "ctl0_Content_";
$this->open("validators/index.php?page=RequiredFieldValidator");
$this->assertTextPresent("InitialValue Test");
$this->assertNotVisible("{$base}validator9");
$this->click("{$base}submit5");
$this->pause(250);
$this->assertVisible("{$base}validator9");
$this->type("{$base}text5", "adasd");
$this->pause(250);
$this->assertNotVisible("{$base}validator9");
}
}
?>
|