forked from jpatokal/openflights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebMapPublicTest.php
32 lines (27 loc) · 1006 Bytes
/
WebMapPublicTest.php
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
<?php
include_once(dirname(__FILE__) . '/OpenFlightsSeleniumTestCase.php');
class WebMapPublicTest extends OpenFlightsSeleniumTestCase
{
public function testPublicUserMapAsAnonymous()
{
global $settings;
$this->open("/user/" . $settings['name']);
$this->verifyTextPresent("${settings['name']}'s flights");
# Analyze
$this->click("//input[@value='Analyze']");
$this->verifyTextPresent("Total flown");
$this->verifyTextPresent("1000 mi");
# Top 10
$this->click("//input[@value='Top 10']");
$this->verifyTextPresent("Lifou (LIF)");
$this->click('link=LIF');
$this->verifyTextPresent("Lifou, New Caledonia");
$this->click("//img[@onclick='JavaScript:closePopup(true);']");
$this->click('link=Decatur Aviation');
$this->verifyTextPresent($settings['name'] . "'s flights on Decatur Aviation");
# Back to main map
$this->select('Airlines', 'label=All carriers');
$this->verifyTextPresent($settings['name'] . "'s flights");
}
}
?>