forked from janodvarko/harviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestPreviewExpand.php
More file actions
50 lines (39 loc) · 1.62 KB
/
Copy pathtestPreviewExpand.php
File metadata and controls
50 lines (39 loc) · 1.62 KB
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
<?php
require_once("HARTestCase.php");
/**
* Verify automatic expanding of pages.
*/
class HAR_TestPreviewExpand extends HAR_TestCase
{
public function testExpandSinglePage()
{
print "\ntestPreviewExpand.php (1)";
// HAR file is specified inside the test page.
$viewerURL = $GLOBALS["test_base"]."tests/testPreviewExpand.html.php";
$harFileURL = $GLOBALS["test_base"]."tests/hars/preview-expand.har";
$this->open($viewerURL."?path=".$harFileURL);
$this->waitForElement(".pageRow.opened");
}
public function testExpandMultiplePages()
{
print "\ntestPreviewExpand.php (2)";
// HAR file is specified inside the test page.
$viewerURL = $GLOBALS["test_base"]."tests/testPreviewExpand.html.php";
$harFileURL = $GLOBALS["test_base"]."tests/hars/multiple-pages.har";
$this->open($viewerURL."?path=".$harFileURL);
$this->waitForElement(".pageTable");
$this->assertEquals(3, $this->getCssCount(".pageRow"));
$this->assertEquals(0, $this->getCssCount(".pageRow.opened"));
}
public function testExpandByDefault()
{
print "\ntestPreviewExpand.php (3)";
// HAR file is specified inside the test page.
$viewerURL = $GLOBALS["test_base"]."tests/testPreviewExpand.html.php";
$harFileURL = $GLOBALS["test_base"]."tests/hars/multiple-pages.har";
$this->open($viewerURL."?path=".$harFileURL."&expand=true");
$this->waitForElement(".pageTable");
$this->assertEquals(3, $this->getCssCount(".pageRow.opened"));
}
}
?>