Merge "Concatenate two literals"
[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 require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
31
32 /**
33 * Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
34 * Test Case Name : User selects 'Read me' link.
35 * User selects 'Release notes' link.
36 * User selects 'Copying' link.
37 * User selects 'Upgrading' link.
38 * Version : MediaWiki 1.18alpha
39 */
40
41 class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction {
42 function setUp() {
43 parent::setUp();
44 }
45
46 public function testLinksAvailability() {
47 $this->open( "http://" . HOST_NAME . ":" . PORT . "/" . DIRECTORY_NAME . "/config/index.php" );
48
49 // Verify 'Read me' link availability
50 $this->assertTrue( $this->isElementPresent( "link=Read me" ) );
51
52 // Verify 'Release notes' link availability
53 $this->assertTrue( $this->isElementPresent( "link=Release notes" ) );
54
55 // Verify 'Copying' link availability
56 $this->assertTrue( $this->isElementPresent( "link=Copying" ) );
57 }
58
59 public function testPageNavigation() {
60 $this->open( "http://" . HOST_NAME . ":" . PORT . "/" . DIRECTORY_NAME . "/config/index.php" );
61
62 // Navigate to the 'Read me' page
63 $this->click( "link=Read me" );
64 $this->waitForPageToLoad( PAGE_LOAD_TIME );
65 $this->assertEquals( "Read me", $this->getText( LINK_DIV . "h2[1]" ) );
66 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
67 parent::clickBackButton();
68
69 // Navigate to the 'Release notes' page
70 $this->click( "link=Release notes" );
71 $this->waitForPageToLoad( PAGE_LOAD_TIME );
72 $this->assertEquals( "Release notes", $this->getText( LINK_DIV . "h2[1]" ) );
73 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
74 parent::clickBackButton();
75
76 // Navigate to the 'Copying' page
77 $this->click( "link=Copying" );
78 $this->waitForPageToLoad( PAGE_LOAD_TIME );
79 $this->assertEquals( "Copying", $this->getText( LINK_DIV . "h2[1]" ) );
80 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
81 parent::clickBackButton();
82
83 // Navigate to the 'Upgrading' page
84 $this->click( "link=Upgrading" );
85 $this->waitForPageToLoad( PAGE_LOAD_TIME );
86 $this->assertEquals( "Upgrading", $this->getText( LINK_DIV . "h2[1]" ) );
87 }
88 }