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
88
89
90
|
<?php
class ReplaceContentTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base='ctl0_Content_';
$this->url('active-controls/index.php?page=ReplaceContentTest');
$this->assertContains('Callback Replace Content Test', $this->source());
$this->assertText("{$base}subpanel", 'Sub Panel');
$this->assertText("{$base}panel1", "Main Panel\nSub Panel");
$this->type("{$base}content", 'something');
$this->byId("{$base}btn_append")->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'Sub Panel something');
$this->assertText("{$base}panel1", "Main Panel\nSub Panel something");
$this->type("{$base}content", 'more');
$this->byId("{$base}btn_prepend")->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'more Sub Panel something');
$this->assertText("{$base}panel1", "Main Panel\nmore Sub Panel something");
$this->type("{$base}content", 'prado');
$this->byId("{$base}btn_before")->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'more Sub Panel something');
$this->assertText("{$base}panel1", "Main Panel prado\nmore Sub Panel something");
$this->type("{$base}content", ' php ');
$this->byId("{$base}btn_after")->click();
$this->pause(800);
$this->type("{$base}content", 'mauahahaha');
$this->byId("{$base}btn_replace")->click();
$this->pause(1000);
$this->assertText("{$base}panel1", 'Main Panel pradomauahahaha php');
}
/*
function testIE()
{
$this->url('active-controls/index.php?page=ReplaceContentTest');
$this->assertContains('Callback Replace Content Test', $this->source());
$this->assertText("{$base}subpanel", 'Sub Panel');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel');
$this->type("{$base}content", 'something');
$this->byId('btn_append')->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'Sub Panel something');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel\s*something');
$this->type("{$base}content", 'more');
$this->byId('btn_prepend')->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*moreSub Panel\s*something');
$this->type("{$base}content", 'prado');
$this->byId('btn_before')->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
$this->type("{$base}content", ' php ');
$this->byId('btn_after')->click();
$this->pause(800);
$this->type("{$base}content", 'mauahahaha');
$this->byId('btn_replace')->click();
$this->pause(1000);
$this->assertText("{$base}panel1", 'Main Panel pradomauahahahaphp');
}
*/
}
|