Follow-up I0b781c11 (2a55449): use User::getAutomaticGroups().
[lhc/web/wiklou.git] / tests / selenium / installer / MediaWikiRightFrameworkLinksTestCase.php
1 <?php
2
3 /**
4 * MediaWikiRightFrameworkLinksTestCase
5 *
6 * @file
7 * @ingroup Maintenance
8 * Copyright (C) 2010 Nadeesha Weerasinghe <nadeesha@calcey.com>
9 * http://www.calcey.com/
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * http://www.gnu.org/copyleft/gpl.html
25 *
26 * @addtogroup Maintenance
27 *
28 */
29
30
31 require_once (dirname(__FILE__).'/'.'MediaWikiInstallationCommonFunction.php');
32
33 /**
34 * Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
35 * Test Case Name : User selects 'Read me' link.
36 * User selects 'Release notes' link.
37 * User selects 'Copying' link.
38 * User selects 'Upgrading' link.
39 * Version : MediaWiki 1.18alpha
40 */
41
42
43 class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction {
44
45 function setUp() {
46 parent::setUp();
47 }
48
49 public function testLinksAvailability() {
50
51 $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
52
53 // Verify 'Read me' link availability
54 $this->assertTrue($this->isElementPresent( "link=Read me" ));
55
56 // Verify 'Release notes' link availability
57 $this->assertTrue($this->isElementPresent( "link=Release notes" ));
58
59 // Verify 'Copying' link availability
60 $this->assertTrue($this->isElementPresent( "link=Copying" ));
61 }
62
63 public function testPageNavigation() {
64
65 $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
66
67 // Navigate to the 'Read me' page
68 $this->click( "link=Read me" );
69 $this->waitForPageToLoad( PAGE_LOAD_TIME );
70 $this->assertEquals( "Read me", $this->getText( LINK_DIV."h2[1]" ));
71 $this->assertTrue($this->isElementPresent( "submit-back" ));
72 parent::clickBackButton();
73
74 // Navigate to the 'Release notes' page
75 $this->click( "link=Release notes" );
76 $this->waitForPageToLoad( PAGE_LOAD_TIME);
77 $this->assertEquals( "Release notes", $this->getText( LINK_DIV."h2[1]" ));
78 $this->assertTrue( $this->isElementPresent( "submit-back" ));
79 parent::clickBackButton();
80
81 // Navigate to the 'Copying' page
82 $this->click( "link=Copying" );
83 $this->waitForPageToLoad( PAGE_LOAD_TIME );
84 $this->assertEquals( "Copying", $this->getText( LINK_DIV."h2[1]" ));
85 $this->assertTrue($this->isElementPresent( "submit-back" ));
86 parent::clickBackButton();
87
88 // Navigate to the 'Upgrading' page
89 $this->click( "link=Upgrading" );
90 $this->waitForPageToLoad( PAGE_LOAD_TIME );
91 $this->assertEquals( "Upgrading", $this->getText( LINK_DIV."h2[1]" ));
92 }
93 }