3 * Copyright (C) 2008 Alain Peyrat <aljeux@free.fr>
4 * Copyright (C) 2009 - 2010 Alain Peyrat, Alcatel-Lucent
6 * This file is part of FusionForge.
8 * FusionForge is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; either version 2 of the License,
11 * or (at your option) any later version.
13 * FusionForge is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * Standard Alcatel-Lucent disclaimer for contributing to open source
26 * "The test suite ("Contribution") has not been tested and/or
27 * validated for release as or in products, combinations with products or
28 * other commercial use. Any use of the Contribution is entirely made at
29 * the user's own responsibility and the user can not rely on any features,
30 * functionalities or performances Alcatel-Lucent has attributed to the
33 * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
34 * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
36 * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
37 * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
38 * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
39 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40 * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
41 * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
45 require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
47 class TopTester extends FForge_SeleniumTestCase
49 function testWalkInTop()
51 $this->cron("project_weekly_metric.php");
53 $this->populateStandardTemplate('forums');
56 $this->clickAndWait("link=Forums");
57 $this->clickAndWait("link=open-discussion");
58 $this->clickAndWait("link=Start New Thread");
59 $this->type("subject", "Message1");
60 $this->type("body", "Text1");
61 $this->clickAndWait("submit");
62 $this->assertTextPresent("Message Posted Successfully");
65 $this->cron("project_weekly_metric.php");
67 // Test that from the main page we access the most active this week.
68 $this->clickAndWait("link=Home");
69 $this->clickAndWait("link=[More]");
70 $this->assertTextPresent("Most Active This Week");
72 // Test that we can return back to all the tops.
73 $this->clickAndWait("link=[View Other Top Categories]");
74 $this->assertTextPresent("We track many project usage statistics");
76 // Test that we can go the view the most active all time.
77 $this->clickAndWait("link=Most Active All Time");
78 $this->assertTextPresent("Most Active All Time");
80 // Return back to tops.
81 $this->clickAndWait("link=[View Other Top Categories]");
82 $this->clickAndWait("link=Top Downloads");
83 $this->assertTextPresent("Rank");
86 $this->cron("project_weekly_metric.php");
92 // c-file-style: "bsd"